#include <iostream>
#include <algorithm>
#include <vector>
#include <cmath>
#include <set>
#include <map>
#include <iomanip>
#include <stack>
#include <queue>
#include <deque>
using namespace std;
typedef long long ll;
typedef pair <int, int> pii;
#define sz(a) (int)a.size()
#define all(a) a.begin(), a.end()
#define pb push_back
#define ppb pop_back
#define mkp make_pair
#define F first
#define S second
#define show(a) cerr << #a <<" -> "<< a <<"\n"
#define fo(a, b, c, d) for(int (a) = (b); (a) <= (c); (a) += (d))
#define foo(a, b, c ,d) for(int (a) = (b); (a) >= (c); (a) -= (d))
//#define int ll
const int N = 200;
const int INF = 1e9;
int n, a[N];
int main () {
cin >> n;
int col = 0;
fo(i, 1, n, 1) {
if(a[i] != 0) continue;
a[i] = ++col;
fo(j, i + 1, n, 1) {
cout << 2 <<' '<< i <<' '<< j <<endl;
int cnt;
cin >> cnt;
if(cnt == 1) {
a[j] = col;
}
}
}
cout << 0 <<" ";
fo(i, 1, n, 1)
cout << a[i] <<" ";
cout << endl;
return 0;
}
/*
If you only do what you can do,
You will never be more than you are now!
----------------------------------------
We must all suffer from one of two pains: the pain of discipline or the pain of regret.
The difference is discipline weighs grams while regret weighs tons.
*/
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
13 ms |
376 KB |
Output is correct |
2 |
Partially correct |
39 ms |
376 KB |
Partially correct |
3 |
Partially correct |
70 ms |
376 KB |
Partially correct |
4 |
Partially correct |
43 ms |
248 KB |
Partially correct |
5 |
Correct |
6 ms |
376 KB |
Output is correct |
6 |
Correct |
4 ms |
248 KB |
Output is correct |
7 |
Correct |
15 ms |
376 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
10 ms |
376 KB |
Output is correct |
2 |
Correct |
40 ms |
376 KB |
Output is correct |
3 |
Partially correct |
26 ms |
248 KB |
Partially correct |
4 |
Partially correct |
44 ms |
376 KB |
Partially correct |
5 |
Correct |
7 ms |
376 KB |
Output is correct |
6 |
Correct |
15 ms |
248 KB |
Output is correct |
7 |
Correct |
10 ms |
248 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
3 ms |
248 KB |
Output is correct |
2 |
Correct |
7 ms |
248 KB |
Output is correct |
3 |
Partially correct |
62 ms |
376 KB |
Partially correct |
4 |
Partially correct |
70 ms |
376 KB |
Partially correct |
5 |
Correct |
12 ms |
248 KB |
Output is correct |
6 |
Correct |
16 ms |
248 KB |
Output is correct |
7 |
Partially correct |
39 ms |
248 KB |
Partially correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
7 ms |
380 KB |
Output is correct |
2 |
Correct |
12 ms |
248 KB |
Output is correct |
3 |
Partially correct |
48 ms |
248 KB |
Partially correct |
4 |
Partially correct |
130 ms |
248 KB |
Partially correct |
5 |
Partially correct |
29 ms |
248 KB |
Partially correct |
6 |
Partially correct |
59 ms |
248 KB |
Partially correct |
7 |
Partially correct |
25 ms |
248 KB |
Partially correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
3 ms |
248 KB |
Output is correct |
2 |
Correct |
14 ms |
248 KB |
Output is correct |
3 |
Partially correct |
77 ms |
248 KB |
Partially correct |
4 |
Partially correct |
75 ms |
248 KB |
Partially correct |
5 |
Partially correct |
63 ms |
376 KB |
Partially correct |
6 |
Partially correct |
74 ms |
248 KB |
Partially correct |
7 |
Partially correct |
107 ms |
376 KB |
Partially correct |