結果
| 問題 |
No.2730 Two Types Luggage
|
| コンテスト | |
| ユーザー |
june19312
|
| 提出日時 | 2024-04-19 23:17:09 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 662 bytes |
| コンパイル時間 | 269 ms |
| コンパイル使用メモリ | 81,812 KB |
| 実行使用メモリ | 230,444 KB |
| 最終ジャッジ日時 | 2024-10-11 17:46:35 |
| 合計ジャッジ時間 | 6,249 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 8 TLE * 1 -- * 26 |
ソースコード
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,i])
for i,v in enumerate(B):
t.append([C[i]//B[i],10000000+i])
t.sort()
#print(t)
ans = 0
weight = 0
for i in range(len(t)-1,-1,-1):
tanka,ind = t[i][0],t[i][1]
if ind >= 10000000:
ind-=10000000
omosa = B[ind]
value = C[ind]
else:
omosa = 1
value = A[ind]
if weight + omosa <= W:
weight += omosa
ans += value
else:
if omosa == 1:
print(ans)
exit()
print(ans)
june19312