Submission #579768

#TimeUsernameProblemLanguageResultExecution timeMemory
5797681neGondola (IOI14_gondola)C++14
Compilation error
0 ms0 KiB
#include<bits/stdc++.h> using namespace std; //#include "gondola.h" int valid(int n, int inputSeq[]) { int index = -1; for (int i = 0;i<n;++i){ if (inputSeq[i] <=n){ index = i; } } map<int,int>visited; if (index == -1)return 1; for (int i = 0;i<n;++i){ int j = (i + index)%n; int temp = inputSeq[index] + i; if (temp > n)temp = temp % n; if (visited[temp] || visited[inputSeq[j]])return 0; visited[temp] = true; visited[inputSeq[j]] = true; } return 1; } //---------------------- int replacement(int n, int gondolaSeq[], int replacementSeq[]) { return -2; } //---------------------- int countReplacement(int n, int inputSeq[]) { return -3; }

Compilation message (stderr)

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