Submission #710464

#TimeUsernameProblemLanguageResultExecution timeMemory
710464mseebacherGondola (IOI14_gondola)C++17
20 / 100
30 ms4504 KiB
#include <bits/stdc++.h> #include "gondola.h" using namespace std; int valid(int n,int a[]){ int last = 0; int index = -1; set<int> in; for(int i = 0;i<n;i++){ if(a[i] <= n){ if(index >= 0){ int diffIndex = i-index; int diffWert = a[i]-last; if(diffWert < 0) diffWert += n; if(diffIndex != diffWert) return false; } index = i; last = a[i]; } if(in.find(a[i]) != in.end()) return 0; in.insert(a[i]); } return true; } 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...