# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1045524 | 2024-08-06T05:06:08 Z | 김은성(#11014) | Cell Automaton (JOI23_cell) | C++17 | 3111 ms | 1200 KB |
#include <bits/stdc++.h> using namespace std; int x[100009], y[100009], ans[100009]; int main(){ int n, i, j, k, q; scanf("%d %d", &n, &q); for(i=1; i<=n; i++){ scanf("%d %d", &x[i], &y[i]); } for(i=-60; i<=110; i++){ for(j=-60; j<=110; j++){ int mn = 1523523333; for(int l=1; l<=n; l++){ mn = min(mn, abs(i - x[l]) + abs(j - y[l])); } ans[mn]++; } } while(q--){ int t; scanf("%d", &t); printf("%d\n", ans[t]); } return 0; }
Compilation message
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 1 ms | 344 KB | Output is correct |
2 | Correct | 1 ms | 348 KB | Output is correct |
3 | Incorrect | 2 ms | 348 KB | Output isn't correct |
4 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 1 ms | 344 KB | Output is correct |
2 | Correct | 1 ms | 348 KB | Output is correct |
3 | Incorrect | 2 ms | 348 KB | Output isn't correct |
4 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 3111 ms | 1200 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 3111 ms | 1200 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Runtime error | 66 ms | 344 KB | Execution killed with signal 11 |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Runtime error | 66 ms | 344 KB | Execution killed with signal 11 |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 1 ms | 344 KB | Output is correct |
2 | Correct | 1 ms | 348 KB | Output is correct |
3 | Incorrect | 2 ms | 348 KB | Output isn't correct |
4 | Halted | 0 ms | 0 KB | - |