#include <bits/stdc++.h>
using namespace std;
const int nax=150+5;
int col[nax];
int main(){
int N;
cin>>N;
int ind=1;
bool flag=false;
for(int i=0;i<N;i++){
if(!col[i])col[i]=ind,flag=true;
for(int j=i+1;j<N;j++){
cout<<"2 "<<i+1<<" "<<j+1<<endl;
int h;
cin>>h;
if(h==1&&!col[j])col[j]=ind;
}
if(flag)ind++,flag=0;
}
cout<<"0 ";
for(int i=0;i<N;i++)cout<<col[i]<<" ";
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Partially correct |
77 ms |
256 KB |
Partially correct |
2 |
Partially correct |
77 ms |
256 KB |
Partially correct |
3 |
Partially correct |
80 ms |
256 KB |
Partially correct |
4 |
Partially correct |
69 ms |
256 KB |
Partially correct |
5 |
Partially correct |
81 ms |
256 KB |
Partially correct |
6 |
Partially correct |
67 ms |
256 KB |
Partially correct |
7 |
Partially correct |
78 ms |
256 KB |
Partially correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Partially correct |
90 ms |
256 KB |
Partially correct |
2 |
Partially correct |
87 ms |
256 KB |
Partially correct |
3 |
Partially correct |
49 ms |
256 KB |
Partially correct |
4 |
Partially correct |
83 ms |
256 KB |
Partially correct |
5 |
Partially correct |
88 ms |
256 KB |
Partially correct |
6 |
Partially correct |
86 ms |
256 KB |
Partially correct |
7 |
Partially correct |
64 ms |
256 KB |
Partially correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Partially correct |
94 ms |
256 KB |
Partially correct |
2 |
Partially correct |
79 ms |
256 KB |
Partially correct |
3 |
Partially correct |
87 ms |
256 KB |
Partially correct |
4 |
Partially correct |
99 ms |
256 KB |
Partially correct |
5 |
Partially correct |
87 ms |
256 KB |
Partially correct |
6 |
Partially correct |
110 ms |
256 KB |
Partially correct |
7 |
Partially correct |
85 ms |
256 KB |
Partially correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Partially correct |
77 ms |
256 KB |
Partially correct |
2 |
Partially correct |
93 ms |
256 KB |
Partially correct |
3 |
Partially correct |
87 ms |
256 KB |
Partially correct |
4 |
Partially correct |
93 ms |
256 KB |
Partially correct |
5 |
Partially correct |
99 ms |
256 KB |
Partially correct |
6 |
Partially correct |
84 ms |
256 KB |
Partially correct |
7 |
Partially correct |
89 ms |
256 KB |
Partially correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Partially correct |
49 ms |
256 KB |
Partially correct |
2 |
Partially correct |
58 ms |
256 KB |
Partially correct |
3 |
Partially correct |
90 ms |
256 KB |
Partially correct |
4 |
Partially correct |
86 ms |
256 KB |
Partially correct |
5 |
Partially correct |
88 ms |
256 KB |
Partially correct |
6 |
Partially correct |
98 ms |
256 KB |
Partially correct |
7 |
Partially correct |
90 ms |
256 KB |
Partially correct |