Submission #138667

#TimeUsernameProblemLanguageResultExecution timeMemory
138667zoooma13Gondola (IOI14_gondola)C++14
Compilation error
0 ms0 KiB
#include "bits/stdc++.h" #include "gondola.h" #include "grader.cpp" using namespace std; int valid(int n, int inputSeq[]){ int mi_idx = min_element(inputSeq ,inputSeq+n)-inputSeq; if(inputSeq[mi_idx] >= n) return 1; int nxt = inputSeq[mi_idx]; for(int i=mi_idx; i<mi_idx+n; i++){ if(inputSeq[i%n] != nxt && inputSeq[i%n] <= n) return 0; nxt++; } return 1; } //---------------------- int replacement(int n, int gondolaSeq[], int replacementSeq[]) { return -2; } //---------------------- int countReplacement(int n, int inputSeq[]) { return -3; }

Compilation message (stderr)

/tmp/ccmXOrZk.o: In function `main':
grader.cpp:(.text.startup+0x0): multiple definition of `main'
/tmp/cc0F6xaj.o:gondola.cpp:(.text.startup+0x0): first defined here
/tmp/ccmXOrZk.o:(.bss+0xf4260): multiple definition of `gondolaSequence'
/tmp/cc0F6xaj.o:(.bss+0xf4260): first defined here
/tmp/ccmXOrZk.o:(.bss+0x0): multiple definition of `replacementSequence'
/tmp/cc0F6xaj.o:(.bss+0x0): first defined here
collect2: error: ld returned 1 exit status