感觉是入门题,数据出水了?
代码:
#include <iostream>
using namespace std;
#define int long long
int carpet[1010][1010];
int qzh[1010][1010];
int n,m,x1,x2,y1,y2;
signed main(){
cin>>n>>m;
for(int i=1;i<=m;i++){
cin>>x1>>y1>>x2>>y2;
for(int ii=x1;ii<=x2;ii++){
for(int jj=y1;jj<=y2;jj++){
carpet[ii][jj]++;
}
}
}
for(int i=1;i<=n;i++){
for(int j=1;j<=n;j++){
cout<<carpet[i][j]<<' ';
}
cout<<endl;
}
return 0;
}