結果
問題 | No.5018 Let's Make a Best-seller Book |
ユーザー | trineutron |
提出日時 | 2023-09-24 00:55:56 |
言語 | Python3 (3.12.2 + numpy 1.26.4 + scipy 1.12.0) |
結果 |
AC
|
実行時間 | 50 ms / 400 ms |
コード長 | 1,353 bytes |
コンパイル時間 | 81 ms |
コンパイル使用メモリ | 10,772 KB |
実行使用メモリ | 24,556 KB |
スコア | 4,377 |
平均クエリ数 | 52.00 |
最終ジャッジ日時 | 2023-10-01 12:31:52 |
合計ジャッジ時間 | 9,748 ms |
ジャッジサーバーID (参考情報) |
judge15 / judge14 |
純コード判定しない問題か言語 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 49 ms
23,984 KB |
testcase_01 | AC | 50 ms
24,092 KB |
testcase_02 | AC | 46 ms
24,060 KB |
testcase_03 | AC | 47 ms
24,384 KB |
testcase_04 | AC | 47 ms
23,852 KB |
testcase_05 | AC | 46 ms
24,200 KB |
testcase_06 | AC | 47 ms
24,100 KB |
testcase_07 | AC | 47 ms
24,292 KB |
testcase_08 | AC | 47 ms
23,664 KB |
testcase_09 | AC | 46 ms
24,020 KB |
testcase_10 | AC | 47 ms
23,848 KB |
testcase_11 | AC | 46 ms
23,844 KB |
testcase_12 | AC | 47 ms
23,712 KB |
testcase_13 | AC | 46 ms
24,468 KB |
testcase_14 | AC | 46 ms
24,140 KB |
testcase_15 | AC | 46 ms
23,916 KB |
testcase_16 | AC | 47 ms
24,424 KB |
testcase_17 | AC | 46 ms
24,080 KB |
testcase_18 | AC | 45 ms
24,040 KB |
testcase_19 | AC | 45 ms
23,772 KB |
testcase_20 | AC | 47 ms
23,856 KB |
testcase_21 | AC | 46 ms
24,124 KB |
testcase_22 | AC | 46 ms
23,856 KB |
testcase_23 | AC | 45 ms
24,396 KB |
testcase_24 | AC | 45 ms
23,720 KB |
testcase_25 | AC | 46 ms
24,324 KB |
testcase_26 | AC | 45 ms
23,820 KB |
testcase_27 | AC | 45 ms
24,304 KB |
testcase_28 | AC | 45 ms
23,936 KB |
testcase_29 | AC | 45 ms
24,008 KB |
testcase_30 | AC | 45 ms
24,240 KB |
testcase_31 | AC | 45 ms
23,844 KB |
testcase_32 | AC | 44 ms
23,612 KB |
testcase_33 | AC | 45 ms
23,776 KB |
testcase_34 | AC | 46 ms
23,708 KB |
testcase_35 | AC | 45 ms
23,888 KB |
testcase_36 | AC | 45 ms
24,348 KB |
testcase_37 | AC | 45 ms
24,384 KB |
testcase_38 | AC | 44 ms
23,992 KB |
testcase_39 | AC | 45 ms
24,064 KB |
testcase_40 | AC | 45 ms
23,728 KB |
testcase_41 | AC | 46 ms
23,768 KB |
testcase_42 | AC | 46 ms
24,080 KB |
testcase_43 | AC | 43 ms
24,112 KB |
testcase_44 | AC | 49 ms
23,756 KB |
testcase_45 | AC | 46 ms
23,792 KB |
testcase_46 | AC | 45 ms
23,992 KB |
testcase_47 | AC | 45 ms
24,324 KB |
testcase_48 | AC | 45 ms
23,764 KB |
testcase_49 | AC | 44 ms
23,944 KB |
testcase_50 | AC | 46 ms
23,992 KB |
testcase_51 | AC | 45 ms
24,076 KB |
testcase_52 | AC | 45 ms
23,708 KB |
testcase_53 | AC | 45 ms
24,264 KB |
testcase_54 | AC | 45 ms
24,012 KB |
testcase_55 | AC | 45 ms
24,200 KB |
testcase_56 | AC | 45 ms
24,260 KB |
testcase_57 | AC | 46 ms
23,788 KB |
testcase_58 | AC | 45 ms
23,924 KB |
testcase_59 | AC | 45 ms
24,008 KB |
testcase_60 | AC | 45 ms
24,204 KB |
testcase_61 | AC | 45 ms
23,784 KB |
testcase_62 | AC | 45 ms
23,988 KB |
testcase_63 | AC | 45 ms
23,764 KB |
testcase_64 | AC | 44 ms
23,860 KB |
testcase_65 | AC | 46 ms
24,280 KB |
testcase_66 | AC | 46 ms
23,924 KB |
testcase_67 | AC | 46 ms
24,372 KB |
testcase_68 | AC | 45 ms
24,360 KB |
testcase_69 | AC | 44 ms
24,108 KB |
testcase_70 | AC | 45 ms
23,724 KB |
testcase_71 | AC | 46 ms
24,112 KB |
testcase_72 | AC | 45 ms
24,116 KB |
testcase_73 | AC | 45 ms
24,092 KB |
testcase_74 | AC | 46 ms
24,016 KB |
testcase_75 | AC | 44 ms
23,848 KB |
testcase_76 | AC | 44 ms
24,132 KB |
testcase_77 | AC | 45 ms
24,056 KB |
testcase_78 | AC | 45 ms
24,360 KB |
testcase_79 | AC | 45 ms
24,236 KB |
testcase_80 | AC | 46 ms
24,228 KB |
testcase_81 | AC | 45 ms
24,224 KB |
testcase_82 | AC | 45 ms
24,556 KB |
testcase_83 | AC | 45 ms
23,964 KB |
testcase_84 | AC | 45 ms
23,976 KB |
testcase_85 | AC | 48 ms
24,260 KB |
testcase_86 | AC | 46 ms
24,432 KB |
testcase_87 | AC | 46 ms
24,044 KB |
testcase_88 | AC | 44 ms
24,396 KB |
testcase_89 | AC | 46 ms
24,372 KB |
testcase_90 | AC | 48 ms
24,124 KB |
testcase_91 | AC | 47 ms
24,120 KB |
testcase_92 | AC | 45 ms
24,292 KB |
testcase_93 | AC | 45 ms
24,240 KB |
testcase_94 | AC | 45 ms
23,860 KB |
testcase_95 | AC | 46 ms
24,116 KB |
testcase_96 | AC | 46 ms
23,772 KB |
testcase_97 | AC | 46 ms
23,880 KB |
testcase_98 | AC | 49 ms
23,656 KB |
testcase_99 | AC | 46 ms
23,788 KB |
ソースコード
# 最初の入力 T, N, money = map(int, input().split()) assert T == 52 assert N == 10 assert money == 2000000 S = [0] * N P = [0] * N R = [0] * N # インタラクティブ for week in range(T): # (あ) 出版社の行動を出力する L = [money // (500 * N)] * N assert min(L) >= 0 money_prev = money - 500 * sum(L) assert money_prev >= 0 P_prev = P R_prev = [R[i] + L[i] for i in range(N)] print("1", *L, flush=True) # (い) 売上部数などを入力する money = int(input()) S = list(map(int, input().split())) P = list(map(int, input().split())) R = list(map(int, input().split())) assert len(S) == N assert len(P) == N assert len(R) == N assert money == money_prev + 1000 * sum(S) assert -60 <= min(P) and max(P) <= 60 assert min(R) >= 0 def calc_S(i, d, r): return int(min(R_prev[i], R_prev[i] ** 0.5 * 1.05 ** P_prev[i] * d * r)) for i in range(N): assert calc_S(i, 0.5, 0.75) <= S[i] <= calc_S(i, 1.5, 1.25) P_expected = P_prev[i] if R_prev[i] != 0 and 10 * S[i] >= 3 * R_prev[i]: P_expected += 1 if R_prev[i] != 0 and 10 * S[i] < R_prev[i]: P_expected -= 1 P_expected = max(-60, min(60, P_expected)) assert P[i] == P_expected assert R[i] == R_prev[i] - S[i]