結果

問題 No.1122 Plane Tickets
ユーザー Shuz*
提出日時 2020-07-22 21:59:15
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
TLE  
実行時間 -
コード長 392 bytes
コンパイル時間 219 ms
コンパイル使用メモリ 12,544 KB
実行使用メモリ 61,168 KB
最終ジャッジ日時 2024-06-22 17:37:40
合計ジャッジ時間 4,792 ms
ジャッジサーバーID
(参考情報)
judge3 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample TLE * 1 -- * 1
other -- * 55
権限があれば一括ダウンロードができます

ソースコード

diff #

from scipy.optimize import linprog

p, q, r, s, t = input().split() 

c = [-1, -1, -1, -1, -1]
A = [[1, 1, 1, 0, 0], [0, 1, 1, 1, 0], [0, 0, 1, 1, 1], [1, 0, 0, 1, 1], [1, 1, 0, 0, 1]]
b = [int(p), int(q), int(r), int(s), int(t)]
bounds =[
    (0, None), 
    (0, None), 
    (0, None), 
    (0, None), 
    (0, None), 
]


res = linprog(c, A_ub=A, b_ub=b, bounds=bounds)
print(-int(res.fun))
0