Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
154417 王培臻 矩阵加法 C++ Accepted 6 MS 408 KB 401 2026-05-30 13:52:46

Tests(10/10):


Code:

#include<bits/stdc++.h> using namespace std; int main() { long long a[100][100],f[100][100]; long long s,d; cin>>s>>d; for(int i=1;i<=s;i++){ for(int j=1;j<=d;j++){ cin>>a[i][j]; } } for(int i=1;i<=s;i++){ for(int j=1;j<=d;j++){ cin>>f[i][j]; } } for(int i=1;i<=s;i++){ for(int j=1;j<=d;j++){ cout<<a[i][j]+f[i][j]<<" "; } cout<<endl; } return 0; }