#include <bits/stdc++.h>
#define fi first
#define se second
#define pb push_back
//#define int long long
#define lf (id<<1)
#define rg ((id<<1)|1)
#define md ((l+r)>>1)
using namespace std;
typedef pair<int,int> pii;
typedef pair<pii,int> ipii;
const int INF = 1e9+10;
const int MAXN = 1e6+10;
int n;
int a[200], cnt;
signed main() {
cin >> n;
for(int i=1; i<=n; i++){
if(a[i] != 0) continue;
a[i] = ++cnt;
for(int j=i+1; j<=n; j++){
cout << "2 " << i << ' ' << j << endl;
int te; cin >> te;
if(te == 1){
a[j] = cnt;
}
}
}
cout << "0 ";
for(int i=1; i<=n; i++) cout << a[i] << ' ';
cout << endl;
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
6 ms |
344 KB |
Output is correct |
2 |
Partially correct |
15 ms |
344 KB |
Partially correct |
3 |
Partially correct |
44 ms |
344 KB |
Partially correct |
4 |
Partially correct |
38 ms |
344 KB |
Partially correct |
5 |
Correct |
1 ms |
344 KB |
Output is correct |
6 |
Correct |
1 ms |
344 KB |
Output is correct |
7 |
Correct |
10 ms |
344 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
4 ms |
500 KB |
Output is correct |
2 |
Correct |
13 ms |
344 KB |
Output is correct |
3 |
Partially correct |
18 ms |
344 KB |
Partially correct |
4 |
Partially correct |
43 ms |
344 KB |
Partially correct |
5 |
Correct |
4 ms |
344 KB |
Output is correct |
6 |
Correct |
5 ms |
344 KB |
Output is correct |
7 |
Correct |
6 ms |
344 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
344 KB |
Output is correct |
2 |
Correct |
4 ms |
344 KB |
Output is correct |
3 |
Partially correct |
24 ms |
596 KB |
Partially correct |
4 |
Partially correct |
48 ms |
344 KB |
Partially correct |
5 |
Correct |
8 ms |
344 KB |
Output is correct |
6 |
Correct |
12 ms |
344 KB |
Output is correct |
7 |
Partially correct |
19 ms |
344 KB |
Partially correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
2 ms |
344 KB |
Output is correct |
2 |
Correct |
5 ms |
344 KB |
Output is correct |
3 |
Partially correct |
34 ms |
344 KB |
Partially correct |
4 |
Partially correct |
46 ms |
344 KB |
Partially correct |
5 |
Partially correct |
11 ms |
344 KB |
Partially correct |
6 |
Partially correct |
18 ms |
344 KB |
Partially correct |
7 |
Partially correct |
15 ms |
344 KB |
Partially correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
344 KB |
Output is correct |
2 |
Correct |
9 ms |
344 KB |
Output is correct |
3 |
Partially correct |
30 ms |
344 KB |
Partially correct |
4 |
Partially correct |
43 ms |
344 KB |
Partially correct |
5 |
Partially correct |
26 ms |
344 KB |
Partially correct |
6 |
Partially correct |
28 ms |
344 KB |
Partially correct |
7 |
Partially correct |
46 ms |
344 KB |
Partially correct |