# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
486425 | 2021-11-11T16:15:39 Z | rainboy | Dijamant (COI16_dijament) | C | 840 ms | 404 KB |
#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; }
Compilation message
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 0 ms | 204 KB | Output is correct |
2 | Correct | 0 ms | 204 KB | Output is correct |
3 | Correct | 0 ms | 204 KB | Output is correct |
4 | Correct | 0 ms | 204 KB | Output is correct |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 0 ms | 204 KB | Output is correct |
2 | Correct | 0 ms | 204 KB | Output is correct |
3 | Correct | 0 ms | 204 KB | Output is correct |
4 | Correct | 0 ms | 204 KB | Output is correct |
5 | Correct | 0 ms | 204 KB | Output is correct |
6 | Correct | 2 ms | 204 KB | Output is correct |
7 | Correct | 2 ms | 204 KB | Output is correct |
8 | Correct | 1 ms | 204 KB | Output is correct |
9 | Correct | 1 ms | 204 KB | Output is correct |
10 | Correct | 1 ms | 204 KB | Output is correct |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 0 ms | 204 KB | Output is correct |
2 | Correct | 0 ms | 204 KB | Output is correct |
3 | Correct | 0 ms | 204 KB | Output is correct |
4 | Correct | 0 ms | 204 KB | Output is correct |
5 | Correct | 0 ms | 204 KB | Output is correct |
6 | Correct | 2 ms | 204 KB | Output is correct |
7 | Correct | 2 ms | 204 KB | Output is correct |
8 | Correct | 1 ms | 204 KB | Output is correct |
9 | Correct | 1 ms | 204 KB | Output is correct |
10 | Correct | 1 ms | 204 KB | Output is correct |
11 | Incorrect | 0 ms | 204 KB | Output isn't correct |
12 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Incorrect | 840 ms | 404 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |