제출 #363538

#제출 시각아이디문제언어결과실행 시간메모리
363538silverfish곤돌라 (IOI14_gondola)C++14
10 / 100
14 ms1132 KiB
#include <bits/stdc++.h> #include "gondola.h" using namespace std; int valid(int n, int a[]){ bool ok = 1, first = 1; int diff = -1; for(int i = 0; i < n; ++i){ if(a[i] <= n){ if(first) { diff = (n+a[i]-(i+1))%n; first = 0; continue; } //cerr << i+1 << ' ' << (n+a[i]-diff)%n << endl; if(i != (n+a[i]-diff-1)%n) ok = 0; } } return ok; } //---------------------- 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...