| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 83264 | 张之隽 | 矩阵加法 | C++ | Compile Error | 0 MS | 0 KB | 471 | 2024-07-14 11:39:52 |
#include<bits/stdc++.h> using namespace std; int n,m; 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]; cout<<c[i][j]<<" "; } cout<<endl; } return 0; }
Main.cc: In function 'int main()':
Main.cc:8:13: error: 'a' was not declared in this scope
cin>>a[i][j];
^
Main.cc:13:13: error: 'b' was not declared in this scope
cin>>b[i][j];
^
Main.cc:18:8: error: 'c' was not declared in this scope
c[i][j]=a[i][j]+b[i][j];
^
Main.cc:18:16: error: 'a' was not declared in this scope
c[i][j]=a[i][j]+b[i][j];
^
Main.cc:18:24: error: 'b' was not declared in this scope
c[i][j]=a[i][j]+b[i][j];
^