# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
536547 | rainboy | 허수아비 (JOI14_scarecrows) | C11 | 5 ms | 424 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#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;
}
컴파일 시 표준 에러 (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... |