結果
問題 |
No.2828 Remainder Game
|
ユーザー |
|
提出日時 | 2024-08-02 22:16:12 |
言語 | PyPy3 (7.3.15) |
結果 |
RE
|
実行時間 | - |
コード長 | 638 bytes |
コンパイル時間 | 295 ms |
コンパイル使用メモリ | 82,432 KB |
実行使用メモリ | 88,912 KB |
平均クエリ数 | 50.10 |
最終ジャッジ日時 | 2024-08-02 22:16:21 |
合計ジャッジ時間 | 4,691 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 1 RE * 19 |
ソースコード
def f(l, r, M): if len(ans)==5: return 0 used.add((l, r)) K = r-l R = [] for i in range(l, r): R.append(i) print(M, K, flush=True) print(*R, flush=True) C = int(input()) if C==0: return 0 if K==1 and C==1: ans.append(l) return 1 # left if (l, (l+r)//2) not in used: f(l, (l+r)//2, M) # right if ((l+r)//2, r) not in used: f((l+r)//2, r, M) import sys input = sys.stdin.readline N = int(input()) l = 0 r = N+1 ans = [] used = set() # left f(l, (l+r)//2, N+1) # right f((l+r)//2, r, N+1) print(0, 1, flush=True) print(sum(ans))