Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
6403 柯宇希 矩阵加法 C++ Wrong Answer 7 MS 284 KB 699 2025-02-22 15:48:49

Tests(0/10):


Code:

#include<iostream> // cin\cout\endl #include<cstdio> //scanf()\printf() #include<cstring> // strcpy()\strcat()\strcmp()\strlen()\memset() #include<cmath> //sqrt()\pow()\abs()\ceil()\floor()\max()\min() using namespace std; int main(){ int n,m; cin>>n>>m; int a[101][101],b[101][101],c[101][101]; for(int i=0;i<n;i++){ for(int j=0;j<n;j++){ cin>>a[i][j]; } } for(int i=0;i<m;i++){ for(int j=0;j<m;j++){ cin>>b[i][j]; } } for(int i=0;i<n;i++){ for(int j=0;j<n;j++){ c[i][j]=a[i][j]+b[i][j]; cout<<c[i][j]<<" "<<endl; } } return 0; }


Run Info:

------Input------
26 64 772 628 377 904 358 108 636 851 716 550 108 313 801 557 253 165 688 975 438 466 481 685 469 116 238 432 5 312 509 958 309 186 862 173 995 478 223 191 777 177 486 23 422 48 215 68 904 896 583 803 424 753 152 217 63 469 773 137 272 797 849 539 205 742 675 606 855 543 357 631 296 951 693 906 883 373 531 233 511 623 60 963 800 719 7 758 166 971 54 120 402 588 119 554 38 914 691 839 716 781 678 395 18 358 673 311 580 984 853 468 322 561 273 494 404 38 757 292 876 758 471 468 179 989 830 52 478
------Answer-----
1544 1256 754 1808 716 216 1272 1702 1432 1100 216 626 1602 1114 506 330 1376 1950 876 932 962 1370 938 232 476 864 10 624 1018 1916 618 372 1724 346 1990 956 446 382 1554 354 972 46 844 96 430 136 1808 1792 1166 1606 848 1506 304 434 126 938 1546 274 544 1594 1698 1078 410 1279 1350 1212 1710 1086 714 1262 592 1902 1386 1812 1766 746 1062 466 1022 1246 120 1926 1600 1438 14 1516 332 1942 108 240 804 1176 238 1108 76 1828 1382 1678 1432 1562 1356 790 36 716 1346 622 1160 1968 1706 936 644 1122 5
------Your output-----
1296 1305 940 971 741 394 1488 1773 1288 887 127 467 1286 760 1168 887 1463 1471 538 1321 692 1625 695 1012 617 885 304 511 590 986 488 1102 1500 177 1829 1470 817 532 1176 717 714 449 530 873 293 326 1877 1678 841 853 1337 1262 178 725 398 1046 1582 522 829 1148 1232 692 375 1259 1584 1002 1144 745 1085 1323 753 1593 1240 984 1770 762 1049 568 1135 842 147 1933 1003 1323 345 1232 1009 1456 418 721 1048 13