답안 #1102892

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
1102892 2024-10-19T08:10:49 Z alexander707070 곤돌라 (IOI14_gondola) C++14
20 / 100
8 ms 3136 KB
#include<bits/stdc++.h>
#include "gondola.h"

#define MAXN 500007
using namespace std;

int n;
int s[MAXN],last;
bool li[MAXN];

int valid(int N, int inputSeq[]){
	n=N;

	int mins=1;
	for(int i=1;i<=n;i++){
		s[i]=inputSeq[i-1];
		s[i+n]=s[i];

		if(s[i]<s[mins]){
			mins=i;
		}
	}

	for(int i=mins;i<mins+n;i++){
		if(s[i]<=n and s[i]!=s[mins]+i-mins)return 0;

		if(s[i]>n){
			if(li[s[i]])return 0;
			li[s[i]]=true;
		}
	}

	return 1;
}

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

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

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

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

# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 2384 KB Output is correct
2 Correct 1 ms 2384 KB Output is correct
3 Correct 1 ms 2384 KB Output is correct
4 Correct 1 ms 2384 KB Output is correct
5 Correct 1 ms 2384 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 2384 KB Output is correct
2 Correct 1 ms 2384 KB Output is correct
3 Correct 1 ms 2384 KB Output is correct
4 Correct 1 ms 2384 KB Output is correct
5 Correct 1 ms 2384 KB Output is correct
6 Correct 4 ms 2640 KB Output is correct
7 Correct 6 ms 2640 KB Output is correct
8 Correct 6 ms 2640 KB Output is correct
9 Correct 3 ms 2384 KB Output is correct
10 Correct 7 ms 2640 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 2384 KB Output is correct
2 Correct 1 ms 2384 KB Output is correct
3 Correct 2 ms 2384 KB Output is correct
4 Correct 1 ms 2384 KB Output is correct
5 Correct 1 ms 2384 KB Output is correct
6 Correct 4 ms 2640 KB Output is correct
7 Correct 8 ms 2640 KB Output is correct
8 Correct 5 ms 2676 KB Output is correct
9 Correct 3 ms 2396 KB Output is correct
10 Correct 7 ms 2640 KB Output is correct
11 Correct 1 ms 2384 KB Output is correct
12 Correct 1 ms 2384 KB Output is correct
13 Correct 4 ms 2640 KB Output is correct
14 Correct 1 ms 2384 KB Output is correct
15 Correct 8 ms 3136 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Incorrect 1 ms 336 KB Integer -2 violates the range [0, 350000]
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 1 ms 336 KB Integer -2 violates the range [0, 350000]
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 1 ms 336 KB Integer -2 violates the range [0, 350000]
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 1 ms 448 KB Integer -3 violates the range [0, 1000000008]
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 1 ms 336 KB Integer -3 violates the range [0, 1000000008]
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 1 ms 336 KB Integer -3 violates the range [0, 1000000008]
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 1 ms 336 KB Integer -3 violates the range [0, 1000000008]
2 Halted 0 ms 0 KB -