제출 #391912

#제출 시각아이디문제언어결과실행 시간메모리
391912Aldas25곤돌라 (IOI14_gondola)C++14
10 / 100
11 ms1140 KiB
#include "gondola.h" #include <bits/stdc++.h> using namespace std; #define FOR(i, a, b) for (int i = (a); i <= (b); i++) #define REP(n) FOR(O, 1, (n)) #define f first #define s second #define pb push_back typedef long long ll; typedef pair<int, int> pii; typedef vector<pii> vii; typedef vector<ll> vl; typedef vector<int> vi; int valid(int n, int inputSeq[]) { FOR(i, 0, n-1) inputSeq[i]--; int ch = -1; FOR(i, 0, n-1) { if (inputSeq[i] >= n) continue; ch = i; break; } if (ch == -1) return true; FOR(i, 0, n-1) { int id = (ch+i)%n; if (inputSeq[id] >= n) continue; int shouldBe = (inputSeq[ch]+i)%n; if (inputSeq[id] != shouldBe) return false; } return true; } //---------------------- 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...