#include <bits/stdc++.h>
using namespace std;
const int mxN = 157;
int ans[mxN];
int32_t main() {
ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0);
int n;
cin >> n;
int cur = 1;
for (int i = 1; i <= n; ++i) {
if (!ans[i]) {
ans[i] = cur++;
for (int j = i + 1; j <= n; ++j) {
if (!ans[j]) {
cout << "2 " << i << ' ' << j << endl;
int num;
cin >> num;
if (num == 1) {
ans[j] = ans[i];
}
}
}
}
}
cout << "0 ";
for (int i = 1; i <= n; ++i) {
cout << ans[i] << ' ';
}
cout << endl;
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
8 ms |
200 KB |
Output is correct |
2 |
Correct |
22 ms |
200 KB |
Output is correct |
3 |
Partially correct |
48 ms |
200 KB |
Partially correct |
4 |
Partially correct |
80 ms |
200 KB |
Partially correct |
5 |
Correct |
2 ms |
200 KB |
Output is correct |
6 |
Correct |
2 ms |
200 KB |
Output is correct |
7 |
Correct |
15 ms |
200 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
3 ms |
200 KB |
Output is correct |
2 |
Correct |
19 ms |
200 KB |
Output is correct |
3 |
Partially correct |
22 ms |
200 KB |
Partially correct |
4 |
Partially correct |
78 ms |
200 KB |
Partially correct |
5 |
Correct |
4 ms |
200 KB |
Output is correct |
6 |
Correct |
3 ms |
200 KB |
Output is correct |
7 |
Correct |
7 ms |
200 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
200 KB |
Output is correct |
2 |
Correct |
6 ms |
200 KB |
Output is correct |
3 |
Partially correct |
40 ms |
200 KB |
Partially correct |
4 |
Partially correct |
86 ms |
200 KB |
Partially correct |
5 |
Correct |
7 ms |
200 KB |
Output is correct |
6 |
Correct |
8 ms |
200 KB |
Output is correct |
7 |
Correct |
20 ms |
200 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
4 ms |
200 KB |
Output is correct |
2 |
Correct |
6 ms |
200 KB |
Output is correct |
3 |
Partially correct |
78 ms |
200 KB |
Partially correct |
4 |
Partially correct |
70 ms |
200 KB |
Partially correct |
5 |
Correct |
12 ms |
200 KB |
Output is correct |
6 |
Correct |
22 ms |
200 KB |
Output is correct |
7 |
Correct |
19 ms |
200 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
2 ms |
200 KB |
Output is correct |
2 |
Correct |
11 ms |
200 KB |
Output is correct |
3 |
Partially correct |
52 ms |
200 KB |
Partially correct |
4 |
Partially correct |
37 ms |
200 KB |
Partially correct |
5 |
Correct |
19 ms |
200 KB |
Output is correct |
6 |
Partially correct |
59 ms |
200 KB |
Partially correct |
7 |
Partially correct |
94 ms |
200 KB |
Partially correct |