Submission #1339002

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

typedef long long ll;
#define endl '\n'
#define pb push_back
#define ff first
#define ss second
#define all(a) a.begin(),a.end()

int n;
const int maxN=5000 + 15;
int a[maxN],b[maxN];
int con[maxN];

int tryCombination(int s[]);
void answer(int S[],int D[]);
void exploreCave(int N){
    //subtask 1
    int d[n];
    for(int i=0;i<n;i++) d[i]=i;
    int s[n]={0};
    for(int i=0;i<n;i++){
        int combi[n];
        for(int j=0;j<n;j++){
            if(j<i) combi[j]=s[j];
            else if(j==i) combi[j]=1;
            else combi[j]=0;
        }
        int see=tryCombination(combi);
        if(see==-1){
            answer(combi,d);
            return ;
        }
        if(see==i) s[i]=0;
        else s[i]=1;
    }
    answer(s,d);
}

Compilation message (stderr)

/usr/bin/ld: /tmp/ccUUMEPR.o: in function `main':
grader.c:(.text.startup+0x10): undefined reference to `exploreCave'
/usr/bin/ld: /tmp/ccIHBtFz.o: in function `exploreCave(int)':
cave.cpp:(.text+0x1d4): undefined reference to `tryCombination(int*)'
/usr/bin/ld: cave.cpp:(.text+0x273): undefined reference to `answer(int*, int*)'
/usr/bin/ld: cave.cpp:(.text+0x2a1): undefined reference to `answer(int*, int*)'
collect2: error: ld returned 1 exit status