Submission #374385

#TimeUsernameProblemLanguageResultExecution timeMemory
374385Aryan_RainaGondola (IOI14_gondola)C++14
20 / 100
45 ms4588 KiB
#include "gondola.h" #include <bits/stdc++.h> using namespace std; int valid(int n, int a[]) { int rr = -1; set<int> vis; for (int i = 0; i < n; i++) { if (vis.count(a[i])) return 0; vis.insert(a[i]); if (a[i] <= n) { if (rr == -1) rr = i; if ((n + a[i] - a[rr]) % n != (n + i - rr) % n) 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...