Submission #1108624

#TimeUsernameProblemLanguageResultExecution timeMemory
1108624AriadnaGondola (IOI14_gondola)C++14
Compilation error
0 ms0 KiB
#include <bits/stdc++.h> using namespace std; int valid(int n, int inputSeq[]) { unordered_map<int, int> cnt; for (int i = 0; i < n; ++i) cnt[inputSeq[i]]++; if ((int)cnt.size() < n) return 0; for (int i = 1; inputSeq[0]+i <= n; ++i) { if (inputSeq[i] <= n && inputSeq[i] != inputSeq[0]+i) return 0; } for (int i = 1; inputSeq[0]-i > 0; ++i) { if (inputSeq[n-i] <= n && inputSeq[n-i] != inputSeq[0]-i) return 0; } return 1; } /*int replacement(int n, int gondolaSeq[], int replacementSeq[]) { } int countReplacement(int n, int inputSeq[]) { }*/

Compilation message (stderr)

/usr/bin/ld: /tmp/ccaXcGeH.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