| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
|---|---|---|---|---|---|---|---|
| 490926 | rainboy | Izlet (COI19_izlet) | C11 | 666 ms | 53068 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <stdio.h>
#define N 3000
int main() {
static int kk[N][N], cc[N], ii[N];
int n, n_, h, i, j, s, c;
scanf("%d%d", &s, &n);
if (s != 1)
return 0;
for (i = 0; i < n; i++)
for (j = 0; j < n; j++)
scanf("%d", &kk[i][j]);
n_ = 0;
for (i = 0, c = 1; i < n; i++) {
if (cc[i])
continue;
cc[i] = c, ii[n_++] = i;
for (j = i + 1; j < n; j++)
if (kk[i][j] == 1)
cc[j] = c, ii[n_++] = j;
c ^= 3;
}
for (i = 0; i < n; i++)
printf("%d ", cc[i]);
printf("\n");
for (h = 0; h < n - 1; h++)
printf("%d %d\n", ii[h] + 1, ii[h + 1] + 1);
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... | ||||
