Submission #243235

#TimeUsernameProblemLanguageResultExecution timeMemory
243235KubinGondola (IOI14_gondola)C++17
20 / 100
25 ms3968 KiB
#include <bits/stdc++.h> #ifndef XHOVA #include "gondola.h" #endif 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 unordered_set<int>(A, A + n).size() == (size_t)n; } 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:24:1: warning: no return statement in function returning non-void [-Wreturn-type]
 }
 ^
gondola.cpp: In function 'int countReplacement(int, int*)':
gondola.cpp:29:1: warning: no return statement in function returning non-void [-Wreturn-type]
 }
 ^
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...