| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 63629 | 殷震轩 | 矩阵加法 | C++ | Accepted | 6 MS | 376 KB | 487 | 2024-01-19 13:55:28 |
#include<bits/stdc++.h> using namespace std; int A[100][100],B[100][100],C[100][100]; int main(){ int n,m; cin>>n>>m; 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]; } } for(int i=0;i<n;i++){ for(int j=0;j<m;j++){ C[i][j]=A[i][j]+B[i][j]; } } for(int i=0;i<n;i++){ for(int j=0;j<m;j++){ cout<<C[i][j]<<" "; } cout<<endl; } return 0; }