답안 #832407

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
832407 2023-08-21T10:03:39 Z ttamx 곤돌라 (IOI14_gondola) C++14
20 / 100
37 ms 5556 KB
#include "gondola.h"
#include<bits/stdc++.h>

using namespace std;

int valid(int n, int Seq[]){
	vector<int> s(n);
	map<int,bool> mp;
	for(int i=0;i<n;i++){
		if(mp[Seq[i]])return 0;
		mp[Seq[i]]=true;
		if(Seq[i]<=n)s[i]=Seq[i];
	}
	for(int t=0;t<2;t++){
		for(int i=0;i<n;i++){
			if(s[i]>0){
				auto &x=s[(i+1)%n];
				int val=s[i]%n+1;
				if(x==0)x=val;
				else if(x!=val)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 0 ms 212 KB Output is correct
2 Correct 0 ms 212 KB Output is correct
3 Correct 0 ms 212 KB Output is correct
4 Correct 0 ms 212 KB Output is correct
5 Correct 0 ms 212 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 212 KB Output is correct
2 Correct 0 ms 212 KB Output is correct
3 Correct 0 ms 212 KB Output is correct
4 Correct 0 ms 212 KB Output is correct
5 Correct 0 ms 212 KB Output is correct
6 Correct 11 ms 2260 KB Output is correct
7 Correct 7 ms 952 KB Output is correct
8 Correct 20 ms 4156 KB Output is correct
9 Correct 6 ms 1492 KB Output is correct
10 Correct 25 ms 4872 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 212 KB Output is correct
2 Correct 0 ms 212 KB Output is correct
3 Correct 0 ms 212 KB Output is correct
4 Correct 0 ms 212 KB Output is correct
5 Correct 0 ms 212 KB Output is correct
6 Correct 11 ms 2260 KB Output is correct
7 Correct 7 ms 980 KB Output is correct
8 Correct 20 ms 4180 KB Output is correct
9 Correct 6 ms 1492 KB Output is correct
10 Correct 26 ms 4800 KB Output is correct
11 Correct 0 ms 212 KB Output is correct
12 Correct 1 ms 212 KB Output is correct
13 Correct 16 ms 2368 KB Output is correct
14 Correct 1 ms 212 KB Output is correct
15 Correct 37 ms 5556 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Incorrect 0 ms 212 KB Integer -2 violates the range [0, 350000]
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 0 ms 212 KB Integer -2 violates the range [0, 350000]
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 0 ms 212 KB Integer -2 violates the range [0, 350000]
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 0 ms 212 KB Integer -3 violates the range [0, 1000000008]
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 0 ms 212 KB Integer -3 violates the range [0, 1000000008]
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 0 ms 212 KB Integer -3 violates the range [0, 1000000008]
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 0 ms 212 KB Integer -3 violates the range [0, 1000000008]
2 Halted 0 ms 0 KB -