#include <bits/stdc++.h>
#include <unordered_set>
#define all(v) (v.begin()), (v.end())
#define setall(a, val) memset(a, val, sizeof a)
#define ll long long
const ll MOD = 10007;
const ll N = 5e3 + 1;
const ll M = 2e2 + 1;
using namespace std;
bool vis[M];
int main() {
ios::sync_with_stdio(0); cin.tie(0); cout.tie(0);
int n, cnt = 1;
cin >> n;
vector<int> ans(n);
for (int i = 1; i <= n; i++) {
if (vis[i])
continue;
ans[i - 1] = cnt;
for (int j = i + 1; j <= n; j++) {
if (vis[j])
continue;
int x;
cout << 2 << ' ' << i << ' ' << j << endl;
cin >> x;
if (x == 1)
vis[j] = 1, ans[j - 1] = cnt;
}
cnt++;
}
cout << "0 ";
for (int x : ans)
cout << x << ' ';
cout << endl;
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
7 ms |
208 KB |
Output is correct |
2 |
Correct |
18 ms |
208 KB |
Output is correct |
3 |
Partially correct |
44 ms |
208 KB |
Partially correct |
4 |
Partially correct |
70 ms |
208 KB |
Partially correct |
5 |
Correct |
1 ms |
208 KB |
Output is correct |
6 |
Correct |
2 ms |
208 KB |
Output is correct |
7 |
Correct |
13 ms |
208 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
3 ms |
208 KB |
Output is correct |
2 |
Correct |
19 ms |
208 KB |
Output is correct |
3 |
Partially correct |
39 ms |
208 KB |
Partially correct |
4 |
Partially correct |
76 ms |
208 KB |
Partially correct |
5 |
Correct |
2 ms |
208 KB |
Output is correct |
6 |
Correct |
3 ms |
208 KB |
Output is correct |
7 |
Correct |
5 ms |
208 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
2 ms |
208 KB |
Output is correct |
2 |
Correct |
6 ms |
208 KB |
Output is correct |
3 |
Partially correct |
27 ms |
208 KB |
Partially correct |
4 |
Partially correct |
99 ms |
208 KB |
Partially correct |
5 |
Correct |
5 ms |
208 KB |
Output is correct |
6 |
Correct |
7 ms |
208 KB |
Output is correct |
7 |
Correct |
24 ms |
208 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
4 ms |
208 KB |
Output is correct |
2 |
Correct |
4 ms |
208 KB |
Output is correct |
3 |
Partially correct |
53 ms |
208 KB |
Partially correct |
4 |
Partially correct |
85 ms |
208 KB |
Partially correct |
5 |
Correct |
9 ms |
208 KB |
Output is correct |
6 |
Correct |
18 ms |
208 KB |
Output is correct |
7 |
Correct |
16 ms |
208 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
2 ms |
208 KB |
Output is correct |
2 |
Correct |
10 ms |
208 KB |
Output is correct |
3 |
Partially correct |
19 ms |
208 KB |
Partially correct |
4 |
Partially correct |
51 ms |
208 KB |
Partially correct |
5 |
Correct |
31 ms |
208 KB |
Output is correct |
6 |
Partially correct |
46 ms |
208 KB |
Partially correct |
7 |
Partially correct |
85 ms |
208 KB |
Partially correct |