Submission #1064617

#TimeUsernameProblemLanguageResultExecution timeMemory
1064617NemanjaSo2005Gondola (IOI14_gondola)C++17
Compilation error
0 ms0 KiB
#include "gondola.h" #include<bits/stdc++.h> #define ll long long using namespace std; const int maxn=1e5+5; int N,niz[maxn],niz2[maxn]; void adjust(){ int najm=1; for(int i=1;i<=N;i++) if(niz[i]<niz[najm]) najm=i; for(int i=1;i<=N;i++){ if(i+najm-1<=N) niz2[i]=niz[i+najm-1]; else niz2[i]=niz[i+najm-N-1]; } for(int i=1;i<=N;i++) niz[i]=niz2[i]; } int valid(int n, int inputSeq[]){ N=n; for(int i=1;i<=N;i++) niz[i]=inputSeq[i-1]; adjust();/* for(int i=1;i<=N;i++) cout<<niz[i]<<" "; cout<<endl;*/ if(niz[1]>=N) return 1; int treba=niz[1]; for(int i=2;i<=N;i++){ treba++; if(niz[i]>N) continue; if(niz[i]!=treba) return 0; } return 1; }

Compilation message (stderr)

/usr/bin/ld: /tmp/cctjSlq3.o: in function `main':
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