제출 #422239

#제출 시각아이디문제언어결과실행 시간메모리
422239Ozy곤돌라 (IOI14_gondola)C++17
10 / 100
19 ms1152 KiB
#include "gondola.h" #include <bits/stdc++.h> using namespace std; #define rep(i,a,b) for (int i = (a); i <= (b); i++) #define repa(i,a,b) for (int i = (a); i >= (b); i--) #define lli long long int #define debugsl(a) cout << #a << " = " << a << ", " #define debug(a) cout << #a << " = " << a << endl int valid(int n, int inputSeq[]) { lli ult = -1; lli val = -1; bool res; rep(i,0,n-1) { if (inputSeq[i] <= n) { ult = i; val = inputSeq[i]; break; } } val -= ult; if(val < 1) val += n; res = true; rep(i,0,n-1) { if (inputSeq[i] <= n){ if (inputSeq[i] != val) {res = false; break;} } val++; if (val > n) val = 1; } return res; } 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...