답안 #551337

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
551337 2022-04-20T12:28:55 Z AugustinasJucas 사육제 (CEOI14_carnival) C++14
20 / 100
83 ms 292 KB
#include <bits/stdc++.h>
using namespace std;
const int dydis = 151;
int type[dydis];
int ask(vector<int> vec) {
	cout << vec.size() << " ";
	for(auto &x : vec) cout << x+1 << " ";
	cout << endl; 
	int ans;
	cin >> ans;
	return ans;
}
int main () {
	
	int n;
	cin >> n;
	for(int i = 0; i < n; i++) type[i] = -1;
	int ind = 0;
	for(int i = 0; i < n; i++) {
		if(type[i] != -1) continue;
		type[i] = ind++;
		for(int j = i+1; j < n; j++) {
			if(type[j] != -1) continue;
			if(ask({i, j}) == 1) {
				type[j] = type[i];
			}
		}
	}
	
	cout << "0 ";
	for(int i = 0; i < n; i++) {
		cout << type[i] + 1 << " ";
	}
	cout << endl;
	
	
	return 0;
}
# 결과 실행 시간 메모리 Grader output
1 Correct 7 ms 292 KB Output is correct
2 Correct 20 ms 208 KB Output is correct
3 Partially correct 53 ms 208 KB Partially correct
4 Partially correct 43 ms 208 KB Partially correct
5 Correct 2 ms 208 KB Output is correct
6 Correct 1 ms 208 KB Output is correct
7 Correct 13 ms 208 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 4 ms 208 KB Output is correct
2 Correct 21 ms 292 KB Output is correct
3 Partially correct 34 ms 208 KB Partially correct
4 Partially correct 61 ms 208 KB Partially correct
5 Correct 3 ms 208 KB Output is correct
6 Correct 2 ms 208 KB Output is correct
7 Correct 9 ms 208 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 2 ms 208 KB Output is correct
2 Correct 6 ms 208 KB Output is correct
3 Partially correct 36 ms 208 KB Partially correct
4 Partially correct 83 ms 208 KB Partially correct
5 Correct 7 ms 208 KB Output is correct
6 Correct 13 ms 208 KB Output is correct
7 Correct 24 ms 208 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 4 ms 208 KB Output is correct
2 Correct 5 ms 208 KB Output is correct
3 Partially correct 74 ms 208 KB Partially correct
4 Partially correct 47 ms 208 KB Partially correct
5 Correct 5 ms 208 KB Output is correct
6 Correct 32 ms 208 KB Output is correct
7 Correct 22 ms 208 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 2 ms 208 KB Output is correct
2 Correct 12 ms 208 KB Output is correct
3 Partially correct 46 ms 208 KB Partially correct
4 Partially correct 57 ms 208 KB Partially correct
5 Correct 30 ms 208 KB Output is correct
6 Partially correct 31 ms 208 KB Partially correct
7 Partially correct 70 ms 208 KB Partially correct