# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
486405 | 2021-11-11T15:06:41 Z | rainboy | Dijamant (COI16_dijament) | C | 38 ms | 332 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; strcpy(ss[n], s); return n++; } int main() { int q; scanf("%d", &q); while (q--) { static char cc[16], pp[16]; int n_; scanf("%s%*s", cc); while (1) { scanf("%s", pp); if (pp[0] == ';') break; } n_ = n; idx(cc); printf(n != n_ ? "ok\n" : "greska\n"); } return 0; }
Compilation message
# | Verdict | Execution time | Memory | 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 | 1 ms | 204 KB | Output is correct |
# | Verdict | Execution time | Memory | 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 | 1 ms | 204 KB | Output is correct |
5 | Correct | 0 ms | 204 KB | Output is correct |
6 | Correct | 1 ms | 204 KB | Output is correct |
7 | Incorrect | 1 ms | 204 KB | Output isn't correct |
8 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | 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 | 1 ms | 204 KB | Output is correct |
5 | Correct | 0 ms | 204 KB | Output is correct |
6 | Correct | 1 ms | 204 KB | Output is correct |
7 | Incorrect | 1 ms | 204 KB | Output isn't correct |
8 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 38 ms | 332 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |