没什么问题还全是WA
查看原帖
没什么问题还全是WA
1058586
hjk20120612楼主2023/8/19 13:01
#include<bits/stdc++.h>
using namespace std;
int main(){
	int x,y;
	cin>>x>>y;
	int a[x][y],b[x][y],c[x][y];
	for(int i=0;i<x;i++){
		for(int j=0;j<x;j++){
			cin>>a[i][j];
		}
	}
	for(int i=0;i<x;i++){
		for(int j=0;j<x;j++){
			cin>>b[i][j];
		}
	}
	for(int i=0;i<x;i++){
		for(int j=0;j<x;j++){
			c[i][j]=a[i][j]+b[i][j];
		}
	}
	for(int i=0;i<x;i++){
		for(int j=0;j<x;j++){
			cout<<c[i][j]<<" ";
		}
		cout<<endl;
	}
	return 0;
}
2023/8/19 13:01
加载中...