Submission #584856

#TimeUsernameProblemLanguageResultExecution timeMemory
584856MazaalaiGondola (IOI14_gondola)C++17
10 / 100
10 ms1128 KiB
#include "gondola.h" int valid(int n, int inputSeq[]) { int mini = 0; for (int i = 1; i < n; i++) if (inputSeq[i] < inputSeq[mini]) mini = i; int st = inputSeq[mini]; for (int i = 1; i < n; i++) { int j = (mini + i) % n; if (inputSeq[j] > n) continue; if (inputSeq[j] <= n && inputSeq[j] != st + i) 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...