#include <bits/stdc++.h>
using namespace std ;
#define int long long
#define X first
#define Y second
#define F first
#define S second
//#define endl "\n"
#define pii pair < int , int >
int ans[155] ;
int32_t main()
{
ios_base::sync_with_stdio(false);
cin.tie(NULL);
cout.tie(NULL);
int n ; cin >> n ;
int c = 0 ;
for ( int i = 1 ; i <= n ; i++ )
{
if ( ans[i] != 0 ) continue ;
else { c++ ; ans[i] = c ; }
for ( int j = i+1 ; j <= n ; j++ )
{
if ( ans[j] != 0 ) continue;
cout << 2 << " " << i << " " << j << endl ;
int x ; cin >> x ;
if ( x == 1 ) ans[j] = c ;
}
}
for ( int i = 0 ; i <= n ; i++ ) cout << ans[i] << " " ;
cout << endl ;
}
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
5 ms |
200 KB |
Output is correct |
2 |
Correct |
20 ms |
200 KB |
Output is correct |
3 |
Partially correct |
59 ms |
200 KB |
Partially correct |
4 |
Partially correct |
76 ms |
200 KB |
Partially correct |
5 |
Correct |
1 ms |
200 KB |
Output is correct |
6 |
Correct |
1 ms |
200 KB |
Output is correct |
7 |
Correct |
18 ms |
200 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
5 ms |
200 KB |
Output is correct |
2 |
Correct |
9 ms |
200 KB |
Output is correct |
3 |
Partially correct |
42 ms |
200 KB |
Partially correct |
4 |
Partially correct |
66 ms |
200 KB |
Partially correct |
5 |
Correct |
3 ms |
200 KB |
Output is correct |
6 |
Correct |
3 ms |
200 KB |
Output is correct |
7 |
Correct |
7 ms |
200 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
2 ms |
200 KB |
Output is correct |
2 |
Correct |
4 ms |
200 KB |
Output is correct |
3 |
Partially correct |
24 ms |
200 KB |
Partially correct |
4 |
Partially correct |
62 ms |
200 KB |
Partially correct |
5 |
Correct |
5 ms |
200 KB |
Output is correct |
6 |
Correct |
3 ms |
200 KB |
Output is correct |
7 |
Correct |
20 ms |
200 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
4 ms |
200 KB |
Output is correct |
2 |
Correct |
5 ms |
200 KB |
Output is correct |
3 |
Partially correct |
96 ms |
200 KB |
Partially correct |
4 |
Partially correct |
99 ms |
200 KB |
Partially correct |
5 |
Correct |
12 ms |
200 KB |
Output is correct |
6 |
Correct |
30 ms |
296 KB |
Output is correct |
7 |
Correct |
20 ms |
200 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
3 ms |
200 KB |
Output is correct |
2 |
Correct |
11 ms |
200 KB |
Output is correct |
3 |
Partially correct |
44 ms |
200 KB |
Partially correct |
4 |
Partially correct |
72 ms |
200 KB |
Partially correct |
5 |
Correct |
34 ms |
200 KB |
Output is correct |
6 |
Partially correct |
55 ms |
200 KB |
Partially correct |
7 |
Partially correct |
88 ms |
200 KB |
Partially correct |