Submission #171643

#TimeUsernameProblemLanguageResultExecution timeMemory
171643gs18103Gondola (IOI14_gondola)C++14
0 / 100
4 ms508 KiB
#include "gondola.h" #include <bits/stdc++.h> #define fi first #define se second #define eb emplace_back #define em emplace #define all(v) v.begin(), v.end() using namespace std; typedef long long ll; typedef pair <int, int> pii; typedef pair <ll, ll> pll; const int MAX = 101010; const int INF = INT_MAX >> 1; const ll LINF = LLONG_MAX >> 1; int valid(int n, int arr[]) { int idx = -1; for(int i = 0; i < n; i++) { if(arr[i] <= n) { idx = i; break; } } if(idx == -1) return 1; for(int i = 0; i < n; i++) { if(arr[(idx+i)%n] <= n && arr[(idx+i)%n] != idx + 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...