답안 #118819

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
118819 2019-06-19T22:34:24 Z ly20 곤돌라 (IOI14_gondola) C++17
10 / 100
12 ms 1280 KB
#include<bits/stdc++.h>
using namespace std;
const int INF=1123456789;
#include "gondola.h"
int valid(int n,int seq[])
{
	int mn=INF,at=INF,at2=INF;
	int st=0;
	bool vl=1;
	for(int i=0;i<n;i++)
	{
		if(st==0)
		{
			if(seq[i]<at && seq[i]<=n && at==INF)
			{
				at=seq[i];mn=seq[i];
			}
			else if(seq[i]<at && seq[i]<=n)
			{
				at2=seq[i];st=1;
			}
			else at=seq[i];
		}
		else
		{
			if(seq[i]>n)continue;
			if(seq[i]<at2 || seq[i]>mn || seq[i]>at)vl=0;
			at2=seq[i];
		}
	}	
	return vl;
}
int replacement(int n,int gondolaseq[],int replacementseq[])
{
	return 0;
}
int countReplacement(int n,int inputSeq[])
{
	return 0;
}
# 결과 실행 시간 메모리 Grader output
1 Correct 3 ms 384 KB Output is correct
2 Correct 2 ms 384 KB Output is correct
3 Correct 2 ms 256 KB Output is correct
4 Correct 2 ms 384 KB Output is correct
5 Correct 2 ms 256 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 2 ms 256 KB Output is correct
2 Correct 2 ms 384 KB Output is correct
3 Correct 2 ms 384 KB Output is correct
4 Correct 2 ms 384 KB Output is correct
5 Correct 2 ms 384 KB Output is correct
6 Correct 6 ms 640 KB Output is correct
7 Correct 12 ms 1152 KB Output is correct
8 Correct 9 ms 1024 KB Output is correct
9 Correct 4 ms 384 KB Output is correct
10 Correct 10 ms 1152 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 2 ms 256 KB Output is correct
2 Correct 2 ms 256 KB Output is correct
3 Correct 2 ms 384 KB Output is correct
4 Correct 2 ms 384 KB Output is correct
5 Correct 2 ms 384 KB Output is correct
6 Correct 6 ms 640 KB Output is correct
7 Correct 12 ms 1280 KB Output is correct
8 Correct 10 ms 1024 KB Output is correct
9 Correct 4 ms 512 KB Output is correct
10 Correct 10 ms 1152 KB Output is correct
11 Incorrect 2 ms 384 KB Output isn't correct
12 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 2 ms 384 KB Output isn't correct
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 2 ms 384 KB Output isn't correct
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 2 ms 384 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 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 Output isn't correct
2 Halted 0 ms 0 KB -