# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
166550 | 2019-12-02T19:17:20 Z | dyd | Carnival (CEOI14_carnival) | C++14 | 3 ms | 404 KB |
#include<bits/stdc++.h> using namespace std; const int MAXN=200; int c[MAXN]; int main(){ int n,cur=1; scanf("%d",&n); for(int i=1;i<=n;i++){ if(c[i]==0){ c[i]=cur; cur++; } for(int j=i+1;j<=n;j++){ if(c[j]!=0) continue; printf("2 %d %d",i,j); int x; scanf("%d",&x); if(x==1) c[j]=c[i]; } } printf("0"); for(int i=1;i<=n;i++) printf(" %d",c[i]); return 0; }
Compilation message
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Execution timed out | 3 ms | 376 KB | Time limit exceeded (wall clock) |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Execution timed out | 3 ms | 376 KB | Time limit exceeded (wall clock) |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Execution timed out | 2 ms | 404 KB | Time limit exceeded (wall clock) |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Execution timed out | 2 ms | 248 KB | Time limit exceeded (wall clock) |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Execution timed out | 2 ms | 248 KB | Time limit exceeded (wall clock) |
2 | Halted | 0 ms | 0 KB | - |