Submission #1108628

#TimeUsernameProblemLanguageResultExecution timeMemory
1108628AriadnaGondola (IOI14_gondola)C++14
20 / 100
19 ms5984 KiB
#include <bits/stdc++.h> #include "gondola.h" using namespace std; int valid(int n, int inputSeq[]) { unordered_map<int, int> cnt; for (int i = 0; i < n; ++i) cnt[inputSeq[i]]++; if ((int)cnt.size() < n) return 0; for (int i = 1; inputSeq[0]+i <= n; ++i) { if (inputSeq[i] <= n && inputSeq[i] != inputSeq[0]+i) return 0; } for (int i = 1; inputSeq[0]-i > 0; ++i) { if (inputSeq[n-i] <= n && inputSeq[n-i] != inputSeq[0]-i) return 0; } return 1; } 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...