Submission #396757

#TimeUsernameProblemLanguageResultExecution timeMemory
396757peuchGondola (IOI14_gondola)C++17
20 / 100
48 ms5172 KiB
#include "gondola.h" #include<bits/stdc++.h> using namespace std; int valid(int n, int inputSeq[]) { int mini = n + 10, id = 0; map<int, bool> marc; for(int i = 0; i < n; i++){ if(marc[inputSeq[i]]) return 0; if(inputSeq[i] < mini) mini = inputSeq[i], id = i; marc[inputSeq[i]] = 1; } if(mini >= n) return 0; for(int i = 0; i < n; i++){ if(inputSeq[(id + i) % n] <= n && inputSeq[(id + i) % n] != mini) return 0; mini++; if(mini > n) mini = 1; } 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...