# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
390863 |
2021-04-17T09:07:30 Z |
jampm |
Cave (IOI13_cave) |
C++17 |
|
63 ms |
416 KB |
#include "cave.h"
void exploreCave(int N) {
int S[N], D[N]; int last = 0;
for (int i = 0; i < N; i++) S[i] = 0;
while (last != -1) {
last = tryCombination(S);
for (int i = 0; i < N; i++) {
S[i] = (S[i] - 1)*(S[i] - 1);
int aux = tryCombination(S);
if (aux > last || aux == -1) {
last = aux;
break;
}
S[i] = (S[i] - 1)*(S[i] - 1);
}
}
for (int i = 0; i < N; i++) {
S[i] = (S[i] - 1)*(S[i] - 1);
D[i] = tryCombination(S);
S[i] = (S[i] - 1)*(S[i] - 1);
}
answer(S, D);
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
63 ms |
416 KB |
too much calls on tryCombination() |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
14 ms |
372 KB |
Output is correct |
2 |
Correct |
0 ms |
204 KB |
Output is correct |
3 |
Correct |
14 ms |
332 KB |
Output is correct |
4 |
Correct |
1 ms |
204 KB |
Output is correct |
5 |
Correct |
1 ms |
204 KB |
Output is correct |
6 |
Correct |
14 ms |
372 KB |
Output is correct |
7 |
Correct |
19 ms |
332 KB |
Output is correct |
8 |
Correct |
18 ms |
332 KB |
Output is correct |
9 |
Correct |
17 ms |
368 KB |
Output is correct |
10 |
Correct |
17 ms |
368 KB |
Output is correct |
11 |
Correct |
14 ms |
372 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
204 KB |
Output is correct |
2 |
Correct |
1 ms |
208 KB |
Output is correct |
3 |
Correct |
1 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 |
1 ms |
204 KB |
Output is correct |
7 |
Correct |
1 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 |
Correct |
1 ms |
204 KB |
Output is correct |
12 |
Correct |
1 ms |
204 KB |
Output is correct |
13 |
Correct |
1 ms |
204 KB |
Output is correct |
14 |
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 |
1 ms |
208 KB |
Output is correct |
3 |
Correct |
1 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 |
1 ms |
204 KB |
Output is correct |
7 |
Correct |
1 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 |
Correct |
1 ms |
204 KB |
Output is correct |
12 |
Correct |
1 ms |
204 KB |
Output is correct |
13 |
Correct |
1 ms |
204 KB |
Output is correct |
14 |
Correct |
1 ms |
204 KB |
Output is correct |
15 |
Correct |
0 ms |
204 KB |
Output is correct |
16 |
Correct |
0 ms |
204 KB |
Output is correct |
17 |
Correct |
0 ms |
204 KB |
Output is correct |
18 |
Correct |
0 ms |
204 KB |
Output is correct |
19 |
Correct |
0 ms |
204 KB |
Output is correct |
20 |
Incorrect |
3 ms |
204 KB |
too much calls on tryCombination() |
21 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
63 ms |
416 KB |
too much calls on tryCombination() |
2 |
Halted |
0 ms |
0 KB |
- |