Run ID | Author | Problem | Lang | Verdict | Time | Memory | Code Length | Submit Time |
---|---|---|---|---|---|---|---|---|
42546 | 惠子铭 | 矩阵加法 | C++ | Accepted | 1 MS | 264 KB | 334 | 2024-03-01 15:51:04 |
#include<iostream> using namespace std; int main(){ int n, m; int a[105][105], b[105][105]; 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]; cout<<a[i][j]+b[i][j]<<' '; } cout<<endl; } return 0; }