# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
347277 | 2021-01-12T13:34:54 Z | maomao90 | 사육제 (CEOI14_carnival) | C++14 | 9 ms | 492 KB |
// https://oj.uz/problem/view/CEOI14_carnival #include <bits/stdc++.h> using namespace std; #define REP(i, j, k) for (int i = j; i < k; i++) #define pb push_back int n; int ans[155]; vector<int> used; int main() { scanf("%d", &n); ans[0] = 0; used.pb(0); REP (i, 1, n) { printf("%d", i + 1); REP (j, 0, i + 1) printf(" %d", j + 1); printf("\n"); fflush(stdout); int all; scanf("%d", &all); if (all > used.size()) { used.pb(i); ans[i] = all - 1; } else { int lo = 0, hi = used.size() - 1, mid; while (lo < hi) { mid = hi + lo + 1 >> 1; printf("%d", mid - lo + 1); REP (i, lo, mid) printf(" %d", used[i] + 1); printf(" %d\n", i + 1); fflush(stdout); int cur; scanf("%d", &cur); if (cur == mid - lo) { hi = mid - 1; } else { lo = mid; } } ans[i] = hi; } } printf("0"); REP (i, 0, n) printf(" %d", ans[i] + 1); printf("\n"); return 0; }
Compilation message
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 7 ms | 364 KB | Output is correct |
2 | Correct | 9 ms | 364 KB | Output is correct |
3 | Correct | 6 ms | 364 KB | Output is correct |
4 | Correct | 3 ms | 364 KB | Output is correct |
5 | Correct | 3 ms | 364 KB | Output is correct |
6 | Correct | 4 ms | 364 KB | Output is correct |
7 | Correct | 8 ms | 364 KB | Output is correct |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 7 ms | 364 KB | Output is correct |
2 | Correct | 9 ms | 364 KB | Output is correct |
3 | Correct | 4 ms | 364 KB | Output is correct |
4 | Correct | 3 ms | 364 KB | Output is correct |
5 | Correct | 6 ms | 364 KB | Output is correct |
6 | Correct | 7 ms | 364 KB | Output is correct |
7 | Correct | 7 ms | 364 KB | Output is correct |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 2 ms | 364 KB | Output is correct |
2 | Correct | 8 ms | 364 KB | Output is correct |
3 | Correct | 8 ms | 384 KB | Output is correct |
4 | Correct | 3 ms | 364 KB | Output is correct |
5 | Correct | 6 ms | 364 KB | Output is correct |
6 | Correct | 7 ms | 364 KB | Output is correct |
7 | Correct | 8 ms | 364 KB | Output is correct |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 6 ms | 492 KB | Output is correct |
2 | Correct | 6 ms | 364 KB | Output is correct |
3 | Correct | 5 ms | 364 KB | Output is correct |
4 | Correct | 3 ms | 364 KB | Output is correct |
5 | Correct | 5 ms | 384 KB | Output is correct |
6 | Correct | 7 ms | 364 KB | Output is correct |
7 | Correct | 8 ms | 364 KB | Output is correct |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 5 ms | 364 KB | Output is correct |
2 | Correct | 8 ms | 364 KB | Output is correct |
3 | Correct | 7 ms | 364 KB | Output is correct |
4 | Correct | 8 ms | 364 KB | Output is correct |
5 | Correct | 4 ms | 364 KB | Output is correct |
6 | Correct | 5 ms | 364 KB | Output is correct |
7 | Correct | 4 ms | 364 KB | Output is correct |