# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
164998 | 2019-11-24T16:01:11 Z | kostia244 | 곤돌라 (IOI14_gondola) | C++17 | 79 ms | 5212 KB |
#include "gondola.h" #include<bits/stdc++.h> #define pb push_back #define all(x) x.begin(), x.end() using namespace std; using ll = long long; using vi = vector<int>; int valid(int n, int a[]) { set<int> x; for (int i = 0; i < n; i++) x.insert(a[i]); if (x.size() != n) return 0; for (int i = 1; i < n; i++) { if (a[i] > n) { a[i] = a[i - 1] + 1; } } for (int i = n; i-- > 1;) { if (a[i] > n) { a[i] = a[i - 1] == n ? 1 : a[i - 1] + 1; } } int i = 0; while (a[i] != 1) i++; int p = 1; for (int j = (i + 1) % n; j != i; j = (j + 1) % n) { if (p+1 != a[j]) return 0; p = a[j]; } return 1; } //---------------------- int replacement(int n, int gondolaSeq[], int replacementSeq[]) { return -2; } //---------------------- int countReplacement(int n, int inputSeq[]) { return -3; }
Compilation message
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 2 ms | 256 KB | Output is correct |
2 | Correct | 2 ms | 256 KB | Output is correct |
3 | Correct | 2 ms | 256 KB | Output is correct |
4 | Correct | 2 ms | 376 KB | Output is correct |
5 | Correct | 2 ms | 376 KB | Output is correct |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 2 ms | 256 KB | Output is correct |
2 | Correct | 2 ms | 376 KB | Output is correct |
3 | Correct | 2 ms | 376 KB | Output is correct |
4 | Correct | 2 ms | 376 KB | Output is correct |
5 | Correct | 2 ms | 376 KB | Output is correct |
6 | Correct | 16 ms | 2276 KB | Output is correct |
7 | Correct | 37 ms | 3704 KB | Output is correct |
8 | Correct | 77 ms | 3960 KB | Output is correct |
9 | Correct | 10 ms | 1400 KB | Output is correct |
10 | Correct | 38 ms | 4600 KB | Output is correct |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 2 ms | 376 KB | Output is correct |
2 | Correct | 2 ms | 504 KB | Output is correct |
3 | Correct | 2 ms | 376 KB | Output is correct |
4 | Correct | 2 ms | 376 KB | Output is correct |
5 | Correct | 2 ms | 256 KB | Output is correct |
6 | Correct | 16 ms | 2272 KB | Output is correct |
7 | Correct | 39 ms | 3704 KB | Output is correct |
8 | Correct | 30 ms | 3916 KB | Output is correct |
9 | Correct | 10 ms | 1528 KB | Output is correct |
10 | Correct | 79 ms | 4600 KB | Output is correct |
11 | Correct | 2 ms | 256 KB | Output is correct |
12 | Correct | 2 ms | 376 KB | Output is correct |
13 | Correct | 21 ms | 2424 KB | Output is correct |
14 | Correct | 2 ms | 376 KB | Output is correct |
15 | Correct | 50 ms | 5212 KB | Output is correct |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Incorrect | 2 ms | 376 KB | Integer -2 violates the range [0, 350000] |
2 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Incorrect | 2 ms | 256 KB | Integer -2 violates the range [0, 350000] |
2 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Incorrect | 2 ms | 256 KB | Integer -2 violates the range [0, 350000] |
2 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Incorrect | 2 ms | 256 KB | Integer -3 violates the range [0, 1000000008] |
2 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Incorrect | 2 ms | 256 KB | Integer -3 violates the range [0, 1000000008] |
2 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Incorrect | 2 ms | 376 KB | Integer -3 violates the range [0, 1000000008] |
2 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Incorrect | 2 ms | 256 KB | Integer -3 violates the range [0, 1000000008] |
2 | Halted | 0 ms | 0 KB | - |