求调
  • 板块灌水区
  • 楼主Juice_Jiouge
  • 当前回复4
  • 已保存回复4
  • 发布时间2025/1/3 18:55
  • 上次更新2025/1/3 19:07:21
查看原帖
求调
711650
Juice_Jiouge楼主2025/1/3 18:55

https://www.luogu.com.cn/problem/P3397

#include<bits/stdc++.h>
using namespace std;
int n,m,tab[1008][1008]; 
int main()
{
    cin>>n>>m;
    for(int i=1;i<=m;i++)
    {
        int ax,ay,bx,by;
        cin>>ax>>ay>>bx>>by;
        for(int j=ax;j<=bx;j++)
        {
            tab[j][ay]++;
            tab[j][by+1]--;
        }
    }
    for(int i=1;i<=n;i++)
    {
        for(int j=1;j<=n;j++)
        {
            tab[i][j]=tab[i][j]+tab[i][j-1];
            cout<<tab[i][j]<<" ";
        }
        cout<<endl;
    }
    return 0;
}
2025/1/3 18:55
加载中...