#include "bits/stdc++.h"
using namespace std;
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace __gnu_pbds;
typedef tree<int, null_type, less<int>, rb_tree_tag, tree_order_statistics_node_update> ordered_set;
#define ll long long
#define mod 1000000007
int ans[151];
signed main() {
ios::sync_with_stdio(false);
cin.tie(NULL);
cout.tie(NULL);
int n;
cin >> n;
int x = 1;
for(int i = 1; i <= n; i++) {
if(ans[i])
continue;
ans[i] = x;
for(int j = i + 1; j <= n; j++) {
if(ans[j])
continue;
cout << 2 << " " << i << " " << j << endl;
int y;
cin >> y;
if(y == 1)
ans[j] = x;
}
x++;
}
cout << 0 << " ";
for(int i = 1; i <= n; i++)
cout << ans[i] << " ";
return 0;
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
4 ms |
208 KB |
Output is correct |
2 |
Correct |
17 ms |
208 KB |
Output is correct |
3 |
Partially correct |
24 ms |
208 KB |
Partially correct |
4 |
Partially correct |
29 ms |
208 KB |
Partially correct |
5 |
Correct |
2 ms |
208 KB |
Output is correct |
6 |
Correct |
2 ms |
208 KB |
Output is correct |
7 |
Correct |
16 ms |
208 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
4 ms |
208 KB |
Output is correct |
2 |
Correct |
23 ms |
256 KB |
Output is correct |
3 |
Partially correct |
43 ms |
208 KB |
Partially correct |
4 |
Partially correct |
55 ms |
208 KB |
Partially correct |
5 |
Correct |
3 ms |
208 KB |
Output is correct |
6 |
Correct |
3 ms |
208 KB |
Output is correct |
7 |
Correct |
6 ms |
208 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
208 KB |
Output is correct |
2 |
Correct |
7 ms |
208 KB |
Output is correct |
3 |
Partially correct |
27 ms |
208 KB |
Partially correct |
4 |
Partially correct |
90 ms |
208 KB |
Partially correct |
5 |
Correct |
7 ms |
208 KB |
Output is correct |
6 |
Correct |
6 ms |
208 KB |
Output is correct |
7 |
Correct |
19 ms |
208 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
4 ms |
208 KB |
Output is correct |
2 |
Correct |
6 ms |
208 KB |
Output is correct |
3 |
Partially correct |
96 ms |
208 KB |
Partially correct |
4 |
Partially correct |
84 ms |
208 KB |
Partially correct |
5 |
Correct |
9 ms |
208 KB |
Output is correct |
6 |
Correct |
24 ms |
208 KB |
Output is correct |
7 |
Correct |
20 ms |
248 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
3 ms |
208 KB |
Output is correct |
2 |
Correct |
13 ms |
208 KB |
Output is correct |
3 |
Partially correct |
48 ms |
208 KB |
Partially correct |
4 |
Partially correct |
61 ms |
208 KB |
Partially correct |
5 |
Correct |
33 ms |
208 KB |
Output is correct |
6 |
Partially correct |
25 ms |
208 KB |
Partially correct |
7 |
Partially correct |
92 ms |
208 KB |
Partially correct |