제출 #296166

#제출 시각아이디문제언어결과실행 시간메모리
296166arayi곤돌라 (IOI14_gondola)C++17
10 / 100
15 ms2296 KiB
#include <bits/stdc++.h> #include "gondola.h" #define ad push_back using namespace std; int valid(int n, int inputSeq[]) { vector <int> a; for (int i = 0; i < n; i++) a.ad(inputSeq[i]); for (int i = 0; i < n; i++) a.ad(inputSeq[i]); int i1 = -1; for (int i = 0; i < n; i++) { if(a[i] <= n) { i1 = (i - a[i] + 1 + n) % n; break; } } if(i1 == -1) return 1; for (int i = i1; i < i1 + n; i++) { if(a[i] > n) continue; if(i - i1 + 1 != a[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...