# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
29840 | 2017-07-21T08:20:40 Z | ozaslan | Cave (IOI13_cave) | C++14 | 218 ms | 512 KB |
#include "cave.h" #define max_N 5005 int kul[max_N], S[max_N], D[max_N]; void exploreCave(int N) { for (int i = 0; i < N; i++) { int kapi = tryCombination(S); if (kapi == -1) { for (int j = 0; j < N; j++) if (!kul[j]) { S[j] = 1; kapi = tryCombination(S); if (kapi == i) { S[j] = 0; D[j] = i; kul[j] = 1; break; } else S[j] = 0; } } else if (kapi > i) for (int j = 0; j < N; j++) if (!kul[j]) { S[j] = 1; kapi = tryCombination(S); if (kapi == i) { S[j] = 0; D[j] = i; kul[j] = 1; break; } else S[j] = 0; } else for (int j = 0; j < N; j++) if (!kul[j]) { S[j] = 1; kapi = tryCombination(S); if (kapi > i) { D[j] = i; kul[j] = 1; break; } else S[j] = 0; } } answer(S, D); }
Compilation message
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 6 ms | 512 KB | Answer is wrong |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 75 ms | 512 KB | Output is correct |
2 | Correct | 5 ms | 512 KB | Output is correct |
3 | Incorrect | 218 ms | 468 KB | too much calls on tryCombination() |
4 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 5 ms | 512 KB | Output is correct |
2 | Incorrect | 5 ms | 384 KB | Answer is wrong |
3 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 5 ms | 512 KB | Output is correct |
2 | Incorrect | 5 ms | 384 KB | Answer is wrong |
3 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 6 ms | 512 KB | Answer is wrong |
2 | Halted | 0 ms | 0 KB | - |