#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;
vector<int> xx = { 1, 2, 1, 3, 2 };
int f(int l, int r)
{
set<int> st;
for (int i = l; i <= r; i++)
{
st.insert(xx[i]);
}
return sz(st);
}
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 << "\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;
}
cout << "0 ";
for (int i = 0; i < n; i++)
cout << a[i] << " ";
cout << "\n";
fflush(stdout);
}
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Runtime error |
0 ms |
208 KB |
Execution killed with signal 13 |
2 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Runtime error |
0 ms |
208 KB |
Execution killed with signal 13 |
2 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Runtime error |
0 ms |
208 KB |
Execution killed with signal 13 |
2 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Runtime error |
0 ms |
208 KB |
Execution killed with signal 13 |
2 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Runtime error |
0 ms |
208 KB |
Execution killed with signal 13 |
2 |
Halted |
0 ms |
0 KB |
- |