結果
問題 | No.5018 Let's Make a Best-seller Book |
ユーザー | titia |
提出日時 | 2023-10-01 15:48:31 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 125 ms / 400 ms |
コード長 | 1,733 bytes |
コンパイル時間 | 289 ms |
コンパイル使用メモリ | 87,196 KB |
実行使用メモリ | 93,608 KB |
スコア | 75,966 |
平均クエリ数 | 52.00 |
最終ジャッジ日時 | 2023-10-01 15:48:49 |
合計ジャッジ時間 | 17,275 ms |
ジャッジサーバーID (参考情報) |
judge12 / judge11 |
純コード判定しない問題か言語 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 119 ms
93,044 KB |
testcase_01 | AC | 112 ms
93,540 KB |
testcase_02 | AC | 112 ms
93,192 KB |
testcase_03 | AC | 116 ms
92,988 KB |
testcase_04 | AC | 111 ms
92,692 KB |
testcase_05 | AC | 112 ms
93,468 KB |
testcase_06 | AC | 112 ms
93,404 KB |
testcase_07 | AC | 112 ms
92,984 KB |
testcase_08 | AC | 110 ms
93,168 KB |
testcase_09 | AC | 112 ms
93,040 KB |
testcase_10 | AC | 112 ms
92,836 KB |
testcase_11 | AC | 115 ms
93,252 KB |
testcase_12 | AC | 112 ms
93,276 KB |
testcase_13 | AC | 112 ms
93,384 KB |
testcase_14 | AC | 112 ms
93,036 KB |
testcase_15 | AC | 112 ms
93,252 KB |
testcase_16 | AC | 112 ms
92,768 KB |
testcase_17 | AC | 114 ms
92,952 KB |
testcase_18 | AC | 115 ms
93,328 KB |
testcase_19 | AC | 115 ms
92,812 KB |
testcase_20 | AC | 113 ms
92,976 KB |
testcase_21 | AC | 116 ms
93,116 KB |
testcase_22 | AC | 112 ms
93,608 KB |
testcase_23 | AC | 115 ms
93,256 KB |
testcase_24 | AC | 114 ms
92,864 KB |
testcase_25 | AC | 113 ms
92,980 KB |
testcase_26 | AC | 116 ms
93,340 KB |
testcase_27 | AC | 114 ms
93,084 KB |
testcase_28 | AC | 112 ms
93,112 KB |
testcase_29 | AC | 113 ms
92,880 KB |
testcase_30 | AC | 113 ms
93,056 KB |
testcase_31 | AC | 113 ms
92,936 KB |
testcase_32 | AC | 113 ms
93,000 KB |
testcase_33 | AC | 112 ms
93,076 KB |
testcase_34 | AC | 115 ms
92,872 KB |
testcase_35 | AC | 113 ms
93,048 KB |
testcase_36 | AC | 114 ms
93,164 KB |
testcase_37 | AC | 112 ms
93,184 KB |
testcase_38 | AC | 114 ms
92,848 KB |
testcase_39 | AC | 113 ms
93,352 KB |
testcase_40 | AC | 113 ms
93,088 KB |
testcase_41 | AC | 115 ms
93,312 KB |
testcase_42 | AC | 114 ms
93,028 KB |
testcase_43 | AC | 112 ms
92,792 KB |
testcase_44 | AC | 114 ms
93,152 KB |
testcase_45 | AC | 116 ms
93,464 KB |
testcase_46 | AC | 113 ms
93,504 KB |
testcase_47 | AC | 119 ms
93,432 KB |
testcase_48 | AC | 114 ms
92,876 KB |
testcase_49 | AC | 115 ms
92,984 KB |
testcase_50 | AC | 116 ms
93,464 KB |
testcase_51 | AC | 114 ms
93,408 KB |
testcase_52 | AC | 113 ms
93,140 KB |
testcase_53 | AC | 113 ms
93,352 KB |
testcase_54 | AC | 113 ms
92,924 KB |
testcase_55 | AC | 114 ms
92,984 KB |
testcase_56 | AC | 113 ms
92,952 KB |
testcase_57 | AC | 114 ms
92,736 KB |
testcase_58 | AC | 113 ms
93,048 KB |
testcase_59 | AC | 115 ms
93,108 KB |
testcase_60 | AC | 113 ms
92,804 KB |
testcase_61 | AC | 116 ms
93,272 KB |
testcase_62 | AC | 122 ms
92,856 KB |
testcase_63 | AC | 115 ms
93,464 KB |
testcase_64 | AC | 118 ms
93,596 KB |
testcase_65 | AC | 115 ms
93,388 KB |
testcase_66 | AC | 114 ms
92,712 KB |
testcase_67 | AC | 113 ms
93,300 KB |
testcase_68 | AC | 115 ms
93,292 KB |
testcase_69 | AC | 113 ms
93,024 KB |
testcase_70 | AC | 115 ms
93,304 KB |
testcase_71 | AC | 115 ms
92,980 KB |
testcase_72 | AC | 125 ms
93,256 KB |
testcase_73 | AC | 115 ms
93,204 KB |
testcase_74 | AC | 114 ms
93,044 KB |
testcase_75 | AC | 119 ms
93,116 KB |
testcase_76 | AC | 118 ms
93,376 KB |
testcase_77 | AC | 115 ms
93,560 KB |
testcase_78 | AC | 116 ms
93,384 KB |
testcase_79 | AC | 113 ms
93,576 KB |
testcase_80 | AC | 113 ms
93,060 KB |
testcase_81 | AC | 114 ms
93,412 KB |
testcase_82 | AC | 113 ms
92,772 KB |
testcase_83 | AC | 112 ms
93,332 KB |
testcase_84 | AC | 116 ms
93,324 KB |
testcase_85 | AC | 115 ms
92,868 KB |
testcase_86 | AC | 111 ms
93,348 KB |
testcase_87 | AC | 113 ms
93,028 KB |
testcase_88 | AC | 115 ms
92,760 KB |
testcase_89 | AC | 112 ms
92,668 KB |
testcase_90 | AC | 113 ms
93,084 KB |
testcase_91 | AC | 114 ms
93,048 KB |
testcase_92 | AC | 117 ms
92,892 KB |
testcase_93 | AC | 113 ms
93,156 KB |
testcase_94 | AC | 112 ms
93,124 KB |
testcase_95 | AC | 113 ms
93,104 KB |
testcase_96 | AC | 113 ms
93,508 KB |
testcase_97 | AC | 113 ms
93,420 KB |
testcase_98 | AC | 113 ms
92,980 KB |
testcase_99 | AC | 112 ms
93,060 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)>=40: 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]