結果
問題 |
No.2730 Two Types Luggage
|
ユーザー |
![]() |
提出日時 | 2024-04-19 23:13:47 |
言語 | PyPy3 (7.3.15) |
結果 |
TLE
|
実行時間 | - |
コード長 | 521 bytes |
コンパイル時間 | 559 ms |
コンパイル使用メモリ | 82,176 KB |
実行使用メモリ | 221,212 KB |
最終ジャッジ日時 | 2024-10-11 17:36:00 |
合計ジャッジ時間 | 9,119 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 8 TLE * 2 -- * 25 |
ソースコード
N,M,W = map(int,input().split()) A = list(map(int,input().split())) B = list(map(int,input().split())) C = list(map(int,input().split())) t = [] for i,v in enumerate(A): t.append((v,1,v)) for i,v in enumerate(B): t.append((C[i]//B[i],B[i],C[i])) t.sort() #print(t) ans = 0 weight = 0 for i in range(len(t)-1,-1,-1): omosa,value = t[i][1],t[i][2] if weight + omosa <= W: weight += omosa ans += value else: if omosa == 1: print(ans) exit() print(ans)