結果
| 問題 | No.934 Explosive energy drink |
| コンテスト | |
| ユーザー |
tamato
|
| 提出日時 | 2020-01-31 17:03:58 |
| 言語 | PyPy3 (7.3.17) |
| 結果 |
AC
|
| 実行時間 | 343 ms / 2,000 ms |
| コード長 | 706 bytes |
| 記録 | |
| コンパイル時間 | 228 ms |
| コンパイル使用メモリ | 85,464 KB |
| 実行使用メモリ | 100,688 KB |
| 平均クエリ数 | 709.08 |
| 最終ジャッジ日時 | 2026-03-31 08:37:37 |
| 合計ジャッジ時間 | 5,706 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge2_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 24 |
ソースコード
def main():
import sys
input = sys.stdin.readline
def ask(A):
print('?', len(A))
print(*A)
sys.stdout.flush()
N = int(input())
need = [1] * N
for i in range(N):
q = []
need[i] = 0
for j in range(N):
if need[j]:
q.append(j+1)
if len(q) == 1:
need[i] = 1
need[q[0]-1] = 1
continue
ask(q)
e = int(input())
if not e:
need[i] = 1
ans = []
for i in range(N):
if need[i]:
ans.append(i+1)
print('!', len(ans))
print(*ans)
sys.stdout.flush()
exit()
if __name__ == '__main__':
main()
tamato