You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
23 lines
476 B
23 lines
476 B
#include <bits/stdc++.h>
|
|
|
|
using namespace std;
|
|
const int N = 1010;
|
|
int b[N][N];
|
|
int n, m;
|
|
|
|
int main() {
|
|
cin >> n >> m;
|
|
while (m--) {
|
|
int x1, y1, x2, y2;
|
|
cin >> x1 >> y1 >> x2 >> y2;
|
|
for (int i = x1; i <= x2; i++)
|
|
for (int j = y1; j <= y2; ++j)
|
|
b[i][j]++;
|
|
}
|
|
|
|
for (int i = 1; i <= n; i++, puts(""))
|
|
for (int j = 1; j <= n; j++)
|
|
printf("%d ", b[i][j]);
|
|
|
|
return 0;
|
|
} |