Submission #1290371

#TimeUsernameProblemLanguageResultExecution timeMemory
1290371islam_2010Gondola (IOI14_gondola)C++20
Compilation error
0 ms0 KiB
// #include "race.h"
#include <bits/stdc++.h>
using namespace std;

const int sz = 2e5+5;
const int inf = 1e9 + 7;


int valid(int n, int inputSeq[]){
    bool ok = false;
    int c = 1;
    int ind = -1;
    for(int i = 0; i < n; i++){
        if(inputSeq[i] == 1){
            ind = i;
            break;
        }
    }if(ind == -1){
        return 0;
    }while(c <= n){
        if(c >= n){
            break;
        }
        if(inputSeq[ind] == c){
            c++;
            ind = (ind+1)%n;
        }else {
            ok = false;
            break;
        }
    }return ok;
}

Compilation message (stderr)

/usr/bin/ld: /tmp/ccqpqLhp.o: in function `main':
grader.cpp:(.text.startup+0xae): undefined reference to `valid'
/usr/bin/ld: grader.cpp:(.text.startup+0xfc): undefined reference to `replacement'
/usr/bin/ld: grader.cpp:(.text.startup+0x18d): undefined reference to `countReplacement'
collect2: error: ld returned 1 exit status