結果
問題 | No.5018 Let's Make a Best-seller Book |
ユーザー | titia |
提出日時 | 2023-10-01 15:29:49 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 144 ms / 400 ms |
コード長 | 1,664 bytes |
コンパイル時間 | 380 ms |
コンパイル使用メモリ | 87,328 KB |
実行使用メモリ | 93,704 KB |
スコア | 13,954 |
平均クエリ数 | 52.00 |
最終ジャッジ日時 | 2023-10-01 15:30:07 |
合計ジャッジ時間 | 17,401 ms |
ジャッジサーバーID (参考情報) |
judge14 / judge15 |
純コード判定しない問題か言語 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 132 ms
92,800 KB |
testcase_01 | AC | 116 ms
92,728 KB |
testcase_02 | AC | 113 ms
92,868 KB |
testcase_03 | AC | 117 ms
93,512 KB |
testcase_04 | AC | 114 ms
92,932 KB |
testcase_05 | AC | 115 ms
92,852 KB |
testcase_06 | AC | 123 ms
93,028 KB |
testcase_07 | AC | 112 ms
92,632 KB |
testcase_08 | AC | 117 ms
93,216 KB |
testcase_09 | AC | 111 ms
92,644 KB |
testcase_10 | AC | 111 ms
93,448 KB |
testcase_11 | AC | 114 ms
92,852 KB |
testcase_12 | AC | 115 ms
93,200 KB |
testcase_13 | AC | 114 ms
93,256 KB |
testcase_14 | AC | 111 ms
93,028 KB |
testcase_15 | AC | 115 ms
93,704 KB |
testcase_16 | AC | 113 ms
92,684 KB |
testcase_17 | AC | 111 ms
93,524 KB |
testcase_18 | AC | 114 ms
93,036 KB |
testcase_19 | AC | 113 ms
92,796 KB |
testcase_20 | AC | 113 ms
93,480 KB |
testcase_21 | AC | 116 ms
92,928 KB |
testcase_22 | AC | 111 ms
92,740 KB |
testcase_23 | AC | 112 ms
93,656 KB |
testcase_24 | AC | 113 ms
92,816 KB |
testcase_25 | AC | 113 ms
93,516 KB |
testcase_26 | AC | 113 ms
92,852 KB |
testcase_27 | AC | 112 ms
92,772 KB |
testcase_28 | AC | 112 ms
92,840 KB |
testcase_29 | AC | 111 ms
93,260 KB |
testcase_30 | AC | 113 ms
93,256 KB |
testcase_31 | AC | 112 ms
93,240 KB |
testcase_32 | AC | 113 ms
92,524 KB |
testcase_33 | AC | 112 ms
92,936 KB |
testcase_34 | AC | 114 ms
93,308 KB |
testcase_35 | AC | 111 ms
92,824 KB |
testcase_36 | AC | 115 ms
93,540 KB |
testcase_37 | AC | 113 ms
92,752 KB |
testcase_38 | AC | 113 ms
93,312 KB |
testcase_39 | AC | 113 ms
93,288 KB |
testcase_40 | AC | 114 ms
92,560 KB |
testcase_41 | AC | 110 ms
93,244 KB |
testcase_42 | AC | 113 ms
93,048 KB |
testcase_43 | AC | 112 ms
93,056 KB |
testcase_44 | AC | 111 ms
93,544 KB |
testcase_45 | AC | 117 ms
92,740 KB |
testcase_46 | AC | 114 ms
93,300 KB |
testcase_47 | AC | 116 ms
93,520 KB |
testcase_48 | AC | 112 ms
93,188 KB |
testcase_49 | AC | 112 ms
93,200 KB |
testcase_50 | AC | 116 ms
93,660 KB |
testcase_51 | AC | 112 ms
93,256 KB |
testcase_52 | AC | 112 ms
92,988 KB |
testcase_53 | AC | 114 ms
93,548 KB |
testcase_54 | AC | 112 ms
92,956 KB |
testcase_55 | AC | 113 ms
93,120 KB |
testcase_56 | AC | 113 ms
92,964 KB |
testcase_57 | AC | 113 ms
92,780 KB |
testcase_58 | AC | 112 ms
93,024 KB |
testcase_59 | AC | 114 ms
92,716 KB |
testcase_60 | AC | 115 ms
92,784 KB |
testcase_61 | AC | 115 ms
93,032 KB |
testcase_62 | AC | 117 ms
93,056 KB |
testcase_63 | AC | 112 ms
92,876 KB |
testcase_64 | AC | 117 ms
92,844 KB |
testcase_65 | AC | 113 ms
93,000 KB |
testcase_66 | AC | 113 ms
92,580 KB |
testcase_67 | AC | 114 ms
93,128 KB |
testcase_68 | AC | 112 ms
92,856 KB |
testcase_69 | AC | 114 ms
92,884 KB |
testcase_70 | AC | 119 ms
93,072 KB |
testcase_71 | AC | 112 ms
93,308 KB |
testcase_72 | AC | 118 ms
93,044 KB |
testcase_73 | AC | 112 ms
93,104 KB |
testcase_74 | AC | 113 ms
93,420 KB |
testcase_75 | AC | 144 ms
92,960 KB |
testcase_76 | AC | 113 ms
93,452 KB |
testcase_77 | AC | 111 ms
93,136 KB |
testcase_78 | AC | 115 ms
93,652 KB |
testcase_79 | AC | 113 ms
93,192 KB |
testcase_80 | AC | 116 ms
92,624 KB |
testcase_81 | AC | 113 ms
92,764 KB |
testcase_82 | AC | 114 ms
92,816 KB |
testcase_83 | AC | 114 ms
93,464 KB |
testcase_84 | AC | 115 ms
93,396 KB |
testcase_85 | AC | 116 ms
92,916 KB |
testcase_86 | AC | 114 ms
92,880 KB |
testcase_87 | AC | 117 ms
93,340 KB |
testcase_88 | AC | 113 ms
92,880 KB |
testcase_89 | AC | 113 ms
92,936 KB |
testcase_90 | AC | 122 ms
93,280 KB |
testcase_91 | AC | 114 ms
92,908 KB |
testcase_92 | AC | 120 ms
92,660 KB |
testcase_93 | AC | 114 ms
93,248 KB |
testcase_94 | AC | 116 ms
92,916 KB |
testcase_95 | AC | 118 ms
93,036 KB |
testcase_96 | AC | 114 ms
92,900 KB |
testcase_97 | AC | 114 ms
93,068 KB |
testcase_98 | AC | 114 ms
93,000 KB |
testcase_99 | AC | 115 ms
93,228 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!=51 and max(P)<=55 and Money>=8000000: print(2,5,flush=True) elif tests!=51 and max(P)<=56 and Money>=4000000: print(2,4,flush=True) elif tests!=51 and max(P)<=57 and tests>=5 and Money>=2000000: print(2,3,flush=True) elif tests!=51 and max(P)<=58 and tests>=5 and Money>=1000000: print(2,2,flush=True) elif tests!=51 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]