Submission #367422

#TimeUsernameProblemLanguageResultExecution timeMemory
367422KoDGondola (IOI14_gondola)C++17
Compilation error
0 ms0 KiB
#include <iostream> #include <numeric> #include <vector> #include <algorithm> #include <utility> #ifndef LOCAL #include "gondola.h" #endif using i32 = std::int32_t; using i64 = std::int64_t; using u32 = std::uint32_t; using u64 = std::uint64_t; using isize = std::ptrdiff_t; using usize = std::size_t; template <class T> using Vec = std::vector<T>; int valid(int n, int inputSeq[]) { Vec<int> rep; for (int i = 0; i < n; ++i) { inputSeq[i] -= 1; if (inputSeq[i] >= n) { rep.push_back(inputSeq[i]); } } std::sort(rep.begin(), rep.end()); if (std::unique(rep.begin(), rep.end()) != rep.end()) { return 0; } if (rep.front() != n) { return 0; } for (int i = 0; i < n; ++i) { if (inputSeq[i] < n) { for (int j = 0; j < n; ++j) { const auto x = inputSeq[(i + j) % n]; if (x < n && x != (inputSeq[i] + j) % n) { return 0; } } return 1; } } return 1; } int replacement(int n, int gondolaSeq, int replacementSeq[]) { return 0; } int countReplacement(int n, int inputSeq[]) { return 0; } #ifdef LOCAL int main() { return 0; } #endif

Compilation message (stderr)

/tmp/cce8YhbV.o: In function `main':
grader.cpp:(.text.startup+0x132): undefined reference to `replacement'
collect2: error: ld returned 1 exit status