Submission #722586

#TimeUsernameProblemLanguageResultExecution timeMemory
722586Yell0Gondola (IOI14_gondola)C++17
Compilation error
0 ms0 KiB
#include <bits/stdc++.h> using namespace std; const int MOD=1e9+9; int valid(int n,int inputSeq[]) { int st=-1; vector<int> ogIdx(n+2); set<int> usedNew; for(int i=0;i<n;++i) { if(st<0&&inputSeq[i]<=n) { st=i; ogIdx[inputSeq[i]]=i; for(int j=1;j<n;++j) ogIdx[(inputSeq[i]-1+j)%n+1]=j; } else if(inputSeq[i]<=n) { if(ogIdx[inputSeq[i]]!=i) return 0; } else { if(usedNew.count(inputSeq[i])) return 0; usedNew.insert(inputSeq[i]); } } return 1; }

Compilation message (stderr)

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