Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|
125287 | 王金檐 | 矩阵加法 | C++ | Runtime Error | 0 MS | 264 KB | 508 | 2025-07-14 15:03:18 |
#include<iostream> using namespace std; int a[11][11]; int b[10][10]; int s[10][10]; 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++){ s[i][j]=a[i][j]+b[i][j]; } } for(int i=0;i<n;i++){ for(int j=0;j<m;j++){ cout<<s[i][j]<<" "; } cout<<endl; } return 0; }
Runtime Error:Segmentation fault