結果
問題 | No.5018 Let's Make a Best-seller Book |
ユーザー | titia |
提出日時 | 2023-10-01 15:59:16 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 149 ms / 400 ms |
コード長 | 1,702 bytes |
コンパイル時間 | 294 ms |
コンパイル使用メモリ | 86,996 KB |
実行使用メモリ | 93,812 KB |
スコア | 77,919 |
平均クエリ数 | 52.00 |
最終ジャッジ日時 | 2023-10-01 15:59:34 |
合計ジャッジ時間 | 17,633 ms |
ジャッジサーバーID (参考情報) |
judge15 / judge11 |
純コード判定しない問題か言語 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 117 ms
92,828 KB |
testcase_01 | AC | 116 ms
93,380 KB |
testcase_02 | AC | 115 ms
93,132 KB |
testcase_03 | AC | 115 ms
93,488 KB |
testcase_04 | AC | 128 ms
93,060 KB |
testcase_05 | AC | 115 ms
93,020 KB |
testcase_06 | AC | 116 ms
93,244 KB |
testcase_07 | AC | 115 ms
93,216 KB |
testcase_08 | AC | 142 ms
93,192 KB |
testcase_09 | AC | 114 ms
93,328 KB |
testcase_10 | AC | 116 ms
92,868 KB |
testcase_11 | AC | 116 ms
93,432 KB |
testcase_12 | AC | 122 ms
93,120 KB |
testcase_13 | AC | 117 ms
92,932 KB |
testcase_14 | AC | 114 ms
93,124 KB |
testcase_15 | AC | 114 ms
92,984 KB |
testcase_16 | AC | 117 ms
92,680 KB |
testcase_17 | AC | 116 ms
93,284 KB |
testcase_18 | AC | 115 ms
92,824 KB |
testcase_19 | AC | 116 ms
92,876 KB |
testcase_20 | AC | 143 ms
93,588 KB |
testcase_21 | AC | 118 ms
93,676 KB |
testcase_22 | AC | 115 ms
93,516 KB |
testcase_23 | AC | 115 ms
93,292 KB |
testcase_24 | AC | 116 ms
92,776 KB |
testcase_25 | AC | 115 ms
93,116 KB |
testcase_26 | AC | 117 ms
93,080 KB |
testcase_27 | AC | 120 ms
93,376 KB |
testcase_28 | AC | 116 ms
93,068 KB |
testcase_29 | AC | 113 ms
92,976 KB |
testcase_30 | AC | 113 ms
93,004 KB |
testcase_31 | AC | 116 ms
93,012 KB |
testcase_32 | AC | 113 ms
93,368 KB |
testcase_33 | AC | 117 ms
93,196 KB |
testcase_34 | AC | 117 ms
93,268 KB |
testcase_35 | AC | 118 ms
92,892 KB |
testcase_36 | AC | 117 ms
93,292 KB |
testcase_37 | AC | 116 ms
93,480 KB |
testcase_38 | AC | 119 ms
92,976 KB |
testcase_39 | AC | 116 ms
93,612 KB |
testcase_40 | AC | 147 ms
92,864 KB |
testcase_41 | AC | 115 ms
93,136 KB |
testcase_42 | AC | 117 ms
92,916 KB |
testcase_43 | AC | 117 ms
92,952 KB |
testcase_44 | AC | 149 ms
93,476 KB |
testcase_45 | AC | 120 ms
93,680 KB |
testcase_46 | AC | 119 ms
93,200 KB |
testcase_47 | AC | 121 ms
92,940 KB |
testcase_48 | AC | 117 ms
93,144 KB |
testcase_49 | AC | 116 ms
93,528 KB |
testcase_50 | AC | 119 ms
93,672 KB |
testcase_51 | AC | 142 ms
92,912 KB |
testcase_52 | AC | 117 ms
92,944 KB |
testcase_53 | AC | 115 ms
92,872 KB |
testcase_54 | AC | 114 ms
93,332 KB |
testcase_55 | AC | 116 ms
93,416 KB |
testcase_56 | AC | 115 ms
93,048 KB |
testcase_57 | AC | 115 ms
93,340 KB |
testcase_58 | AC | 116 ms
93,480 KB |
testcase_59 | AC | 119 ms
93,420 KB |
testcase_60 | AC | 115 ms
93,152 KB |
testcase_61 | AC | 116 ms
92,880 KB |
testcase_62 | AC | 119 ms
93,392 KB |
testcase_63 | AC | 115 ms
93,544 KB |
testcase_64 | AC | 121 ms
93,256 KB |
testcase_65 | AC | 117 ms
93,220 KB |
testcase_66 | AC | 116 ms
93,160 KB |
testcase_67 | AC | 115 ms
93,084 KB |
testcase_68 | AC | 116 ms
92,988 KB |
testcase_69 | AC | 118 ms
93,240 KB |
testcase_70 | AC | 115 ms
93,160 KB |
testcase_71 | AC | 115 ms
92,952 KB |
testcase_72 | AC | 128 ms
93,812 KB |
testcase_73 | AC | 115 ms
93,396 KB |
testcase_74 | AC | 117 ms
93,008 KB |
testcase_75 | AC | 118 ms
92,776 KB |
testcase_76 | AC | 114 ms
93,744 KB |
testcase_77 | AC | 116 ms
93,072 KB |
testcase_78 | AC | 115 ms
92,896 KB |
testcase_79 | AC | 117 ms
93,440 KB |
testcase_80 | AC | 116 ms
92,928 KB |
testcase_81 | AC | 116 ms
92,980 KB |
testcase_82 | AC | 118 ms
92,708 KB |
testcase_83 | AC | 120 ms
92,936 KB |
testcase_84 | AC | 116 ms
92,756 KB |
testcase_85 | AC | 117 ms
92,848 KB |
testcase_86 | AC | 118 ms
93,240 KB |
testcase_87 | AC | 117 ms
92,676 KB |
testcase_88 | AC | 117 ms
93,040 KB |
testcase_89 | AC | 118 ms
93,076 KB |
testcase_90 | AC | 117 ms
93,260 KB |
testcase_91 | AC | 120 ms
93,060 KB |
testcase_92 | AC | 121 ms
93,324 KB |
testcase_93 | AC | 116 ms
92,860 KB |
testcase_94 | AC | 118 ms
93,420 KB |
testcase_95 | AC | 117 ms
92,724 KB |
testcase_96 | AC | 115 ms
92,860 KB |
testcase_97 | AC | 119 ms
93,672 KB |
testcase_98 | AC | 120 ms
92,964 KB |
testcase_99 | AC | 116 ms
93,260 KB |
ソースコード
import sys input = sys.stdin.readline T,N,Money=map(int,input().split()) SELLS=[0]*N S = [0] * N P = [0] * N R = [0] * N # 序盤は少しだけ売って人気度を上げ、 # 人気度が上がったらたくさん売りさばくのが最適そう。 for tests in range(T): ALL=Money//500 if max(P)>=53: SUM=sum(SELLS) ANS=[0]*N for i in range(N): ANS[i]=ALL*SELLS[i]//SUM else: ANS=[0]*N for i in range(N): OK=1 NG=ALL+1 while OK+1<NG: mid=(OK+NG)//2 if (mid**(0.5))*(1.05**P[i])*0.75>=mid*0.3: OK=mid else: NG=mid ANS[i]=max(0,OK-R[i]) SUM=sum(ANS) if SUM>ALL: for i in range(N): ANS[i]=ALL*ANS[i]//SUM if tests<=45 and min(R)!=0 and max(P)<=55 and Money>=8000000: print(2,5,flush=True) elif tests<=45 and min(R)!=0 and max(P)<=56 and Money>=4000000: print(2,4,flush=True) elif tests<=45 and min(R)!=0 and max(P)<=57 and tests>=5 and Money>=2000000: print(2,3,flush=True) elif tests<=45 and min(R)!=0 and max(P)<=58 and tests>=5 and Money>=1000000: print(2,2,flush=True) elif tests<=45 and min(R)!=0 and max(P)<=59 and tests>=5 and Money>=500000: print(2,1,flush=True) else: print("1",*ANS,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())) for i in range(N): SELLS[i]+=S[i]