Submission #383238

#TimeUsernameProblemLanguageResultExecution timeMemory
383238mariowongCarnival (CEOI14_carnival)C++14
0 / 100
97 ms384 KiB
#include <bits/stdc++.h> using namespace std; int n,ans[155],x,ct; int main(){ ios::sync_with_stdio(false); cin >> n; for (int i=1;i<=n;i++){ ans[i]=-1; } for (int i=1;i<=n;i++){ if (ans[i] == -1){ ans[i]=ct; ct++; } for (int j=i+1;j<=n;j++){ cout << "2 " << i << " " << j << "\n"; fflush(stdout); cin >> x; if (x == 1) ans[j]=ans[i]; } } for (int i=1;i<=n;i++){ cout << ans[i] << " "; } cout << "\n"; fflush(stdout); return 0; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...