Submission #706124

#TimeUsernameProblemLanguageResultExecution timeMemory
706124LLLLLLLLLLLLLLLLLLLLLLLGondola (IOI14_gondola)C++14
Compilation error
0 ms0 KiB
#include <bits/stdc++.h> using namespace std; const int MOD = 1e9 + 9; int valid(int n, int v[]){ set<int> s(v, v + n); if((int) s.size() != n) return 0; for(int i = 0; i < n; i++){ if(v[i] > n) continue; int left = (v[i] == 1 ? n : v[i] - 1), right = (v[i] == n ? 1 : v[i] + 1); int lefViz = (i == 0 ? v[n - 1] : v[i - 1]); int rigViz = (i == n - 1 ? v[0] : v[i + 1]); if((lefViz != left && lefViz <= n) || (rigViz != right && rigViz <= n)) return 0; } return 1; } int countReplacement(int n, int v[]){ return 0; } int replacement(int n, int v[], int g[]){ int gondola = -1; for(int i = 0; i < n; i++) if(v[i] > n) gondola = v[i]; if(gondola == -1) return 0; g[0] = gondola; return 1; }

Compilation message (stderr)

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