Submission #102554

#TimeUsernameProblemLanguageResultExecution timeMemory
102554Leonardo_PaesGondola (IOI14_gondola)C++11
0 / 100
3 ms432 KiB
#include <bits/stdc++.h> #include "gondola.h" using namespace std; int valid(int n, int vet[]){ int x=0, cnt=0, ma=0; bool ok=true; for(int i=0; i<n; i++){ if(vet[i]>n)cnt++, ma=max(ma, vet[i]); if(vet[i]>n or vet[i+1]>n){ continue; } else{ if(i==n-1){ if(vet[0]<vet[i]){ if(x==0){ x=1; } else{ ok=false; } } } else if(vet[i+1]<vet[i]){ if(x==0){ x=1; } else{ ok=false; } } } } if(cnt != ma-n)ok=false; return ok; } int replacement(int n, int gondolaSeq[], int replacementSeq[]){ return 0; } int countReplacement(int n, int inputSeq[]){ return 0; }
#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...