답안 #65278

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
65278 2018-08-07T09:40:12 Z gnoor 곤돌라 (IOI14_gondola) C++17
10 / 100
23 ms 876 KB
#include "gondola.h"

#include <cmath>
#include <cstdio>

int valid(int n, int inputSeq[])
{
	int key=-1;
	int id=-1;
	int cur;
	for (int i=0;i<n;i++) inputSeq[i]--;
	for (int i=0;i<n;i++) {
		if (inputSeq[i]>=n) continue;
		key=inputSeq[i];
		id=i;
	}
	for (int i=0;i<n;i++) {
		if (inputSeq[i]>=n) continue;
		cur=key+i-id;
		cur%=n;
		cur+=n;
		cur%=n;
		if (inputSeq[i]!=cur) return 0;
	}
	return 1;
}

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

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

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

int countReplacement(int n, int inputSeq[])
{
  return -3;
}
# 결과 실행 시간 메모리 Grader output
1 Correct 2 ms 376 KB Output is correct
2 Correct 3 ms 488 KB Output is correct
3 Correct 2 ms 488 KB Output is correct
4 Correct 2 ms 488 KB Output is correct
5 Correct 2 ms 488 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 2 ms 488 KB Output is correct
2 Correct 2 ms 488 KB Output is correct
3 Correct 2 ms 488 KB Output is correct
4 Correct 3 ms 488 KB Output is correct
5 Correct 2 ms 488 KB Output is correct
6 Correct 7 ms 624 KB Output is correct
7 Correct 23 ms 828 KB Output is correct
8 Correct 13 ms 876 KB Output is correct
9 Correct 6 ms 876 KB Output is correct
10 Correct 15 ms 876 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 2 ms 876 KB Output is correct
2 Correct 3 ms 876 KB Output is correct
3 Correct 2 ms 876 KB Output is correct
4 Correct 2 ms 876 KB Output is correct
5 Correct 2 ms 876 KB Output is correct
6 Correct 13 ms 876 KB Output is correct
7 Correct 20 ms 876 KB Output is correct
8 Correct 15 ms 876 KB Output is correct
9 Correct 5 ms 876 KB Output is correct
10 Correct 21 ms 876 KB Output is correct
11 Incorrect 2 ms 876 KB Output isn't correct
12 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 3 ms 876 KB Integer -2 violates the range [0, 350000]
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 2 ms 876 KB Integer -2 violates the range [0, 350000]
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 3 ms 876 KB Integer -2 violates the range [0, 350000]
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 3 ms 876 KB Integer -3 violates the range [0, 1000000008]
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 3 ms 876 KB Integer -3 violates the range [0, 1000000008]
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 2 ms 876 KB Integer -3 violates the range [0, 1000000008]
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 2 ms 876 KB Integer -3 violates the range [0, 1000000008]
2 Halted 0 ms 0 KB -