Submission #984587

#TimeUsernameProblemLanguageResultExecution timeMemory
984587SzymonKrzywdaCave (IOI13_cave)C++17
Compilation error
0 ms0 KiB
#include <bits/stdc++.h>
using namespace std;


int tryCombination(int S[]);

void answer(int S[],int D[]);

void exploreCave(int N){
    int S[N];
    int D[N];
    int w = 0;
    while (w != -1){
        w = tryCombination(S);
        if (w != -1) S[w] = 1;
    }
    
    for (int i=0; i<N; i++){
        S[i] = (S[i]+1)%2;
        D[i] = tryCombination(S);
        S[i] = (S[i]+1)%2;
    }
    
    answer(S,D);
}

Compilation message (stderr)

/usr/bin/ld: /tmp/ccmV0oa7.o: in function `main':
grader.c:(.text.startup+0x10): undefined reference to `exploreCave'
/usr/bin/ld: /tmp/ccOzjtaa.o: in function `exploreCave(int)':
cave.cpp:(.text+0xbc): undefined reference to `tryCombination(int*)'
/usr/bin/ld: cave.cpp:(.text+0xd6): undefined reference to `tryCombination(int*)'
/usr/bin/ld: cave.cpp:(.text+0x10b): undefined reference to `tryCombination(int*)'
/usr/bin/ld: cave.cpp:(.text+0x13a): undefined reference to `answer(int*, int*)'
collect2: error: ld returned 1 exit status