답안 #1102889

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

#define MAXN 500007
using namespace std;

int n;
int s[MAXN],last;

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;
		}
	}

	if(s[mins]>n)return 1;

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

		if(s[i]<=n)last=s[i];
	}

	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 2388 KB Output is correct
2 Correct 1 ms 2388 KB Output is correct
3 Correct 1 ms 2388 KB Output is correct
4 Correct 1 ms 2388 KB Output is correct
5 Correct 1 ms 2388 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 2388 KB Output is correct
2 Correct 1 ms 2388 KB Output is correct
3 Correct 1 ms 2388 KB Output is correct
4 Correct 1 ms 2388 KB Output is correct
5 Correct 1 ms 2388 KB Output is correct
6 Correct 5 ms 2876 KB Output is correct
7 Correct 8 ms 3412 KB Output is correct
8 Correct 7 ms 3156 KB Output is correct
9 Correct 3 ms 2900 KB Output is correct
10 Correct 7 ms 3412 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 2388 KB Output is correct
2 Correct 1 ms 2388 KB Output is correct
3 Correct 1 ms 2388 KB Output is correct
4 Correct 1 ms 2496 KB Output is correct
5 Correct 1 ms 2388 KB Output is correct
6 Correct 4 ms 2900 KB Output is correct
7 Correct 8 ms 3412 KB Output is correct
8 Correct 13 ms 3156 KB Output is correct
9 Correct 4 ms 2684 KB Output is correct
10 Correct 9 ms 3420 KB Output is correct
11 Incorrect 1 ms 2388 KB Output isn't correct
12 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 1 ms 340 KB Integer -2 violates the range [0, 350000]
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 1 ms 340 KB Integer -2 violates the range [0, 350000]
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 2 ms 448 KB Integer -2 violates the range [0, 350000]
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 1 ms 340 KB Integer -3 violates the range [0, 1000000008]
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 1 ms 340 KB Integer -3 violates the range [0, 1000000008]
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 1 ms 340 KB Integer -3 violates the range [0, 1000000008]
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 1 ms 340 KB Integer -3 violates the range [0, 1000000008]
2 Halted 0 ms 0 KB -