| Run ID | Author | Problem | Lang | Verdict | Score | Time | Memory | Code Length | Submit Time |
|---|---|---|---|---|---|---|---|---|---|
| 139413 | 於子轩bylz | 矩阵加法 | C++ | Accepted | 100 | 0 MS | 268 KB | 473 | 2024-03-23 17:23:43 |
#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; }