답안 #618104

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
618104 2022-08-01T22:37:39 Z Elnady 사육제 (CEOI14_carnival) C++17
0 / 100
9 ms 208 KB
#include <bits/stdc++.h>

using namespace std;
//#define     endl                '\n'
#define     int                 long long
#define     all(pr1)            pr1.begin(),pr1.end()
#define     alr(pr1)            pr1.rbegin(),pr1.rend()
#define     CEIL(pr1, pr2)      (pr1 + pr2 - 1) / pr2
#define     IOS                 std::ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0);
#define		RT(s)				return cout<<s,0
#define		sz(s)				(long long)(s.size())

const long long N = 3e5 + 9, M = 1e9 + 9, MOD = 1e9 + 7, OO = 0x3f3f3f3f, MAX = 2147483647, LOO = 0x3f3f3f3f3f3f3f3f;

int32_t main()
{
	//IOS;
	int n, x, y = 0, cur = 0;
	cin >> n;
	vector<int> a(n), b;
	for (int i = 0; i < n; i++)
	{
		cout << (i + 1) << " ";
		for (int j = 0; j <= i; j++)
			cout << (j + 1) << " ";
		cout << "\n";
		fflush(stdout);
		cin >> x;
		if (x != y + 1)
		{
			for (int k = 0; k < sz(b); k++)
			{
				cout << "2 " << b[k] + 1 << " " << i + 1 << "\n";
				fflush(stdout);
				int z = 0;
				cin >> z;
				if (z < 2)
				{
					a[i] = a[b[k]];
					break;
				}
			}
		}
		else
		{
			a[i] = ++cur;
			b.push_back(i);
		}
		y = x;
	}
	for (int i = 0; i < n; i++)
		cout << a[i] << " ";
	cout << "\n";
	fflush(stdout);
	return 0;
}
# 결과 실행 시간 메모리 Grader output
1 Incorrect 9 ms 208 KB Same person came twice to the party.
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 7 ms 208 KB Same person came twice to the party.
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 4 ms 208 KB Unexpected end of file - int32 expected
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 6 ms 208 KB Same person came twice to the party.
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 5 ms 208 KB Same person came twice to the party.
2 Halted 0 ms 0 KB -