#include <bits/stdc++.h>
//#include <fstream>
///#define endl '\n'
#define mod 10007
#define INF 100000000
#define ll long long
//ofstream fout("split.out");
//ifstream fin("split.in");
//#define cin fin
//#define cout fout
using namespace std;
int main()
{
ios_base::sync_with_stdio(0);cout.tie(0);cin.tie(0);
int n; cin >> n;
int ans[n+1] = {};
int cnt = 1;
for(int i = 1; i <= n; i++)
{
if(ans[i] != 0)
continue;
ans[i] = cnt;
cnt++;
for(int j = i+1; j <= n; j++)
{
int x;
cout << 2 << ' ' << i << ' ' << j << endl;
cin >> x;
if(x == 1)
{
ans[j] = ans[i];
}
}
}
cout << 0 << ' ';
for(int i = 1; i <= n; i++)
{
cout << ans[i] << ' ';
}
cout << endl;
return 0;
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
13 ms |
208 KB |
Output is correct |
2 |
Partially correct |
45 ms |
208 KB |
Partially correct |
3 |
Partially correct |
68 ms |
272 KB |
Partially correct |
4 |
Partially correct |
81 ms |
208 KB |
Partially correct |
5 |
Correct |
4 ms |
208 KB |
Output is correct |
6 |
Correct |
3 ms |
208 KB |
Output is correct |
7 |
Correct |
18 ms |
208 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
5 ms |
208 KB |
Output is correct |
2 |
Correct |
36 ms |
208 KB |
Output is correct |
3 |
Partially correct |
40 ms |
208 KB |
Partially correct |
4 |
Partially correct |
69 ms |
208 KB |
Partially correct |
5 |
Correct |
5 ms |
208 KB |
Output is correct |
6 |
Correct |
5 ms |
208 KB |
Output is correct |
7 |
Correct |
14 ms |
208 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
208 KB |
Output is correct |
2 |
Correct |
9 ms |
208 KB |
Output is correct |
3 |
Partially correct |
55 ms |
208 KB |
Partially correct |
4 |
Partially correct |
79 ms |
208 KB |
Partially correct |
5 |
Correct |
16 ms |
208 KB |
Output is correct |
6 |
Correct |
26 ms |
208 KB |
Output is correct |
7 |
Partially correct |
37 ms |
208 KB |
Partially correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
6 ms |
208 KB |
Output is correct |
2 |
Correct |
9 ms |
208 KB |
Output is correct |
3 |
Partially correct |
86 ms |
208 KB |
Partially correct |
4 |
Partially correct |
108 ms |
208 KB |
Partially correct |
5 |
Partially correct |
17 ms |
208 KB |
Partially correct |
6 |
Partially correct |
41 ms |
208 KB |
Partially correct |
7 |
Partially correct |
48 ms |
256 KB |
Partially correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
3 ms |
208 KB |
Output is correct |
2 |
Correct |
24 ms |
256 KB |
Output is correct |
3 |
Partially correct |
35 ms |
208 KB |
Partially correct |
4 |
Partially correct |
63 ms |
208 KB |
Partially correct |
5 |
Partially correct |
69 ms |
280 KB |
Partially correct |
6 |
Partially correct |
56 ms |
256 KB |
Partially correct |
7 |
Partially correct |
63 ms |
208 KB |
Partially correct |