Submission #1083095

# Submission time Handle Problem Language Result Execution time Memory
1083095 2024-09-02T13:55:34 Z erdemfurkan Cave (IOI13_cave) C++14
0 / 100
1 ms 348 KB
#include "cave.h"
#include <algorithm> 

void exploreCave(int N) {
    int S[N] = {};
    int D[N];
    int prev = tryCombination(S);
    for(int i = 0; i < N; i++) {
        S[i] = !S[i];
        int x = tryCombination(S);
        if(x == -1) {
            break;
        } else {
            if(x < prev) {
                S[i] = !S[i];
            }
        }
    }
    for(int i = 0; i < N; i++) {
        S[i] = !S[i];
        int x = tryCombination(S);
        D[i] = x;
        S[i] = !S[i];
    }
    answer(S,D);
}
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 344 KB Answer is wrong
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 348 KB Answer is wrong
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 348 KB Answer is wrong
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 348 KB Answer is wrong
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 344 KB Answer is wrong
2 Halted 0 ms 0 KB -