# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
536548 | 2022-03-13T13:52:38 Z | rainboy | 허수아비 (JOI14_scarecrows) | C | 58 ms | 340 KB |
#include <stdio.h> #define N 400 int main() { static int xx[N], yy[N]; int n, i, j, k, cnt; scanf("%d", &n); for (i = 0; i < n; i++) scanf("%d%d", &xx[i], &yy[i]); cnt = 0; for (i = 0; i < n; i++) for (j = i + 1; j < n; j++) { if ((xx[i] < xx[j]) != (yy[i] < yy[j])) continue; cnt++; for (k = 0; k < n; k++) if (k != i && k != j && (xx[i] < xx[k]) != (xx[j] < xx[k]) && (yy[i] < yy[k]) != (yy[j] < yy[k])) { cnt--; break; } } printf("%d\n", cnt); return 0; }
Compilation message
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 58 ms | 260 KB | Output is correct |
2 | Correct | 8 ms | 212 KB | Output is correct |
3 | Correct | 7 ms | 212 KB | Output is correct |
4 | Correct | 3 ms | 292 KB | Output is correct |
5 | Correct | 5 ms | 296 KB | Output is correct |
6 | Correct | 7 ms | 212 KB | Output is correct |
7 | Correct | 1 ms | 212 KB | Output is correct |
8 | Correct | 13 ms | 212 KB | Output is correct |
9 | Correct | 9 ms | 296 KB | Output is correct |
10 | Correct | 2 ms | 296 KB | Output is correct |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Runtime error | 1 ms | 340 KB | Execution killed with signal 11 |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Runtime error | 1 ms | 340 KB | Execution killed with signal 11 |
2 | Halted | 0 ms | 0 KB | - |