Submission #243233

#TimeUsernameProblemLanguageResultExecution timeMemory
243233KubinGondola (IOI14_gondola)C++17
Compilation error
0 ms0 KiB
#include <bits/stdc++.h> using namespace std; int valid(int n, int A[]) { int k = -1; for(int i = 0; i < n and k == -1; i++) if(A[i] <= n) k = (n + i - (A[i]-1)) % n; if(k != -1) rotate(A, A + k, A + n); for(int i = 0; i < n; i++) if(A[i] <= n and A[i]-1 != i) return false; return true; } int replacement(int n, int A[], int out[]) { } int countReplacement(int n, int A[]) { }

Compilation message (stderr)

gondola.cpp: In function 'int replacement(int, int*, int*)':
gondola.cpp:22:1: warning: no return statement in function returning non-void [-Wreturn-type]
 }
 ^
gondola.cpp: In function 'int countReplacement(int, int*)':
gondola.cpp:27:1: warning: no return statement in function returning non-void [-Wreturn-type]
 }
 ^
/tmp/ccAZ8EaF.o: In function `main':
grader.cpp:(.text.startup+0xc3): undefined reference to `countReplacement'
grader.cpp:(.text.startup+0xe2): undefined reference to `valid'
grader.cpp:(.text.startup+0x106): undefined reference to `replacement'
collect2: error: ld returned 1 exit status