This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#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 |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |