結果
問題 | No.5018 Let's Make a Best-seller Book |
ユーザー | trineutron |
提出日時 | 2023-09-24 01:08:51 |
言語 | Python3 (3.12.2 + numpy 1.26.4 + scipy 1.12.0) |
結果 |
AC
|
実行時間 | 51 ms / 400 ms |
コード長 | 1,637 bytes |
コンパイル時間 | 86 ms |
コンパイル使用メモリ | 10,764 KB |
実行使用メモリ | 24,476 KB |
スコア | 4,377 |
平均クエリ数 | 52.00 |
最終ジャッジ日時 | 2023-10-01 12:31:58 |
合計ジャッジ時間 | 9,292 ms |
ジャッジサーバーID (参考情報) |
judge12 / judge11 |
純コード判定しない問題か言語 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 51 ms
24,192 KB |
testcase_01 | AC | 45 ms
23,996 KB |
testcase_02 | AC | 45 ms
23,776 KB |
testcase_03 | AC | 45 ms
24,060 KB |
testcase_04 | AC | 45 ms
24,372 KB |
testcase_05 | AC | 44 ms
23,640 KB |
testcase_06 | AC | 44 ms
24,400 KB |
testcase_07 | AC | 44 ms
23,980 KB |
testcase_08 | AC | 44 ms
24,136 KB |
testcase_09 | AC | 44 ms
23,908 KB |
testcase_10 | AC | 45 ms
24,124 KB |
testcase_11 | AC | 45 ms
24,140 KB |
testcase_12 | AC | 45 ms
23,716 KB |
testcase_13 | AC | 44 ms
24,408 KB |
testcase_14 | AC | 43 ms
23,712 KB |
testcase_15 | AC | 44 ms
23,828 KB |
testcase_16 | AC | 44 ms
23,852 KB |
testcase_17 | AC | 43 ms
23,976 KB |
testcase_18 | AC | 44 ms
24,324 KB |
testcase_19 | AC | 44 ms
24,204 KB |
testcase_20 | AC | 45 ms
24,348 KB |
testcase_21 | AC | 44 ms
23,968 KB |
testcase_22 | AC | 44 ms
24,084 KB |
testcase_23 | AC | 44 ms
23,784 KB |
testcase_24 | AC | 44 ms
23,688 KB |
testcase_25 | AC | 44 ms
23,896 KB |
testcase_26 | AC | 44 ms
24,072 KB |
testcase_27 | AC | 44 ms
24,384 KB |
testcase_28 | AC | 44 ms
24,260 KB |
testcase_29 | AC | 44 ms
24,008 KB |
testcase_30 | AC | 44 ms
23,776 KB |
testcase_31 | AC | 44 ms
24,176 KB |
testcase_32 | AC | 44 ms
24,076 KB |
testcase_33 | AC | 45 ms
23,684 KB |
testcase_34 | AC | 45 ms
23,996 KB |
testcase_35 | AC | 45 ms
24,336 KB |
testcase_36 | AC | 44 ms
24,152 KB |
testcase_37 | AC | 44 ms
23,796 KB |
testcase_38 | AC | 44 ms
24,128 KB |
testcase_39 | AC | 44 ms
24,264 KB |
testcase_40 | AC | 44 ms
23,780 KB |
testcase_41 | AC | 44 ms
24,236 KB |
testcase_42 | AC | 44 ms
24,472 KB |
testcase_43 | AC | 45 ms
23,872 KB |
testcase_44 | AC | 44 ms
23,980 KB |
testcase_45 | AC | 43 ms
24,140 KB |
testcase_46 | AC | 44 ms
23,912 KB |
testcase_47 | AC | 44 ms
23,864 KB |
testcase_48 | AC | 44 ms
23,828 KB |
testcase_49 | AC | 45 ms
24,476 KB |
testcase_50 | AC | 44 ms
23,920 KB |
testcase_51 | AC | 43 ms
24,280 KB |
testcase_52 | AC | 45 ms
23,864 KB |
testcase_53 | AC | 43 ms
23,948 KB |
testcase_54 | AC | 44 ms
24,124 KB |
testcase_55 | AC | 44 ms
23,876 KB |
testcase_56 | AC | 45 ms
23,780 KB |
testcase_57 | AC | 44 ms
23,936 KB |
testcase_58 | AC | 44 ms
23,876 KB |
testcase_59 | AC | 44 ms
23,736 KB |
testcase_60 | AC | 44 ms
24,416 KB |
testcase_61 | AC | 45 ms
23,776 KB |
testcase_62 | AC | 44 ms
23,664 KB |
testcase_63 | AC | 45 ms
23,840 KB |
testcase_64 | AC | 45 ms
24,436 KB |
testcase_65 | AC | 44 ms
24,384 KB |
testcase_66 | AC | 45 ms
23,812 KB |
testcase_67 | AC | 45 ms
23,972 KB |
testcase_68 | AC | 44 ms
23,824 KB |
testcase_69 | AC | 44 ms
23,796 KB |
testcase_70 | AC | 44 ms
24,348 KB |
testcase_71 | AC | 43 ms
23,884 KB |
testcase_72 | AC | 43 ms
23,672 KB |
testcase_73 | AC | 43 ms
23,664 KB |
testcase_74 | AC | 43 ms
24,052 KB |
testcase_75 | AC | 44 ms
23,956 KB |
testcase_76 | AC | 45 ms
24,208 KB |
testcase_77 | AC | 44 ms
24,120 KB |
testcase_78 | AC | 44 ms
23,832 KB |
testcase_79 | AC | 45 ms
24,264 KB |
testcase_80 | AC | 44 ms
24,288 KB |
testcase_81 | AC | 45 ms
23,916 KB |
testcase_82 | AC | 43 ms
24,372 KB |
testcase_83 | AC | 44 ms
23,876 KB |
testcase_84 | AC | 43 ms
24,132 KB |
testcase_85 | AC | 43 ms
24,412 KB |
testcase_86 | AC | 43 ms
24,092 KB |
testcase_87 | AC | 43 ms
24,384 KB |
testcase_88 | AC | 44 ms
23,824 KB |
testcase_89 | AC | 44 ms
24,128 KB |
testcase_90 | AC | 43 ms
24,072 KB |
testcase_91 | AC | 43 ms
24,388 KB |
testcase_92 | AC | 43 ms
24,052 KB |
testcase_93 | AC | 44 ms
24,192 KB |
testcase_94 | AC | 44 ms
24,316 KB |
testcase_95 | AC | 47 ms
24,464 KB |
testcase_96 | AC | 44 ms
24,408 KB |
testcase_97 | AC | 44 ms
24,332 KB |
testcase_98 | AC | 43 ms
23,824 KB |
testcase_99 | AC | 45 ms
24,016 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): # (あ) 出版社の行動を出力する if min(R) > 0 and money >= 500000: x = min(5, (money // 500000).bit_length()) money_prev = money - 500000 * 2 ** (x - 1) assert money_prev >= 0 P_prev = [min(60, P[i] + x) for i in range(N)] R_prev = R else: 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]