Submission #1310678

#TimeUsernameProblemLanguageResultExecution timeMemory
1310678ninogogatishviliCave (IOI13_cave)C++20
Compilation error
0 ms0 KiB
void exploreCave(int N) {
    int S[N];
    int D[N];

    for (int i = 0; i < N; i++) {
        S[i] = 0;
    }
    int closedDoor = tryCombination(S);
    
    if (closedDoor != -1) {
        for (int i = 0; i < N; i++) {
            S[i] = 1;
            closedDoor = tryCombination(S);
            if (closedDoor != -1) {
                D[i] = closedDoor;
            }
        }
    }
    
    for (int i = 0; i < N; i++) {
        S[i] = 1;
    }

    answer(S, D);
}

Compilation message (stderr)

cave.cpp: In function 'void exploreCave(int)':
cave.cpp:8:22: error: 'tryCombination' was not declared in this scope
    8 |     int closedDoor = tryCombination(S);
      |                      ^~~~~~~~~~~~~~
cave.cpp:24:5: error: 'answer' was not declared in this scope
   24 |     answer(S, D);
      |     ^~~~~~