Submission #72698

# Submission time Handle Problem Language Result Execution time Memory
72698 2018-08-26T15:48:24 Z RezwanArefin01 Cave (IOI13_cave) C++17
25 / 100
27 ms 620 KB
#include <bits/stdc++.h>
#include "cave.h"
using namespace std; 

void exploreCave(int N) {
    int S[N], D[N];
    memset(S, 0, sizeof S); 
    if(tryCombination(S) == -1) {
        for(int i = 0; i < N; i++) {
            S[i] = 1; 
            D[i] = tryCombination(S); 
            S[i] = 0; 
        } answer(S, D); 
    }
    for(int i = 0; i < N; i++) {
        int x = tryCombination(S); 
        if(x == -1) break; 
        if(x <= i) S[i] ^= 1; 
    }
    for(int i = 0; i < N; i++) 
        D[i] = i; 
    answer(S, D); 
}
# Verdict Execution time Memory Grader output
1 Correct 18 ms 468 KB Output is correct
2 Correct 16 ms 512 KB Output is correct
3 Correct 23 ms 608 KB Output is correct
4 Correct 13 ms 476 KB Output is correct
5 Correct 24 ms 512 KB Output is correct
6 Correct 20 ms 512 KB Output is correct
7 Correct 27 ms 384 KB Output is correct
8 Correct 5 ms 384 KB Output is correct
9 Correct 5 ms 384 KB Output is correct
10 Correct 6 ms 384 KB Output is correct
11 Correct 5 ms 384 KB Output is correct
12 Correct 17 ms 512 KB Output is correct
13 Correct 23 ms 384 KB Output is correct
14 Correct 17 ms 384 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 22 ms 384 KB Output is correct
2 Correct 5 ms 512 KB Output is correct
3 Correct 24 ms 384 KB Output is correct
4 Correct 5 ms 452 KB Output is correct
5 Correct 5 ms 384 KB Output is correct
6 Correct 23 ms 420 KB Output is correct
7 Correct 16 ms 384 KB Output is correct
8 Correct 25 ms 620 KB Output is correct
9 Correct 24 ms 620 KB Output is correct
10 Correct 20 ms 384 KB Output is correct
11 Correct 22 ms 492 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 6 ms 512 KB Output is correct
2 Correct 5 ms 452 KB Output is correct
3 Correct 6 ms 512 KB Output is correct
4 Correct 6 ms 512 KB Output is correct
5 Incorrect 5 ms 512 KB Answer is wrong
6 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 6 ms 512 KB Output is correct
2 Correct 5 ms 452 KB Output is correct
3 Correct 6 ms 512 KB Output is correct
4 Correct 6 ms 512 KB Output is correct
5 Incorrect 5 ms 512 KB Answer is wrong
6 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 18 ms 468 KB Output is correct
2 Correct 16 ms 512 KB Output is correct
3 Correct 23 ms 608 KB Output is correct
4 Correct 13 ms 476 KB Output is correct
5 Correct 24 ms 512 KB Output is correct
6 Correct 20 ms 512 KB Output is correct
7 Correct 27 ms 384 KB Output is correct
8 Correct 5 ms 384 KB Output is correct
9 Correct 5 ms 384 KB Output is correct
10 Correct 6 ms 384 KB Output is correct
11 Correct 5 ms 384 KB Output is correct
12 Correct 17 ms 512 KB Output is correct
13 Correct 23 ms 384 KB Output is correct
14 Correct 17 ms 384 KB Output is correct
15 Correct 22 ms 384 KB Output is correct
16 Correct 5 ms 512 KB Output is correct
17 Correct 24 ms 384 KB Output is correct
18 Correct 5 ms 452 KB Output is correct
19 Correct 5 ms 384 KB Output is correct
20 Correct 23 ms 420 KB Output is correct
21 Correct 16 ms 384 KB Output is correct
22 Correct 25 ms 620 KB Output is correct
23 Correct 24 ms 620 KB Output is correct
24 Correct 20 ms 384 KB Output is correct
25 Correct 22 ms 492 KB Output is correct
26 Correct 6 ms 512 KB Output is correct
27 Correct 5 ms 452 KB Output is correct
28 Correct 6 ms 512 KB Output is correct
29 Correct 6 ms 512 KB Output is correct
30 Incorrect 5 ms 512 KB Answer is wrong
31 Halted 0 ms 0 KB -