# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
486425 | rainboy | Dijamant (COI16_dijament) | C11 | 840 ms | 404 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <stdio.h>
#include <string.h>
#define N 1000
char ss[N][16]; int n;
int idx(char *s) {
int i;
for (i = 0; i < n; i++)
if (strcmp(ss[i], s) == 0)
return i;
return -1;
}
void add(char *s) {
strcpy(ss[n++], s);
}
int main() {
int q;
scanf("%d", &q);
while (q--) {
static char cc[16], pp[16];
int ok;
scanf("%s%*s", cc);
ok = 1;
while (1) {
scanf("%s", pp);
if (pp[0] == ';')
break;
if (idx(pp) == -1)
ok = 0;
}
if (idx(cc) != -1)
ok = 0;
if (ok) {
printf("ok\n");
add(cc);
} else
printf("greska\n");
}
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... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |