Submission #587011

#TimeUsernameProblemLanguageResultExecution timeMemory
587011hibikiGondola (IOI14_gondola)C++11
10 / 100
9 ms616 KiB
#include "gondola.h" #include<bits/stdc++.h> using namespace std; #define pb push_back #define f first #define s second #define sz(x) (int)x.size() #define all(x) x.begin(),x.end() int valid(int n, int a[]) { pair<int,int> mn = {1e9, 1e9}; for(int i = 0; i < n; i++) mn = min(mn, {a[i], i}); if(mn.f > n) return 1; if(mn.f < 1) return 0; for(int i = 0; i < n; i++) { if(a[(mn.s + i) % n] <= n && a[(mn.s + i) % n] != (mn.f + i + n - 1) % n + 1) 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...