結果

問題 No.5018 Let's Make a Best-seller Book
ユーザー すぎぱもすぎぱも
提出日時 2023-10-01 15:19:40
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 158 ms / 400 ms
コード長 805 bytes
コンパイル時間 463 ms
コンパイル使用メモリ 87,304 KB
実行使用メモリ 92,236 KB
スコア 4,434
平均クエリ数 52.00
最終ジャッジ日時 2023-10-01 15:19:59
合計ジャッジ時間 17,529 ms
ジャッジサーバーID
(参考情報)
judge13 / judge12
純コード判定しない問題か言語
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 158 ms
92,052 KB
testcase_01 AC 108 ms
91,940 KB
testcase_02 AC 107 ms
91,588 KB
testcase_03 AC 107 ms
91,684 KB
testcase_04 AC 106 ms
91,884 KB
testcase_05 AC 106 ms
91,696 KB
testcase_06 AC 105 ms
92,160 KB
testcase_07 AC 106 ms
91,840 KB
testcase_08 AC 119 ms
91,772 KB
testcase_09 AC 104 ms
91,880 KB
testcase_10 AC 104 ms
92,044 KB
testcase_11 AC 106 ms
91,972 KB
testcase_12 AC 106 ms
92,076 KB
testcase_13 AC 106 ms
91,972 KB
testcase_14 AC 132 ms
91,888 KB
testcase_15 AC 104 ms
92,056 KB
testcase_16 AC 130 ms
91,760 KB
testcase_17 AC 105 ms
91,584 KB
testcase_18 AC 113 ms
91,592 KB
testcase_19 AC 104 ms
91,856 KB
testcase_20 AC 104 ms
91,800 KB
testcase_21 AC 104 ms
91,724 KB
testcase_22 AC 108 ms
91,708 KB
testcase_23 AC 104 ms
91,652 KB
testcase_24 AC 113 ms
91,424 KB
testcase_25 AC 106 ms
91,896 KB
testcase_26 AC 106 ms
91,884 KB
testcase_27 AC 106 ms
91,648 KB
testcase_28 AC 113 ms
91,608 KB
testcase_29 AC 106 ms
91,736 KB
testcase_30 AC 103 ms
92,124 KB
testcase_31 AC 105 ms
91,636 KB
testcase_32 AC 114 ms
92,128 KB
testcase_33 AC 104 ms
92,120 KB
testcase_34 AC 106 ms
91,560 KB
testcase_35 AC 105 ms
91,948 KB
testcase_36 AC 105 ms
91,684 KB
testcase_37 AC 104 ms
91,496 KB
testcase_38 AC 112 ms
91,492 KB
testcase_39 AC 105 ms
91,648 KB
testcase_40 AC 116 ms
91,896 KB
testcase_41 AC 105 ms
92,176 KB
testcase_42 AC 104 ms
91,460 KB
testcase_43 AC 105 ms
91,708 KB
testcase_44 AC 103 ms
91,516 KB
testcase_45 AC 103 ms
91,496 KB
testcase_46 AC 105 ms
91,892 KB
testcase_47 AC 104 ms
92,116 KB
testcase_48 AC 104 ms
92,236 KB
testcase_49 AC 114 ms
91,516 KB
testcase_50 AC 105 ms
91,768 KB
testcase_51 AC 104 ms
91,592 KB
testcase_52 AC 104 ms
91,696 KB
testcase_53 AC 105 ms
91,604 KB
testcase_54 AC 104 ms
91,444 KB
testcase_55 AC 107 ms
91,828 KB
testcase_56 AC 105 ms
91,844 KB
testcase_57 AC 119 ms
91,532 KB
testcase_58 AC 105 ms
91,648 KB
testcase_59 AC 104 ms
91,536 KB
testcase_60 AC 104 ms
91,612 KB
testcase_61 AC 106 ms
92,092 KB
testcase_62 AC 105 ms
91,892 KB
testcase_63 AC 108 ms
91,588 KB
testcase_64 AC 107 ms
91,656 KB
testcase_65 AC 114 ms
91,656 KB
testcase_66 AC 105 ms
91,492 KB
testcase_67 AC 104 ms
92,008 KB
testcase_68 AC 106 ms
91,712 KB
testcase_69 AC 105 ms
91,660 KB
testcase_70 AC 104 ms
91,720 KB
testcase_71 AC 104 ms
91,624 KB
testcase_72 AC 105 ms
91,572 KB
testcase_73 AC 106 ms
91,832 KB
testcase_74 AC 106 ms
91,556 KB
testcase_75 AC 104 ms
91,512 KB
testcase_76 AC 103 ms
92,028 KB
testcase_77 AC 103 ms
91,868 KB
testcase_78 AC 106 ms
91,952 KB
testcase_79 AC 112 ms
91,500 KB
testcase_80 AC 105 ms
91,624 KB
testcase_81 AC 105 ms
92,140 KB
testcase_82 AC 123 ms
91,576 KB
testcase_83 AC 114 ms
91,452 KB
testcase_84 AC 107 ms
91,940 KB
testcase_85 AC 105 ms
92,032 KB
testcase_86 AC 113 ms
91,432 KB
testcase_87 AC 108 ms
91,776 KB
testcase_88 AC 107 ms
91,696 KB
testcase_89 AC 133 ms
91,804 KB
testcase_90 AC 107 ms
91,912 KB
testcase_91 AC 110 ms
91,424 KB
testcase_92 AC 135 ms
91,828 KB
testcase_93 AC 108 ms
91,928 KB
testcase_94 AC 106 ms
91,564 KB
testcase_95 AC 115 ms
92,180 KB
testcase_96 AC 105 ms
91,592 KB
testcase_97 AC 111 ms
91,852 KB
testcase_98 AC 105 ms
91,384 KB
testcase_99 AC 106 ms
91,600 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

T, N, money = map(int, input().split())
s, p, r = [0] * N, [0] * N, [0] * N


def do(arg):
    if type(arg) == list:
        print(1, *arg, flush=True)
    else:
        print(2, arg, flush=True)
    money = int(input())
    if money == -1:
        exit()
    s = list(map(int, input().split()))
    p = list(map(int, input().split()))
    r = list(map(int, input().split()))
    return money, s, p, r


money, s, p, r = do([money // (500 * N)] * N)

for week in range(T - 1):
    leftbook = money // 500
    # print(leftbook)
    needbook = (sum(r) + leftbook)
    # print(needbook)
    ship = [max(0, needbook // N - r) for r in r]
    # print(sum(s * 500 for s in ship))
    money, s, p, r = do(ship)


# 52 10 200000000
# 10000000

# 1 2 3 4 5 6 7 8 9 10
# 1 2 3 4 5 6 7 8 9 10
# 1 2 3 4 5 6 7 8 9 10
0