Submission #136045

#TimeUsernameProblemLanguageResultExecution timeMemory
136045arthurconmyGondola (IOI14_gondola)C++14
25 / 100
15 ms1272 KiB
#include <bits/stdc++.h> #ifndef ARTHUR_LOCAL #include "gondola.h" #endif using namespace std; bool used[250001]; int valid(int n, int S[]) { pair<int,int> minn = {int(1e9),int(1e9)}; for(int i=0; i<n; i++) { if(used[S[i]]) return 0; used[S[i]]=1; minn = min(minn, make_pair(S[i],i)); } int cur = minn.first; if(cur>n) return 1; int one_pos = (minn.second - minn.first + 1 + n)%n; for(int j=0; j<n; j++) { if(S[(one_pos+j)%n] == j+1 || S[(one_pos+j)%n]>n) continue; return 0; } return 1; } int replacement(int n, int G[], int R[]) { return 1; } int countReplacement(int n, int I[]) { return 1; }
#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...