답안 #66327

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
66327 2018-08-10T08:43:27 Z someone_aa 곤돌라 (IOI14_gondola) C++17
10 / 100
20 ms 1004 KB
#include "gondola.h"
#include <bits/stdc++.h>

using namespace std;

int valid(int n, int arr[]) {
    bool check = true;

    for(int i=1;i<n;i++) {
        if(arr[i] > n) continue;
        else if(arr[i] == 1) {
            if(arr[i-1] < n)
                check = false;
        }
        else {
            if(arr[i-1] <= n && arr[i-1] != arr[i] - 1) check = false;
        }
    }
    if(check) return 1;
    else return 0;
}

//----------------------

int replacement(int n, int gondolaSeq[], int replacementSeq[])
{
  return -2;
}

//----------------------

int countReplacement(int n, int inputSeq[])
{
  return -3;
}

/*int main() {
    int arr[] = {3, 4, 5, 6, 1, 2};
    cout<<valid(6, arr);
}*/
# 결과 실행 시간 메모리 Grader output
1 Correct 3 ms 376 KB Output is correct
2 Correct 3 ms 488 KB Output is correct
3 Correct 2 ms 564 KB Output is correct
4 Correct 3 ms 564 KB Output is correct
5 Correct 2 ms 564 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 2 ms 564 KB Output is correct
2 Correct 2 ms 564 KB Output is correct
3 Correct 2 ms 564 KB Output is correct
4 Correct 3 ms 592 KB Output is correct
5 Correct 3 ms 600 KB Output is correct
6 Correct 8 ms 740 KB Output is correct
7 Correct 17 ms 836 KB Output is correct
8 Correct 15 ms 1004 KB Output is correct
9 Correct 5 ms 1004 KB Output is correct
10 Correct 15 ms 1004 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 2 ms 1004 KB Output is correct
2 Correct 3 ms 1004 KB Output is correct
3 Correct 3 ms 1004 KB Output is correct
4 Correct 2 ms 1004 KB Output is correct
5 Correct 3 ms 1004 KB Output is correct
6 Correct 9 ms 1004 KB Output is correct
7 Correct 20 ms 1004 KB Output is correct
8 Correct 13 ms 1004 KB Output is correct
9 Correct 6 ms 1004 KB Output is correct
10 Correct 13 ms 1004 KB Output is correct
11 Incorrect 3 ms 1004 KB Output isn't correct
12 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 2 ms 1004 KB Integer -2 violates the range [0, 350000]
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 2 ms 1004 KB Integer -2 violates the range [0, 350000]
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 2 ms 1004 KB Integer -2 violates the range [0, 350000]
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 2 ms 1004 KB Integer -3 violates the range [0, 1000000008]
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 3 ms 1004 KB Integer -3 violates the range [0, 1000000008]
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 3 ms 1004 KB Integer -3 violates the range [0, 1000000008]
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 2 ms 1004 KB Integer -3 violates the range [0, 1000000008]
2 Halted 0 ms 0 KB -