///LW M4 ACC HAZ3L GAMED
///YARAB WALA...I MEAN YARAB ACC
#include<bits/stdc++.h>
#define ll long long
//#define endl "\n"
const ll mod = (ll) 1e9 + 7;
using namespace std;
int main()
{
ios_base::sync_with_stdio(false);
cin.tie(NULL);
cout.tie(NULL);
ll n,cnt,took=0,p=1;
cin>>n;
vector<ll>ans(n);
cout<<n<<" ";
for (ll i=1; i<=n; i++)
cout<<i<<" ";
cout<<endl;
cin>>cnt;
for (ll i=0; i<n; i++){
if (ans[i]==0){
ans[i]=p;
took++;
for (ll j=i+1; j<n; j++){
if (ans[j]==0){
cout<<"2 "<<i+1<<" "<<j+1<<endl;
ll x;
cin>>x;
if (x==1){
ans[j]=p;
took++;
}
}
}
p++;
cnt--;
}
if (n-took==cnt){
for (ll j=0; j<n; j++){
if (ans[j]==0){
ans[j]=p;
p++;
}
}
break;
}
}
cout<<"0 ";
for (auto i:ans)
cout<<i<<" ";
cout<<endl;
return 0;
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
8 ms |
200 KB |
Output is correct |
2 |
Correct |
23 ms |
200 KB |
Output is correct |
3 |
Partially correct |
48 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 |
1 ms |
200 KB |
Output is correct |
7 |
Correct |
15 ms |
200 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
4 ms |
200 KB |
Output is correct |
2 |
Correct |
17 ms |
200 KB |
Output is correct |
3 |
Partially correct |
40 ms |
200 KB |
Partially correct |
4 |
Partially correct |
46 ms |
200 KB |
Partially correct |
5 |
Correct |
3 ms |
200 KB |
Output is correct |
6 |
Correct |
1 ms |
200 KB |
Output is correct |
7 |
Correct |
6 ms |
200 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
2 ms |
200 KB |
Output is correct |
2 |
Correct |
7 ms |
200 KB |
Output is correct |
3 |
Partially correct |
36 ms |
200 KB |
Partially correct |
4 |
Partially correct |
92 ms |
200 KB |
Partially correct |
5 |
Correct |
3 ms |
200 KB |
Output is correct |
6 |
Correct |
2 ms |
200 KB |
Output is correct |
7 |
Correct |
10 ms |
200 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
4 ms |
200 KB |
Output is correct |
2 |
Correct |
6 ms |
200 KB |
Output is correct |
3 |
Partially correct |
69 ms |
200 KB |
Partially correct |
4 |
Partially correct |
82 ms |
200 KB |
Partially correct |
5 |
Correct |
3 ms |
200 KB |
Output is correct |
6 |
Correct |
8 ms |
200 KB |
Output is correct |
7 |
Correct |
21 ms |
200 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
2 ms |
200 KB |
Output is correct |
2 |
Correct |
10 ms |
200 KB |
Output is correct |
3 |
Partially correct |
43 ms |
200 KB |
Partially correct |
4 |
Partially correct |
42 ms |
200 KB |
Partially correct |
5 |
Correct |
7 ms |
200 KB |
Output is correct |
6 |
Correct |
2 ms |
200 KB |
Output is correct |
7 |
Partially correct |
78 ms |
200 KB |
Partially correct |