답안 #86925

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
86925 2018-11-28T15:06:28 Z antimirage 곤돌라 (IOI14_gondola) C++17
20 / 100
21 ms 2176 KB
#include "gondola.h"
#include <bits/stdc++.h>

using namespace std;

const int N = 3e5 + 5;

int n, u[N];

int valid(int N, int x[])
{
	n = N;
	for (int i = 0; i < n; i++)
	{
		if (u[x[i]] > 0)
			return 0;
		u[x[i]] = i + 1;
	}
	for (int i = 1; i < n; i++)
	{
		if ( u[i] != 0 && u[i + 1] != 0 && ((u[i] - 1) + 1) % n != u[i + 1] - 1)
			return 0;
	}
	if ( u[n] != 0 && u[1] != 0 && ((u[n] - 1) + 1) % n != u[1] - 1)
		return 0;
		
	return 1;
}	

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

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


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

int countReplacement(int n, int inputSeq[])
{
  return -3;
}
/**
1
30
16 26 18 19 20 13 22 21 24 25 17 27 28 29 30 1 2 3 11 5 6 8 7 9 10 12 4 23 14 15
**/
# 결과 실행 시간 메모리 Grader output
1 Correct 2 ms 504 KB Output is correct
2 Correct 2 ms 532 KB Output is correct
3 Correct 2 ms 548 KB Output is correct
4 Correct 2 ms 548 KB Output is correct
5 Correct 2 ms 548 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 2 ms 548 KB Output is correct
2 Correct 2 ms 548 KB Output is correct
3 Correct 2 ms 548 KB Output is correct
4 Correct 2 ms 548 KB Output is correct
5 Correct 2 ms 596 KB Output is correct
6 Correct 9 ms 972 KB Output is correct
7 Correct 15 ms 1248 KB Output is correct
8 Correct 21 ms 1248 KB Output is correct
9 Correct 7 ms 1248 KB Output is correct
10 Correct 14 ms 1264 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 2 ms 1264 KB Output is correct
2 Correct 2 ms 1264 KB Output is correct
3 Correct 2 ms 1264 KB Output is correct
4 Correct 2 ms 1264 KB Output is correct
5 Correct 2 ms 1264 KB Output is correct
6 Correct 7 ms 1264 KB Output is correct
7 Correct 15 ms 1292 KB Output is correct
8 Correct 13 ms 1292 KB Output is correct
9 Correct 9 ms 1292 KB Output is correct
10 Correct 15 ms 1292 KB Output is correct
11 Correct 2 ms 1292 KB Output is correct
12 Correct 2 ms 1292 KB Output is correct
13 Correct 9 ms 1804 KB Output is correct
14 Correct 2 ms 1804 KB Output is correct
15 Correct 19 ms 2176 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Incorrect 2 ms 2176 KB Integer -2 violates the range [0, 350000]
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 2 ms 2176 KB Integer -2 violates the range [0, 350000]
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 2 ms 2176 KB Integer -2 violates the range [0, 350000]
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 2 ms 2176 KB Integer -3 violates the range [0, 1000000008]
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 2 ms 2176 KB Integer -3 violates the range [0, 1000000008]
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 2 ms 2176 KB Integer -3 violates the range [0, 1000000008]
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 2 ms 2176 KB Integer -3 violates the range [0, 1000000008]
2 Halted 0 ms 0 KB -