結果
問題 | No.5018 Let's Make a Best-seller Book |
ユーザー | titia |
提出日時 | 2023-10-01 15:35:54 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 146 ms / 400 ms |
コード長 | 1,734 bytes |
コンパイル時間 | 322 ms |
コンパイル使用メモリ | 87,168 KB |
実行使用メモリ | 93,852 KB |
スコア | 77,489 |
平均クエリ数 | 52.00 |
最終ジャッジ日時 | 2023-10-01 15:36:14 |
合計ジャッジ時間 | 17,618 ms |
ジャッジサーバーID (参考情報) |
judge15 / judge12 |
純コード判定しない問題か言語 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 119 ms
93,288 KB |
testcase_01 | AC | 119 ms
93,648 KB |
testcase_02 | AC | 114 ms
93,136 KB |
testcase_03 | AC | 116 ms
93,132 KB |
testcase_04 | AC | 113 ms
93,040 KB |
testcase_05 | AC | 116 ms
92,872 KB |
testcase_06 | AC | 114 ms
93,328 KB |
testcase_07 | AC | 114 ms
92,976 KB |
testcase_08 | AC | 113 ms
92,992 KB |
testcase_09 | AC | 115 ms
92,956 KB |
testcase_10 | AC | 115 ms
92,948 KB |
testcase_11 | AC | 116 ms
92,968 KB |
testcase_12 | AC | 112 ms
92,944 KB |
testcase_13 | AC | 112 ms
93,628 KB |
testcase_14 | AC | 114 ms
93,280 KB |
testcase_15 | AC | 114 ms
93,404 KB |
testcase_16 | AC | 115 ms
92,884 KB |
testcase_17 | AC | 114 ms
93,584 KB |
testcase_18 | AC | 114 ms
92,648 KB |
testcase_19 | AC | 113 ms
93,096 KB |
testcase_20 | AC | 115 ms
93,136 KB |
testcase_21 | AC | 118 ms
93,464 KB |
testcase_22 | AC | 115 ms
92,944 KB |
testcase_23 | AC | 114 ms
92,900 KB |
testcase_24 | AC | 113 ms
93,280 KB |
testcase_25 | AC | 114 ms
93,260 KB |
testcase_26 | AC | 116 ms
93,136 KB |
testcase_27 | AC | 121 ms
93,568 KB |
testcase_28 | AC | 114 ms
93,272 KB |
testcase_29 | AC | 112 ms
93,232 KB |
testcase_30 | AC | 116 ms
93,560 KB |
testcase_31 | AC | 115 ms
93,136 KB |
testcase_32 | AC | 115 ms
93,152 KB |
testcase_33 | AC | 116 ms
93,548 KB |
testcase_34 | AC | 114 ms
92,664 KB |
testcase_35 | AC | 113 ms
92,696 KB |
testcase_36 | AC | 115 ms
93,420 KB |
testcase_37 | AC | 115 ms
92,972 KB |
testcase_38 | AC | 116 ms
92,772 KB |
testcase_39 | AC | 114 ms
92,988 KB |
testcase_40 | AC | 115 ms
93,104 KB |
testcase_41 | AC | 114 ms
93,052 KB |
testcase_42 | AC | 115 ms
93,184 KB |
testcase_43 | AC | 114 ms
92,848 KB |
testcase_44 | AC | 120 ms
93,852 KB |
testcase_45 | AC | 119 ms
93,228 KB |
testcase_46 | AC | 117 ms
93,244 KB |
testcase_47 | AC | 120 ms
92,896 KB |
testcase_48 | AC | 115 ms
92,952 KB |
testcase_49 | AC | 115 ms
92,688 KB |
testcase_50 | AC | 118 ms
93,056 KB |
testcase_51 | AC | 115 ms
93,008 KB |
testcase_52 | AC | 115 ms
93,492 KB |
testcase_53 | AC | 115 ms
93,192 KB |
testcase_54 | AC | 115 ms
93,292 KB |
testcase_55 | AC | 117 ms
93,440 KB |
testcase_56 | AC | 115 ms
92,668 KB |
testcase_57 | AC | 114 ms
92,688 KB |
testcase_58 | AC | 116 ms
93,088 KB |
testcase_59 | AC | 117 ms
92,660 KB |
testcase_60 | AC | 115 ms
92,944 KB |
testcase_61 | AC | 115 ms
93,244 KB |
testcase_62 | AC | 122 ms
93,156 KB |
testcase_63 | AC | 118 ms
93,120 KB |
testcase_64 | AC | 119 ms
93,344 KB |
testcase_65 | AC | 116 ms
92,964 KB |
testcase_66 | AC | 116 ms
92,652 KB |
testcase_67 | AC | 129 ms
93,564 KB |
testcase_68 | AC | 116 ms
93,080 KB |
testcase_69 | AC | 115 ms
92,948 KB |
testcase_70 | AC | 142 ms
93,216 KB |
testcase_71 | AC | 146 ms
93,040 KB |
testcase_72 | AC | 134 ms
93,260 KB |
testcase_73 | AC | 139 ms
93,532 KB |
testcase_74 | AC | 114 ms
93,072 KB |
testcase_75 | AC | 119 ms
93,672 KB |
testcase_76 | AC | 142 ms
93,600 KB |
testcase_77 | AC | 118 ms
93,096 KB |
testcase_78 | AC | 146 ms
93,644 KB |
testcase_79 | AC | 117 ms
92,872 KB |
testcase_80 | AC | 114 ms
92,868 KB |
testcase_81 | AC | 115 ms
93,076 KB |
testcase_82 | AC | 116 ms
92,976 KB |
testcase_83 | AC | 115 ms
93,236 KB |
testcase_84 | AC | 116 ms
93,124 KB |
testcase_85 | AC | 146 ms
93,100 KB |
testcase_86 | AC | 117 ms
92,796 KB |
testcase_87 | AC | 117 ms
92,820 KB |
testcase_88 | AC | 114 ms
93,388 KB |
testcase_89 | AC | 115 ms
92,956 KB |
testcase_90 | AC | 114 ms
93,068 KB |
testcase_91 | AC | 115 ms
93,040 KB |
testcase_92 | AC | 119 ms
93,224 KB |
testcase_93 | AC | 119 ms
92,952 KB |
testcase_94 | AC | 114 ms
92,956 KB |
testcase_95 | AC | 117 ms
92,976 KB |
testcase_96 | AC | 115 ms
92,920 KB |
testcase_97 | AC | 116 ms
93,136 KB |
testcase_98 | AC | 115 ms
92,984 KB |
testcase_99 | AC | 115 ms
92,728 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 #ALL=min(ALL,50*(tests+1)) if max(P)>=50: 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]