# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
374211 | 2021-03-06T21:55:17 Z | MilosMilutinovic | Carnival (CEOI14_carnival) | C++14 | 1 ms | 512 KB |
#include <bits/stdc++.h> using namespace std; const int N=200; int ans[N]; int main(){ int n;scanf("%i",&n); int cnt=0; for(int i=1;i<=n;i++){ if(ans[i]>0)continue; ans[i]=++cnt; for(int j=i+1;j<=n;j++){ if(ans[j]>0)continue; fflush(stdout); printf("2 %i %i\n",i,j); int x;scanf("%i",&x); if(x==1)ans[j]=ans[i]; } } printf("0 "); for(int i=1;i<=n;i++)printf("%i ",ans[i]); return 0; }
Compilation message
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Execution timed out | 1 ms | 364 KB | Time limit exceeded (wall clock) |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Execution timed out | 1 ms | 364 KB | Time limit exceeded (wall clock) |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Execution timed out | 1 ms | 512 KB | Time limit exceeded (wall clock) |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Execution timed out | 1 ms | 364 KB | Time limit exceeded (wall clock) |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Execution timed out | 1 ms | 364 KB | Time limit exceeded (wall clock) |
2 | Halted | 0 ms | 0 KB | - |