# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
230295 | 2020-05-09T13:51:43 Z | Masterdan | 곤돌라 (IOI14_gondola) | C++14 | 26 ms | 1452 KB |
#include "gondola.h" #include <bits/stdc++.h> #define MAX 1e9+7 #define pb push_back #define mk make_pair #define all(a) a.begin (),a.end () using namespace std; typedef vector<int> vi; typedef long long int ll; typedef pair<int, int> ii; int valid(int n, int inputSeq[]) { vi v; int flag=0; for(int i=0;i<n;i++)v.pb(inputSeq[i]); for(int i=1;i<n;i++){ if(v[i]==1 && v[i-1]!=n)return 0; if(v[i] != 1 && v[i-1] + 1 != v[i])return 0; } return 1; } //---------------------- int replacement(int n, int gondolaSeq[], int replacementSeq[]) { vi v; int sw=0; for(int i=0;i<n;i++)v.pb(gondolaSeq[i]); sort(all(v)); for(int i=0;i<n;i++){ if(v[i]!=i+1){replacementSeq[0]=i+1; sw=1; break; } } return sw; } //---------------------- int countReplacement(int n, int inputSeq[]) { return -3; }
Compilation message
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 5 ms | 256 KB | Output is correct |
2 | Correct | 4 ms | 256 KB | Output is correct |
3 | Correct | 5 ms | 256 KB | Output is correct |
4 | Correct | 5 ms | 384 KB | Output is correct |
5 | Correct | 4 ms | 384 KB | Output is correct |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 6 ms | 384 KB | Output is correct |
2 | Correct | 5 ms | 384 KB | Output is correct |
3 | Correct | 4 ms | 256 KB | Output is correct |
4 | Correct | 4 ms | 384 KB | Output is correct |
5 | Correct | 4 ms | 256 KB | Output is correct |
6 | Correct | 10 ms | 896 KB | Output is correct |
7 | Correct | 18 ms | 1404 KB | Output is correct |
8 | Correct | 16 ms | 1276 KB | Output is correct |
9 | Correct | 10 ms | 640 KB | Output is correct |
10 | Correct | 16 ms | 1276 KB | Output is correct |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 5 ms | 384 KB | Output is correct |
2 | Correct | 5 ms | 384 KB | Output is correct |
3 | Correct | 4 ms | 384 KB | Output is correct |
4 | Correct | 4 ms | 256 KB | Output is correct |
5 | Correct | 4 ms | 384 KB | Output is correct |
6 | Correct | 10 ms | 896 KB | Output is correct |
7 | Correct | 18 ms | 1276 KB | Output is correct |
8 | Correct | 15 ms | 1276 KB | Output is correct |
9 | Correct | 8 ms | 640 KB | Output is correct |
10 | Correct | 16 ms | 1276 KB | Output is correct |
11 | Correct | 4 ms | 256 KB | Output is correct |
12 | Correct | 5 ms | 384 KB | Output is correct |
13 | Correct | 10 ms | 896 KB | Output is correct |
14 | Correct | 5 ms | 384 KB | Output is correct |
15 | Correct | 26 ms | 1452 KB | Output is correct |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 5 ms | 384 KB | Output is correct |
2 | Correct | 5 ms | 384 KB | Output is correct |
3 | Correct | 5 ms | 384 KB | Output is correct |
4 | Correct | 5 ms | 384 KB | Output is correct |
5 | Correct | 5 ms | 384 KB | Output is correct |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 5 ms | 384 KB | Output is correct |
2 | Correct | 5 ms | 256 KB | Output is correct |
3 | Correct | 5 ms | 384 KB | Output is correct |
4 | Correct | 5 ms | 384 KB | Output is correct |
5 | Correct | 5 ms | 384 KB | Output is correct |
6 | Incorrect | 5 ms | 384 KB | Output isn't correct |
7 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 5 ms | 384 KB | Output is correct |
2 | Correct | 5 ms | 384 KB | Output is correct |
3 | Correct | 5 ms | 384 KB | Output is correct |
4 | Correct | 5 ms | 384 KB | Output is correct |
5 | Correct | 5 ms | 308 KB | Output is correct |
6 | Incorrect | 5 ms | 256 KB | Output isn't correct |
7 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Incorrect | 5 ms | 384 KB | Integer -3 violates the range [0, 1000000008] |
2 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Incorrect | 4 ms | 384 KB | Integer -3 violates the range [0, 1000000008] |
2 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Incorrect | 5 ms | 360 KB | Integer -3 violates the range [0, 1000000008] |
2 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Incorrect | 5 ms | 384 KB | Integer -3 violates the range [0, 1000000008] |
2 | Halted | 0 ms | 0 KB | - |