# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
536547 | rainboy | 허수아비 (JOI14_scarecrows) | C11 | 5 ms | 424 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include <stdio.h>
#define N 200
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 (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |