# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
257136 | 2020-08-03T16:04:34 Z | a_player | Carnival (CEOI14_carnival) | C++14 | 0 ms | 0 KB |
#include <bits/stdc++.h> using namespace std; const int nax=150+5; int col[nax]; int main(){ int N; cin>>N; int ind=1; for(int i=0;i<N;i++){ if(!col[i]){col[i]=ind 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; } ind++; } } cout<<"0 "; for(int i=0;i<N;i++)cout<<col[i]<<" "; }