0pts但找不出哪错,求助
  • 板块P3397 地毯
  • 楼主darksea
  • 当前回复2
  • 已保存回复2
  • 发布时间2025/2/6 21:07
  • 上次更新2025/2/7 09:44:33
查看原帖
0pts但找不出哪错,求助
1455258
darksea楼主2025/2/6 21:07
#include <bits/stdc++.h>
using namespace std;
int n,m;
int a[1001][1001];
int main() {
	cin>>n>>m;
	while(m --){
		int x1,x2,y1,y2;
		cin>>x1>>y1>>x2>>y2;
		for(int i = x1; i <= x2; i++) {
			for(int j = y1; j <= y2; j++){
				++a[i][j];
			}
		}
	}
	for(int i = 1; i <= n; i++){
		for(int j = 1; j <= n; j++){
			cout<<a[i][j]<<' ';
		}
		cout<<endl;
	}
	return 0;
}
2025/2/6 21:07
加载中...