Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
156104 左锶焜 矩阵对角线 C++ Wrong Answer 1 MS 316 KB 633 2026-06-23 19:29:29

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 a[1001][1001],n,m; cin>>n>>m; for(int i=1;i<=n;i++){ for(int j=1;j<=n;j++) cin>>a[i][j]; } for(int i=1;i<=n;i++){ for(int j=1;j<=n;j++){ if(i==j||i-j==n-1) printf("%5d",a[i][j]-m); else printf("%5d",a[i][j]); cout<<a[i][j]<<' ';} cout<<endl; } return 0; }


Run Info:

------Input------
9 602 808 349 77 588 483 267 927 529 761 753 236 856 968 551 647 474 134 171 220 748 527 918 428 19 11 741 409 839 86 915 698 51 340 780 505 356 156 21 722 983 44 779 863 760 190 698 459 385 297 575 51 880 859 903 764 548 54 305 368 681 368 33 907 993 664 846 453 518 389 631 41 389 449 658 142 173 102 661 603 713 584
------Answer-----
1410 349 77 588 483 267 927 529 1363 753 838 856 968 551 647 474 736 171 220 748 1129 918 428 19 613 741 409 839 86 915 1300 51 942 780 505 356 156 21 722 983 646 779 863 760 190 698 459 385 899 575 653 880 859 903 764 548 656 305 368 681 970 33 907 993 1266 846 453 518 389 631 643 389 1051 658 142 173 102 661 603 713 1186
------Your output-----
206808 349349 7777 588588 483483 267267 927927 529529 761761 753753 -366236 856856 968968 551551 647647 474474 134134 171171 220220 748748 -75527 918918 428428 1919 1111 741741 409409 839839 8686 915915 96698 5151 340340 780780 505505 356356 156156 2121 722722 983983 -55844 779779 863863 760760 190190 698698 459459 385385 297297 575575 -55151 880880 859859 903903 764764 54854