#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++){
if(a[j] != 0) continue;
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;
}
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
3 ms |
344 KB |
Output is correct |
2 |
Correct |
9 ms |
344 KB |
Output is correct |
3 |
Partially correct |
27 ms |
344 KB |
Partially correct |
4 |
Partially correct |
35 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 |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
2 ms |
344 KB |
Output is correct |
2 |
Correct |
8 ms |
344 KB |
Output is correct |
3 |
Partially correct |
22 ms |
344 KB |
Partially correct |
4 |
Partially correct |
31 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 |
3 ms |
344 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
1 ms |
344 KB |
Output is correct |
2 |
Correct |
4 ms |
344 KB |
Output is correct |
3 |
Partially correct |
16 ms |
344 KB |
Partially correct |
4 |
Partially correct |
41 ms |
344 KB |
Partially correct |
5 |
Correct |
2 ms |
340 KB |
Output is correct |
6 |
Correct |
4 ms |
344 KB |
Output is correct |
7 |
Correct |
10 ms |
344 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
2 ms |
344 KB |
Output is correct |
2 |
Correct |
2 ms |
344 KB |
Output is correct |
3 |
Partially correct |
33 ms |
344 KB |
Partially correct |
4 |
Partially correct |
40 ms |
344 KB |
Partially correct |
5 |
Correct |
4 ms |
344 KB |
Output is correct |
6 |
Correct |
11 ms |
344 KB |
Output is correct |
7 |
Correct |
9 ms |
344 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
1 ms |
344 KB |
Output is correct |
2 |
Correct |
5 ms |
344 KB |
Output is correct |
3 |
Partially correct |
23 ms |
344 KB |
Partially correct |
4 |
Partially correct |
25 ms |
344 KB |
Partially correct |
5 |
Correct |
14 ms |
344 KB |
Output is correct |
6 |
Partially correct |
25 ms |
344 KB |
Partially correct |
7 |
Partially correct |
51 ms |
344 KB |
Partially correct |