結果

問題 No.5018 Let's Make a Best-seller Book
ユーザー mymelochanmymelochan
提出日時 2023-10-01 13:51:48
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 127 ms / 400 ms
コード長 966 bytes
コンパイル時間 381 ms
コンパイル使用メモリ 87,348 KB
実行使用メモリ 92,224 KB
スコア 4,738
平均クエリ数 52.00
最終ジャッジ日時 2023-10-01 13:52:05
合計ジャッジ時間 16,289 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
純コード判定しない問題か言語
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 127 ms
91,780 KB
testcase_01 AC 103 ms
91,936 KB
testcase_02 AC 101 ms
91,616 KB
testcase_03 AC 100 ms
91,496 KB
testcase_04 AC 102 ms
91,992 KB
testcase_05 AC 101 ms
91,976 KB
testcase_06 AC 105 ms
91,372 KB
testcase_07 AC 105 ms
92,060 KB
testcase_08 AC 105 ms
91,876 KB
testcase_09 AC 104 ms
92,048 KB
testcase_10 AC 102 ms
92,000 KB
testcase_11 AC 105 ms
91,484 KB
testcase_12 AC 105 ms
92,020 KB
testcase_13 AC 103 ms
91,924 KB
testcase_14 AC 102 ms
91,560 KB
testcase_15 AC 103 ms
92,076 KB
testcase_16 AC 104 ms
91,784 KB
testcase_17 AC 105 ms
91,460 KB
testcase_18 AC 101 ms
91,524 KB
testcase_19 AC 101 ms
92,116 KB
testcase_20 AC 101 ms
91,820 KB
testcase_21 AC 102 ms
91,836 KB
testcase_22 AC 101 ms
91,436 KB
testcase_23 AC 102 ms
91,604 KB
testcase_24 AC 103 ms
91,368 KB
testcase_25 AC 104 ms
91,452 KB
testcase_26 AC 103 ms
91,368 KB
testcase_27 AC 105 ms
92,124 KB
testcase_28 AC 103 ms
91,556 KB
testcase_29 AC 103 ms
91,304 KB
testcase_30 AC 101 ms
91,632 KB
testcase_31 AC 101 ms
91,852 KB
testcase_32 AC 102 ms
91,932 KB
testcase_33 AC 106 ms
92,040 KB
testcase_34 AC 102 ms
92,124 KB
testcase_35 AC 101 ms
91,948 KB
testcase_36 AC 101 ms
91,896 KB
testcase_37 AC 101 ms
91,488 KB
testcase_38 AC 100 ms
91,456 KB
testcase_39 AC 102 ms
91,684 KB
testcase_40 AC 100 ms
91,752 KB
testcase_41 AC 104 ms
91,632 KB
testcase_42 AC 105 ms
91,544 KB
testcase_43 AC 105 ms
91,648 KB
testcase_44 AC 103 ms
91,724 KB
testcase_45 AC 105 ms
91,468 KB
testcase_46 AC 104 ms
91,444 KB
testcase_47 AC 102 ms
91,668 KB
testcase_48 AC 104 ms
91,612 KB
testcase_49 AC 101 ms
91,532 KB
testcase_50 AC 105 ms
91,468 KB
testcase_51 AC 102 ms
91,696 KB
testcase_52 AC 103 ms
91,816 KB
testcase_53 AC 105 ms
91,920 KB
testcase_54 AC 102 ms
91,868 KB
testcase_55 AC 103 ms
92,020 KB
testcase_56 AC 107 ms
91,780 KB
testcase_57 AC 102 ms
91,812 KB
testcase_58 AC 109 ms
91,860 KB
testcase_59 AC 102 ms
91,736 KB
testcase_60 AC 103 ms
91,828 KB
testcase_61 AC 101 ms
92,020 KB
testcase_62 AC 104 ms
91,376 KB
testcase_63 AC 103 ms
91,760 KB
testcase_64 AC 103 ms
92,000 KB
testcase_65 AC 102 ms
91,476 KB
testcase_66 AC 103 ms
91,488 KB
testcase_67 AC 110 ms
91,592 KB
testcase_68 AC 100 ms
91,768 KB
testcase_69 AC 102 ms
92,008 KB
testcase_70 AC 103 ms
91,596 KB
testcase_71 AC 101 ms
91,580 KB
testcase_72 AC 101 ms
91,376 KB
testcase_73 AC 102 ms
91,952 KB
testcase_74 AC 104 ms
91,504 KB
testcase_75 AC 108 ms
91,872 KB
testcase_76 AC 104 ms
91,848 KB
testcase_77 AC 103 ms
91,652 KB
testcase_78 AC 102 ms
91,704 KB
testcase_79 AC 101 ms
91,492 KB
testcase_80 AC 104 ms
91,888 KB
testcase_81 AC 104 ms
91,344 KB
testcase_82 AC 104 ms
91,644 KB
testcase_83 AC 102 ms
91,640 KB
testcase_84 AC 104 ms
91,932 KB
testcase_85 AC 104 ms
91,560 KB
testcase_86 AC 104 ms
91,548 KB
testcase_87 AC 103 ms
91,960 KB
testcase_88 AC 103 ms
91,872 KB
testcase_89 AC 103 ms
91,928 KB
testcase_90 AC 103 ms
91,956 KB
testcase_91 AC 101 ms
91,524 KB
testcase_92 AC 108 ms
91,648 KB
testcase_93 AC 107 ms
91,728 KB
testcase_94 AC 102 ms
91,740 KB
testcase_95 AC 104 ms
92,068 KB
testcase_96 AC 104 ms
92,224 KB
testcase_97 AC 103 ms
92,040 KB
testcase_98 AC 102 ms
91,544 KB
testcase_99 AC 103 ms
91,880 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

# 最初の入力
T, N, money = map(int, input().split())
ADV = 500000

S = [0] * N
P = [0] * N
R = [0] * N

# インタラクティブ
for week in range(T):
    # (あ) 出版社の行動を出力する
    if week <= T//2 and money >= ADV*2.1:
        print("2", 1, flush=True)
    else:
        P_sum = 0
        for i in range(N):
            P[i] += 5
            P_sum += max(P[i], 0)

        L = []
        for i in range(N):
            if P[i] <= 0:
                L.append(0)
                continue

            ratio = P[i]/P_sum
            m = max(0,min(30-R[i],int(money*ratio)//10//500))
            L.append(m)
        
        if sum(l*500 for l in L) >= money:
            L = [0]*N

        print("1", *L, flush=True)

    # (い) 売上部数などを入力する
    money = int(input())
    S = list(map(int, input().split()))
    if S[0] == -1:
        exit()
    P = list(map(int, input().split()))
    R = list(map(int, input().split()))
0