답안 #230324

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
230324 2020-05-09T14:27:13 Z chubyxdxd 곤돌라 (IOI14_gondola) C++11
25 / 100
22 ms 768 KB
#include "gondola.h"
#include <bits/stdc++.h>

using namespace std;
int valid(int n, int inputSeq[])
{
  for(int i=1;i<n;i++){
    if(inputSeq[i]==1 and inputSeq[i-1]!=n)return 0;
    if(inputSeq[i]!=1 and inputSeq[i-1]+1!=inputSeq[i])return 0;
  }
  return 1;
}

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

int replacement(int n, int gondolaSeq[], int replacementSeq[])
{
  vector<int> v;
  int ans=0;
  for(int i=0;i<n;i++){
    if(gondolaSeq[i]>n){
      ans=1;
      if(i==0)
	replacementSeq[0]=gondolaSeq[i+1]-1;
      else{
	replacementSeq[0]=gondolaSeq[i-1]+1;
      }
    }
  }
  return ans;
}

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

int countReplacement(int n, int inputSeq[])
{
  return -3;
}
# 결과 실행 시간 메모리 Grader output
1 Correct 5 ms 256 KB Output is correct
2 Correct 5 ms 256 KB Output is correct
3 Correct 5 ms 256 KB Output is correct
4 Correct 5 ms 416 KB Output is correct
5 Correct 4 ms 384 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 4 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 5 ms 384 KB Output is correct
5 Correct 5 ms 384 KB Output is correct
6 Correct 11 ms 500 KB Output is correct
7 Correct 17 ms 640 KB Output is correct
8 Correct 14 ms 640 KB Output is correct
9 Correct 7 ms 384 KB Output is correct
10 Correct 17 ms 640 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 5 ms 256 KB Output is correct
2 Correct 5 ms 384 KB Output is correct
3 Correct 5 ms 384 KB Output is correct
4 Correct 4 ms 384 KB Output is correct
5 Correct 5 ms 384 KB Output is correct
6 Correct 10 ms 512 KB Output is correct
7 Correct 19 ms 640 KB Output is correct
8 Correct 16 ms 640 KB Output is correct
9 Correct 7 ms 384 KB Output is correct
10 Correct 22 ms 640 KB Output is correct
11 Correct 5 ms 384 KB Output is correct
12 Correct 5 ms 512 KB Output is correct
13 Correct 11 ms 512 KB Output is correct
14 Correct 5 ms 256 KB Output is correct
15 Correct 18 ms 768 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 256 KB Output is correct
5 Correct 5 ms 384 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 5 ms 256 KB Output is correct
2 Correct 5 ms 256 KB Output is correct
3 Correct 4 ms 288 KB Output is correct
4 Correct 5 ms 256 KB Output is correct
5 Correct 5 ms 384 KB Output is correct
6 Incorrect 4 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 4 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 Incorrect 5 ms 256 KB Integer -3 violates the range [0, 1000000008]
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 6 ms 384 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 -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 5 ms 256 KB Integer -3 violates the range [0, 1000000008]
2 Halted 0 ms 0 KB -