# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
25911 | 2017-06-25T05:45:53 Z | 김현수(#1087) | Carnival (CEOI14_carnival) | C++11 | 23 ms | 2020 KB |
#include<bits/stdc++.h> using namespace std; int n, a[305]; vector<int> h; void Add (int I) { int S = 0, E = h.size(); while(S<E) { int M = (S+E)/2, T; printf("%d ", M+2); for(int i=0;i<=M;i++) printf("%d ",h[i]); printf("%d ",I); fflush(stdout); scanf("%d",&T); T == M+2 ? S = M+1 : E = M; } if(S == h.size()) h.push_back(I); a[I] = S+1; } int main() { scanf("%d",&n); for(int i=1;i<=n;i++) Add(i); printf("0 "); for(int i=1;i<=n;i++) printf("%d ",a[i]); }
Compilation message
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 3 ms | 2020 KB | Output is correct |
2 | Correct | 3 ms | 2020 KB | Output is correct |
3 | Correct | 6 ms | 2020 KB | Output is correct |
4 | Correct | 9 ms | 2020 KB | Output is correct |
5 | Correct | 0 ms | 2020 KB | Output is correct |
6 | Correct | 0 ms | 2020 KB | Output is correct |
7 | Correct | 6 ms | 2020 KB | Output is correct |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 0 ms | 2020 KB | Output is correct |
2 | Correct | 3 ms | 2020 KB | Output is correct |
3 | Correct | 6 ms | 2020 KB | Output is correct |
4 | Correct | 3 ms | 2020 KB | Output is correct |
5 | Correct | 3 ms | 2020 KB | Output is correct |
6 | Correct | 3 ms | 2020 KB | Output is correct |
7 | Correct | 0 ms | 2020 KB | Output is correct |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 0 ms | 2020 KB | Output is correct |
2 | Correct | 3 ms | 2020 KB | Output is correct |
3 | Correct | 3 ms | 2020 KB | Output is correct |
4 | Correct | 3 ms | 2020 KB | Output is correct |
5 | Correct | 0 ms | 2020 KB | Output is correct |
6 | Correct | 6 ms | 2020 KB | Output is correct |
7 | Correct | 6 ms | 2020 KB | Output is correct |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 0 ms | 2020 KB | Output is correct |
2 | Correct | 6 ms | 2020 KB | Output is correct |
3 | Correct | 9 ms | 2020 KB | Output is correct |
4 | Correct | 13 ms | 2020 KB | Output is correct |
5 | Correct | 6 ms | 2020 KB | Output is correct |
6 | Correct | 3 ms | 2020 KB | Output is correct |
7 | Correct | 6 ms | 2020 KB | Output is correct |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 0 ms | 2020 KB | Output is correct |
2 | Correct | 0 ms | 2020 KB | Output is correct |
3 | Correct | 6 ms | 2020 KB | Output is correct |
4 | Correct | 23 ms | 2020 KB | Output is correct |
5 | Correct | 0 ms | 2020 KB | Output is correct |
6 | Correct | 6 ms | 2020 KB | Output is correct |
7 | Correct | 9 ms | 2020 KB | Output is correct |