Run ID | 作者 | 问题 | 语言 | 测评结果 | 分数 | 时间 | 内存 | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|---|
139455 | 刘国洋 | 矩阵加法 | C++ | 解答错误 | 0 | 0 MS | 260 KB | 551 | 2024-03-23 17:25:58 |
#include<bits/stdc++.h> using namespace std; int n,m; int a[105][105],b[105][105],c[105][105]; int main(){ cin>>n>>m; for(int i=1;i<=n;i++) for(int j=1;j<=m;j++) cin>>a[i][j]; for(int i=1;i<=n;i++) for(int j=1;j<=m;j++) cin>>b[i][j]; for(int i=1;i<=n;i++) for(int j=1;j<=m;j++) c[i][j]=a[i][j],b[i][j]; for(int i=1;i<=n;i++) { for(int j=1;j<=m;j++) { cout<<c[i][j]<<" "; } cout<<endl; } return 0; }