# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
813908 | 2023-08-08T04:30:43 Z | 반딧불(#10119) | Posters on the wall (CPSPC17_posters) | C++17 | 177 ms | 98100 KB |
#include <bits/stdc++.h> using namespace std; typedef long long ll; int n, q, MOD; int arr[5002][5002]; int main(){ scanf("%d %d %d %d %d", &n, &q, &n, &q, &MOD); for(int i=1; i<=n; i++){ int x1, y1, x2, y2; scanf("%d %d %d %d", &x1, &y1, &x2, &y2); if(x1>x2) swap(x1, x2); if(y1>y2) swap(y1, y2); arr[x1][y1]++, arr[x1][y2]--; arr[x2][y1]--, arr[x2][y2]++; } for(int i=1; i<=5000; i++) for(int j=1; j<=5000; j++) arr[i][j] += arr[i][j-1] + arr[i-1][j] - arr[i-1][j-1]; for(int i=1; i<=5000; i++) for(int j=1; j<=5000; j++) arr[i][j] += arr[i][j-1] + arr[i-1][j] - arr[i-1][j-1]; for(int i=1; i<=q; i++){ int x1, y1, x2, y2, v; scanf("%d %d %d %d %d", &x1, &y1, &x2, &y2, &v); if(x1>x2) swap(x1, x2); if(y1>y2) swap(y1, y2); x2--, y2--; printf("%d\n", arr[x2][y2] - arr[x2][y1-1] - arr[x1-1][y2] + arr[x1-1][y1-1]); } }
Compilation message
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 177 ms | 98100 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 177 ms | 98100 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 177 ms | 98100 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 177 ms | 98100 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 177 ms | 98100 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Runtime error | 2 ms | 340 KB | Execution killed with signal 11 |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Runtime error | 2 ms | 340 KB | Execution killed with signal 11 |
2 | Halted | 0 ms | 0 KB | - |