Submission #618102

# Submission time Handle Problem Language Result Execution time Memory
618102 2022-08-01T22:35:23 Z Elnady Carnival (CEOI14_carnival) C++17
0 / 100
0 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 << " ";
		cout << endl;
		cin >> x;
		if (x != y + 1)
		{
			for (int k = 0; k < sz(b); k++)
			{
				cout << "2 " << b[k] + 1 << " " << i + 1;
				cout << endl;
				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 << endl;
	return 0;
}
# Verdict Execution time Memory Grader output
1 Runtime error 0 ms 208 KB Execution killed with signal 13
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Runtime error 0 ms 208 KB Execution killed with signal 13
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Runtime error 0 ms 208 KB Execution killed with signal 13
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Runtime error 0 ms 208 KB Execution killed with signal 13
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Runtime error 0 ms 208 KB Execution killed with signal 13
2 Halted 0 ms 0 KB -