80分,求改#1,#2WA
  • 板块P3397 地毯
  • 楼主a1234a
  • 当前回复0
  • 已保存回复0
  • 发布时间2024/12/18 16:30
  • 上次更新2024/12/18 20:34:05
查看原帖
80分,求改#1,#2WA
1426928
a1234a楼主2024/12/18 16:30
#include <bits/stdc++.h>
using namespace std;
long long a[1005][1005];
long long n, m, x, y, x2,y2;
int main()
{
    cin >> n >> m;
    while (n--){
        cin >> x >> y >> x2 >> y2;
        for (int i = x; i <= x2; i++)
            a[i][y]++, a[i][y2 + 1]--;
    }
    for (int i = 1; i <= m; i++){
        for (int j = 1; j <= m; j++){
            a[i][j] += a[i][j - 1];
            cout << a[i][j] << " ";
        }
        cout << endl;
    }
    return 0;
}
2024/12/18 16:30
加载中...