답안 #194163

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
194163 2020-01-15T21:28:43 Z juanmartinez111 곤돌라 (IOI14_gondola) C++14
0 / 100
10 ms 508 KB
#include "gondola.h"

int valid(int n, int inputSeq[])
{
  int ini=0,fin=0;
   bool si=true;
  for(int i=0;i<n;i++){
    if(inputSeq[i]==n)fin=i;
    if(inputSeq[i]==1)ini=i;
    int cnt=1;
    while(ini!=fin){
        if(inputSeq[ini]!=cnt){
            si=false;
            break;
        }
        ini=(ini+1)%n;

        cnt++;
    }
    if(inputSeq[fin]!=n){
        si=false;
    }
  }
  return si;
}

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

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

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

int countReplacement(int n, int inputSeq[])
{
  return -3;
}
# 결과 실행 시간 메모리 Grader output
1 Incorrect 10 ms 508 KB Output isn't correct
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 2 ms 376 KB Output isn't correct
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 2 ms 256 KB Output isn't correct
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 348 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 3 ms 376 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 -