# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
556835 | 2022-05-04T03:07:37 Z | hibiki | 사육제 (CEOI14_carnival) | C++11 | 21 ms | 336 KB |
#include<bits/stdc++.h> using namespace std; #define PB push_back int n,ty[160],cur_ty=1; int main() { ty[1]=cur_ty++; scanf("%d",&n); for(int i=2;i<=n;i++) { int l=1,r=i-1,nw_ty=-1; while(l<=r) { int mid=(l+r)>>1; set<int> s; vector<int> ask; for(int j=mid;j<i;j++) { s.insert(ty[j]); ask.PB(j); } ask.PB(i); printf("%d ",ask.size()); for(auto val:ask) printf("%d ",val); printf("\n"); fflush(stdout); int ret; scanf("%d",&ret); if(ret>s.size()) r=mid-1; else nw_ty=ty[mid],l=mid+1; } if(nw_ty==-1) ty[i]=cur_ty++; else ty[i]=nw_ty; } printf("0 "); for(int i=1;i<=n;i++) printf("%d ",ty[i]); printf("\n"); fflush(stdout); return 0; }
Compilation message
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 10 ms | 208 KB | Output is correct |
2 | Correct | 9 ms | 208 KB | Output is correct |
3 | Correct | 12 ms | 292 KB | Output is correct |
4 | Correct | 13 ms | 208 KB | Output is correct |
5 | Correct | 8 ms | 208 KB | Output is correct |
6 | Correct | 9 ms | 208 KB | Output is correct |
7 | Correct | 11 ms | 300 KB | Output is correct |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 11 ms | 208 KB | Output is correct |
2 | Correct | 8 ms | 336 KB | Output is correct |
3 | Correct | 9 ms | 208 KB | Output is correct |
4 | Correct | 13 ms | 208 KB | Output is correct |
5 | Correct | 10 ms | 300 KB | Output is correct |
6 | Correct | 10 ms | 208 KB | Output is correct |
7 | Correct | 8 ms | 296 KB | Output is correct |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 8 ms | 208 KB | Output is correct |
2 | Correct | 9 ms | 208 KB | Output is correct |
3 | Correct | 13 ms | 208 KB | Output is correct |
4 | Correct | 16 ms | 280 KB | Output is correct |
5 | Correct | 14 ms | 296 KB | Output is correct |
6 | Correct | 11 ms | 208 KB | Output is correct |
7 | Correct | 12 ms | 208 KB | Output is correct |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 11 ms | 208 KB | Output is correct |
2 | Correct | 14 ms | 208 KB | Output is correct |
3 | Correct | 18 ms | 284 KB | Output is correct |
4 | Correct | 21 ms | 284 KB | Output is correct |
5 | Correct | 7 ms | 300 KB | Output is correct |
6 | Correct | 11 ms | 300 KB | Output is correct |
7 | Correct | 12 ms | 208 KB | Output is correct |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 11 ms | 208 KB | Output is correct |
2 | Correct | 14 ms | 208 KB | Output is correct |
3 | Correct | 14 ms | 300 KB | Output is correct |
4 | Correct | 20 ms | 208 KB | Output is correct |
5 | Correct | 12 ms | 208 KB | Output is correct |
6 | Correct | 13 ms | 284 KB | Output is correct |
7 | Correct | 16 ms | 296 KB | Output is correct |