Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
7919 吴承熹 矩阵加法 C++ Presentation Error 4 MS 604 KB 736 2025-05-30 12:47:08

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[1000][1000],b,c; cin>>b>>c; for(int i=0;i<b;i++){ for(int j=0;j<c;j++){ cin>>a[i][j]; } cout<<endl; } for(int i=0;i<b;i++){ for(int j=0;j<c;j++){ int d; cin>>d; a[i][j]=a[i][j]+d; } cout<<endl; } for(int i=0;i<b;i++){ for(int j=0;j<c;j++){ cout<<a[i][j]<<" "; } cout<<endl; } return 0; }