답안 #114372

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
114372 2019-06-01T06:17:28 Z E869120 곤돌라 (IOI14_gondola) C++14
10 / 100
42 ms 5752 KB
#include "gondola.h"
#include <bits/stdc++.h>
using namespace std;

int valid(int n, int inputSeq[]) {
	vector<int>vec; int minx = (1 << 30), minid = -1; map<int, int>Map;
	for (int i = 0; i < n; i++) { if (minx > inputSeq[i]) { minx = inputSeq[i]; minid = i; } if (Map[inputSeq[i]] == 1) return 0; Map[inputSeq[i]] = 1;}
	for (int i = 0; i < n; i++) { int s = (i + minid) % n; if (inputSeq[s] <= n) vec.push_back(inputSeq[s]); }
	
	for (int i = 0; i < (int)vec.size() - 1; i++) {
		if (vec[i] >= vec[i + 1]) 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 512 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 356 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 3 ms 512 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 256 KB Output is correct
5 Correct 2 ms 256 KB Output is correct
6 Correct 17 ms 2816 KB Output is correct
7 Correct 13 ms 1152 KB Output is correct
8 Correct 34 ms 4988 KB Output is correct
9 Correct 10 ms 1792 KB Output is correct
10 Correct 42 ms 5636 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 2 ms 512 KB Output is correct
2 Correct 2 ms 260 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 18 ms 2816 KB Output is correct
7 Correct 13 ms 1280 KB Output is correct
8 Correct 33 ms 5108 KB Output is correct
9 Correct 11 ms 1792 KB Output is correct
10 Correct 42 ms 5752 KB Output is correct
11 Correct 3 ms 256 KB Output is correct
12 Incorrect 3 ms 384 KB Output isn't correct
13 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 2 ms 384 KB Integer -2 violates the range [0, 350000]
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 2 ms 384 KB Integer -2 violates the range [0, 350000]
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 3 ms 384 KB Integer -2 violates the range [0, 350000]
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 2 ms 384 KB Integer -3 violates the range [0, 1000000008]
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 2 ms 384 KB Integer -3 violates the range [0, 1000000008]
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 2 ms 256 KB Integer -3 violates the range [0, 1000000008]
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 2 ms 384 KB Integer -3 violates the range [0, 1000000008]
2 Halted 0 ms 0 KB -