답안 #69665

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
69665 2018-08-21T11:16:12 Z E869120 곤돌라 (IOI14_gondola) C++14
10 / 100
24 ms 5376 KB
#include "gondola.h"
#include <vector>
using namespace std;

int valid(int n, int inputSeq[]) {
	vector<int>vec(250009, 0);
	for (int i = 0; i < n; i++) vec[inputSeq[i]]++;
	for (int i = 0; i < n; i++) { if (vec[i] >= 2) return 0; }

	for (int i = 0; i < n; i++) { if (inputSeq[i] > n) inputSeq[i] = -1; }
	int v = -1;
	for (int i = 0; i < n; i++) {
		if (inputSeq[i] != -1) {
			int z = (inputSeq[i] - i + n) % n;
			if (v == -1) v = z;
			else if (v != z) 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 3 ms 1236 KB Output is correct
2 Correct 3 ms 1400 KB Output is correct
3 Correct 3 ms 1400 KB Output is correct
4 Correct 3 ms 1400 KB Output is correct
5 Correct 3 ms 1508 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 3 ms 1528 KB Output is correct
2 Correct 3 ms 1528 KB Output is correct
3 Correct 3 ms 1528 KB Output is correct
4 Correct 3 ms 1584 KB Output is correct
5 Correct 4 ms 1584 KB Output is correct
6 Correct 8 ms 1904 KB Output is correct
7 Correct 17 ms 2628 KB Output is correct
8 Correct 13 ms 2896 KB Output is correct
9 Correct 9 ms 2920 KB Output is correct
10 Correct 15 ms 3636 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 3 ms 3636 KB Output is correct
2 Correct 3 ms 3636 KB Output is correct
3 Correct 3 ms 3636 KB Output is correct
4 Correct 3 ms 3636 KB Output is correct
5 Correct 3 ms 3636 KB Output is correct
6 Correct 8 ms 3716 KB Output is correct
7 Correct 24 ms 4504 KB Output is correct
8 Correct 14 ms 4648 KB Output is correct
9 Correct 7 ms 4664 KB Output is correct
10 Correct 15 ms 5376 KB Output is correct
11 Incorrect 4 ms 5376 KB Output isn't correct
12 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 3 ms 5376 KB Integer -2 violates the range [0, 350000]
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 2 ms 5376 KB Integer -2 violates the range [0, 350000]
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 2 ms 5376 KB Integer -2 violates the range [0, 350000]
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 3 ms 5376 KB Integer -3 violates the range [0, 1000000008]
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 3 ms 5376 KB Integer -3 violates the range [0, 1000000008]
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 2 ms 5376 KB Integer -3 violates the range [0, 1000000008]
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 3 ms 5376 KB Integer -3 violates the range [0, 1000000008]
2 Halted 0 ms 0 KB -