qjxqjx @ 2021-09-11 12:14:45
#include<iomanip>
#include<stdio.h>
#include<cstdio>
#include<map>
#include<windows.h>
#include<queue>
#include<stack>
#include<cstring>
#include<algorithm>
#include<cmath>
#include<cstdlib>
#include<ctime>
#include<string>
#define LL long long>
using namespace std;
const LL MAXN=1010;
LL n;
LL m;
LL a[MAXN][MAXN];
int main()
{
scanf("%d%d",&n,&m);
for(int i=1;i<=m;i++)
{
int x,y,x2,y2;
scanf("%d%d%d%d",&x,&y,&x2,&y2);
for(int j=x;j<=x2;j++)
{
for(int k=y;k<=y2;k++)
{
a[j][k]++;
}
}
}
for(int i=1;i<=n;i++)
{
for(int j=1;j<=n;j++)
{
printf("%d ",a[i][j]);
}
printf("\n");
}
return 0;
}
求求求求求助助助助助
by HL_Lee4974 @ 2021-10-09 16:12:15
咋不用差分