Submission #1277273

#TimeUsernameProblemLanguageResultExecution timeMemory
1277273JohannGondola (IOI14_gondola)C++20
10 / 100
6 ms1344 KiB
#include "gondola.h" #include "bits/stdc++.h" using namespace std; void shift_inputSeq(int n, int inputSeq[]) { for (int i = 0; i < n; ++i) --(inputSeq[i]); } int valid(int n, int inputSeq[]) { shift_inputSeq(n, inputSeq); int fixPoint = -1; for (int i = 0; i < n; ++i) { if (inputSeq[i] < n) { int shift = (n + i - inputSeq[i]) % n; if (fixPoint == -1) fixPoint = shift; else if (fixPoint != shift) 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...