結果

問題 No.2828 Remainder Game
ユーザー detteiuudetteiuu
提出日時 2024-08-02 21:41:42
言語 PyPy3
(7.3.15)
結果
RE  
実行時間 -
コード長 344 bytes
コンパイル時間 201 ms
コンパイル使用メモリ 82,028 KB
実行使用メモリ 88,064 KB
平均クエリ数 47.60
最終ジャッジ日時 2024-08-02 21:41:47
合計ジャッジ時間 4,536 ms
ジャッジサーバーID
(参考情報)
judge3 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 RE -
testcase_01 RE -
testcase_02 RE -
testcase_03 RE -
testcase_04 RE -
testcase_05 RE -
testcase_06 RE -
testcase_07 RE -
testcase_08 RE -
testcase_09 RE -
testcase_10 RE -
testcase_11 RE -
testcase_12 AC 106 ms
69,996 KB
testcase_13 AC 106 ms
69,824 KB
testcase_14 RE -
testcase_15 AC 103 ms
68,576 KB
testcase_16 AC 102 ms
69,456 KB
testcase_17 AC 103 ms
68,676 KB
testcase_18 AC 102 ms
68,924 KB
testcase_19 AC 101 ms
68,848 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N = int(input())

def dfs(l, r, cnt):
    if l == r:
        return l*cnt
    ans = 0
    mid = (l+r)//2
    print(M, mid-l+1)
    print(*list(range(l, mid+1)))
    n = int(input())
    if 1 <= n:
        ans += dfs(l, mid, n)
    if n < cnt:
        ans += dfs(mid+1, r, cnt-n)
    return ans

M = N+1
ans = dfs(1, N, 5)
print(0, 1)
print(ans)
0