# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1045522 | 2024-08-06T04:56:31 Z | 15분 56초! 15분 57초!(#11072) | Cell Automaton (JOI23_cell) | C++17 | 8000 ms | 1116 KB |
#include <bits/stdc++.h> using namespace std; int n,q; typedef pair<int,int> P; P arr[100000]; int save[355]; int main() { scanf("%d %d",&n,&q); for(int i=0;i<n;i++) { int x,y; scanf("%d %d",&x,&y); arr[i]=P(x,y); } for(int x=-150;x<=150;x++) { for(int y=-150;y<=150;y++) { int ret=1e9; for(int i=0;i<n;i++) { ret=min(ret,abs(x-arr[i].first)+abs(y-arr[i].second)); } save[ret]++; } } for(int i=0;i<q;i++) { int t; scanf("%d",&t); printf("%d\n",save[t]); } return 0; }
Compilation message
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 1 ms | 348 KB | Output is correct |
2 | Correct | 2 ms | 348 KB | Output is correct |
3 | Correct | 5 ms | 348 KB | Output is correct |
4 | Correct | 5 ms | 444 KB | Output is correct |
5 | Correct | 1 ms | 348 KB | Output is correct |
6 | Correct | 2 ms | 444 KB | Output is correct |
7 | Correct | 2 ms | 348 KB | Output is correct |
8 | Correct | 986 ms | 568 KB | Output is correct |
9 | Correct | 5 ms | 348 KB | Output is correct |
10 | Correct | 7 ms | 348 KB | Output is correct |
11 | Correct | 5 ms | 444 KB | Output is correct |
12 | Correct | 89 ms | 348 KB | Output is correct |
13 | Correct | 114 ms | 348 KB | Output is correct |
14 | Correct | 92 ms | 344 KB | Output is correct |
15 | Correct | 92 ms | 436 KB | Output is correct |
16 | Correct | 0 ms | 348 KB | Output is correct |
17 | Correct | 0 ms | 348 KB | Output is correct |
18 | Correct | 0 ms | 348 KB | Output is correct |
19 | Correct | 0 ms | 604 KB | Output is correct |
20 | Correct | 1 ms | 344 KB | Output is correct |
21 | Correct | 1 ms | 348 KB | Output is correct |
22 | Correct | 1 ms | 348 KB | Output is correct |
23 | Correct | 1 ms | 348 KB | Output is correct |
24 | Correct | 1 ms | 604 KB | Output is correct |
25 | Correct | 1 ms | 444 KB | Output is correct |
26 | Correct | 1 ms | 348 KB | Output is correct |
27 | Correct | 1 ms | 348 KB | Output is correct |
28 | Correct | 1 ms | 348 KB | Output is correct |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 1 ms | 348 KB | Output is correct |
2 | Correct | 2 ms | 348 KB | Output is correct |
3 | Correct | 5 ms | 348 KB | Output is correct |
4 | Correct | 5 ms | 444 KB | Output is correct |
5 | Correct | 1 ms | 348 KB | Output is correct |
6 | Correct | 2 ms | 444 KB | Output is correct |
7 | Correct | 2 ms | 348 KB | Output is correct |
8 | Correct | 986 ms | 568 KB | Output is correct |
9 | Correct | 5 ms | 348 KB | Output is correct |
10 | Correct | 7 ms | 348 KB | Output is correct |
11 | Correct | 5 ms | 444 KB | Output is correct |
12 | Correct | 89 ms | 348 KB | Output is correct |
13 | Correct | 114 ms | 348 KB | Output is correct |
14 | Correct | 92 ms | 344 KB | Output is correct |
15 | Correct | 92 ms | 436 KB | Output is correct |
16 | Correct | 0 ms | 348 KB | Output is correct |
17 | Correct | 0 ms | 348 KB | Output is correct |
18 | Correct | 0 ms | 348 KB | Output is correct |
19 | Correct | 0 ms | 604 KB | Output is correct |
20 | Correct | 1 ms | 344 KB | Output is correct |
21 | Correct | 1 ms | 348 KB | Output is correct |
22 | Correct | 1 ms | 348 KB | Output is correct |
23 | Correct | 1 ms | 348 KB | Output is correct |
24 | Correct | 1 ms | 604 KB | Output is correct |
25 | Correct | 1 ms | 444 KB | Output is correct |
26 | Correct | 1 ms | 348 KB | Output is correct |
27 | Correct | 1 ms | 348 KB | Output is correct |
28 | Correct | 1 ms | 348 KB | Output is correct |
29 | Incorrect | 2 ms | 600 KB | Output isn't correct |
30 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Execution timed out | 8061 ms | 1116 KB | Time limit exceeded |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Execution timed out | 8061 ms | 1116 KB | Time limit exceeded |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Runtime error | 181 ms | 444 KB | Execution killed with signal 11 |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Runtime error | 181 ms | 444 KB | Execution killed with signal 11 |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 1 ms | 348 KB | Output is correct |
2 | Correct | 2 ms | 348 KB | Output is correct |
3 | Correct | 5 ms | 348 KB | Output is correct |
4 | Correct | 5 ms | 444 KB | Output is correct |
5 | Correct | 1 ms | 348 KB | Output is correct |
6 | Correct | 2 ms | 444 KB | Output is correct |
7 | Correct | 2 ms | 348 KB | Output is correct |
8 | Correct | 986 ms | 568 KB | Output is correct |
9 | Correct | 5 ms | 348 KB | Output is correct |
10 | Correct | 7 ms | 348 KB | Output is correct |
11 | Correct | 5 ms | 444 KB | Output is correct |
12 | Correct | 89 ms | 348 KB | Output is correct |
13 | Correct | 114 ms | 348 KB | Output is correct |
14 | Correct | 92 ms | 344 KB | Output is correct |
15 | Correct | 92 ms | 436 KB | Output is correct |
16 | Correct | 0 ms | 348 KB | Output is correct |
17 | Correct | 0 ms | 348 KB | Output is correct |
18 | Correct | 0 ms | 348 KB | Output is correct |
19 | Correct | 0 ms | 604 KB | Output is correct |
20 | Correct | 1 ms | 344 KB | Output is correct |
21 | Correct | 1 ms | 348 KB | Output is correct |
22 | Correct | 1 ms | 348 KB | Output is correct |
23 | Correct | 1 ms | 348 KB | Output is correct |
24 | Correct | 1 ms | 604 KB | Output is correct |
25 | Correct | 1 ms | 444 KB | Output is correct |
26 | Correct | 1 ms | 348 KB | Output is correct |
27 | Correct | 1 ms | 348 KB | Output is correct |
28 | Correct | 1 ms | 348 KB | Output is correct |
29 | Incorrect | 2 ms | 600 KB | Output isn't correct |
30 | Halted | 0 ms | 0 KB | - |