Submission #1008412

# Submission time Handle Problem Language Result Execution time Memory
1008412 2024-06-26T11:49:41 Z VMaksimoski008 Cave (IOI13_cave) C++17
12 / 100
17 ms 712 KB
#include "cave.h"
#include <bits/stdc++.h>
using namespace std;

void exploreCave(int n) {
    int S[n], D[n];
    memset(S, 0, sizeof(S));
    memset(D, 0, sizeof(D));

    for(int i=0; i<n; i++) {
        for(int j=0; j<2; j++) {
            S[i] ^= 1;
            int p = tryCombination(S);
            if(p > i || p == -1) break;
            S[i] ^= 1;
        }
    }

    for(int i=0; i<n; i++) D[i] = i;
    answer(S, D);
}
# Verdict Execution time Memory Grader output
1 Correct 10 ms 348 KB Output is correct
2 Correct 6 ms 548 KB Output is correct
3 Correct 7 ms 560 KB Output is correct
4 Correct 5 ms 504 KB Output is correct
5 Correct 17 ms 712 KB Output is correct
6 Correct 10 ms 344 KB Output is correct
7 Correct 17 ms 344 KB Output is correct
8 Correct 1 ms 348 KB Output is correct
9 Correct 0 ms 348 KB Output is correct
10 Correct 0 ms 348 KB Output is correct
11 Correct 0 ms 600 KB Output is correct
12 Correct 11 ms 560 KB Output is correct
13 Correct 11 ms 564 KB Output is correct
14 Correct 12 ms 452 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 16 ms 344 KB Output is correct
2 Correct 0 ms 348 KB Output is correct
3 Incorrect 11 ms 556 KB Answer is wrong
4 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 1 ms 348 KB Output is correct
2 Correct 0 ms 348 KB Output is correct
3 Incorrect 1 ms 348 KB Answer is wrong
4 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 1 ms 348 KB Output is correct
2 Correct 0 ms 348 KB Output is correct
3 Incorrect 1 ms 348 KB Answer is wrong
4 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 10 ms 348 KB Output is correct
2 Correct 6 ms 548 KB Output is correct
3 Correct 7 ms 560 KB Output is correct
4 Correct 5 ms 504 KB Output is correct
5 Correct 17 ms 712 KB Output is correct
6 Correct 10 ms 344 KB Output is correct
7 Correct 17 ms 344 KB Output is correct
8 Correct 1 ms 348 KB Output is correct
9 Correct 0 ms 348 KB Output is correct
10 Correct 0 ms 348 KB Output is correct
11 Correct 0 ms 600 KB Output is correct
12 Correct 11 ms 560 KB Output is correct
13 Correct 11 ms 564 KB Output is correct
14 Correct 12 ms 452 KB Output is correct
15 Correct 16 ms 344 KB Output is correct
16 Correct 0 ms 348 KB Output is correct
17 Incorrect 11 ms 556 KB Answer is wrong
18 Halted 0 ms 0 KB -