Run ID | 作者 | 问题 | 语言 | 测评结果 | 分数 | 时间 | 内存 | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|---|
141172 | 陈家宝 | 矩阵加法 | C++ | 解答错误 | 0 | 0 MS | 236 KB | 346 | 2024-04-02 17:04:21 |
#include<bits/stdc++.h> using namespace std; int a[1001][1001],b[1001][1001],n,m; int main(){ for(int i=0;i<n;i++)for(int j=0;j<m;j++)cin>>a[i][j]; for(int i=0;i<n;i++) for(int j=0;j<m;j++){ cin>>b[i][j]; a[i][j]+=b[i][j]; } for(int i=0;i<n;i++){ for(int j=0;j<m;j++)cout<<a[i][j]<<" "; cout<<endl; } return 0; }