# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
166563 | 2019-12-02T19:38:10 Z | wmrmr | 사육제 (CEOI14_carnival) | C++17 | 11 ms | 380 KB |
#include <bits/stdc++.h> using namespace std; const int MAX = 160; int n, qtd; int cor[MAX], posCor[MAX], range[MAX]; int BB(int pos) { int ini = 1, fim = range[pos]; while(ini != fim) { int m = (ini+fim)/2; int num = (m-ini+1); printf("%d ",num+1); for(int i=ini;i<=m;i++) printf("%d ",posCor[i]); printf("%d ",pos); cout << endl; int resp; scanf("%d",&resp); if(resp == num) fim = m; else ini = m+1; } return ini; } int main() { scanf("%d",&n); for(int i=1;i<=n;i++) { printf("%d ",i); for(int j=1;j<=i;j++) printf("%d ",j); cout << endl; int resp; scanf("%d",&resp); if(resp > qtd) qtd++, posCor[qtd] = i, cor[i] = qtd; else range[i] = qtd; } for(int i=1;i<=n;i++) { if(cor[i]) continue; cor[i] = BB(i); } printf("0 "); for(int i=1;i<=n;i++) printf("%d ",cor[i]); return 0; }
Compilation message
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 9 ms | 248 KB | Output is correct |
2 | Correct | 11 ms | 248 KB | Output is correct |
3 | Correct | 4 ms | 248 KB | Output is correct |
4 | Correct | 5 ms | 248 KB | Output is correct |
5 | Correct | 5 ms | 248 KB | Output is correct |
6 | Correct | 5 ms | 248 KB | Output is correct |
7 | Correct | 9 ms | 376 KB | Output is correct |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 9 ms | 248 KB | Output is correct |
2 | Correct | 10 ms | 248 KB | Output is correct |
3 | Correct | 6 ms | 376 KB | Output is correct |
4 | Correct | 4 ms | 248 KB | Output is correct |
5 | Correct | 9 ms | 248 KB | Output is correct |
6 | Correct | 5 ms | 248 KB | Output is correct |
7 | Correct | 7 ms | 376 KB | Output is correct |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 4 ms | 248 KB | Output is correct |
2 | Correct | 8 ms | 248 KB | Output is correct |
3 | Correct | 7 ms | 248 KB | Output is correct |
4 | Correct | 4 ms | 380 KB | Output is correct |
5 | Correct | 6 ms | 248 KB | Output is correct |
6 | Correct | 11 ms | 376 KB | Output is correct |
7 | Correct | 10 ms | 376 KB | Output is correct |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 7 ms | 248 KB | Output is correct |
2 | Correct | 6 ms | 248 KB | Output is correct |
3 | Correct | 7 ms | 248 KB | Output is correct |
4 | Correct | 5 ms | 248 KB | Output is correct |
5 | Correct | 11 ms | 248 KB | Output is correct |
6 | Correct | 9 ms | 248 KB | Output is correct |
7 | Correct | 11 ms | 376 KB | Output is correct |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 6 ms | 248 KB | Output is correct |
2 | Correct | 10 ms | 248 KB | Output is correct |
3 | Correct | 8 ms | 376 KB | Output is correct |
4 | Correct | 8 ms | 248 KB | Output is correct |
5 | Correct | 7 ms | 248 KB | Output is correct |
6 | Correct | 6 ms | 376 KB | Output is correct |
7 | Correct | 4 ms | 248 KB | Output is correct |