Submission #16338

#TimeUsernameProblemLanguageResultExecution timeMemory
16338atomzenoGondola (IOI14_gondola)C++98
10 / 100
14 ms2840 KiB
#include "gondola.h" int d[100001]; int valid(int n, int inputSeq[]){ int i,cnt=0,ind; for(i=0;i<n;i++){ if(inputSeq[i]<=n){ cnt=1; ind=(inputSeq[i]-1-i)+n; ind%=n; break; } } if(cnt==0){return 1;} for(i=0;i<n;i++){ d[(ind+i)%n]=inputSeq[i]; } for(i=0;i<n;i++){ if(d[i]<=n&&d[i]!=(i+1)){ return 0; } } return 1; } int replacement(int n, int gondolaSeq[], int replacementSeq[]){ return -2; } //---------------------- int countReplacement(int n, int inputSeq[]){ return -3; }
#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...