제출 #131337

#제출 시각아이디문제언어결과실행 시간메모리
131337MAMBA곤돌라 (IOI14_gondola)C++17
10 / 100
15 ms2424 KiB
#include "gondola.h" #include <bits/stdc++.h> using namespace std; #define rep(i, j , k) for(int i = j; i < (int) k; i++) typedef vector<int> vi; const int N = 3e5 + 10; int pos[N]; int valid(int n, int A[]) { memset(pos , -1, sizeof(pos)); rep(i , 0 , n) { if (~pos[A[i]]) return 0; pos[A[i]] = i; } int last = -1; rep(i , 0 , n) if(~pos[i]) { if (!~last) { last = i; continue; } if ((i - last) != (pos[i] - pos[last] + n) % n) 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...