結果

問題 No.1122 Plane Tickets
ユーザー 👑 jupirojupiro
提出日時 2020-07-22 22:06:28
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 402 bytes
コンパイル時間 217 ms
コンパイル使用メモリ 10,964 KB
実行使用メモリ 104,412 KB
最終ジャッジ日時 2023-09-05 22:15:49
合計ジャッジ時間 21,955 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 858 ms
56,900 KB
testcase_01 AC 304 ms
56,820 KB
testcase_02 AC 304 ms
56,640 KB
testcase_03 AC 301 ms
56,828 KB
testcase_04 AC 302 ms
56,736 KB
testcase_05 AC 306 ms
56,704 KB
testcase_06 AC 305 ms
56,728 KB
testcase_07 AC 308 ms
56,836 KB
testcase_08 AC 302 ms
56,836 KB
testcase_09 AC 304 ms
56,844 KB
testcase_10 AC 304 ms
56,924 KB
testcase_11 AC 303 ms
56,960 KB
testcase_12 AC 307 ms
56,632 KB
testcase_13 AC 305 ms
56,876 KB
testcase_14 AC 301 ms
56,824 KB
testcase_15 AC 302 ms
56,688 KB
testcase_16 AC 306 ms
56,844 KB
testcase_17 AC 300 ms
56,908 KB
testcase_18 AC 303 ms
56,828 KB
testcase_19 AC 305 ms
56,616 KB
testcase_20 AC 301 ms
56,816 KB
testcase_21 AC 305 ms
56,884 KB
testcase_22 AC 300 ms
56,980 KB
testcase_23 AC 304 ms
56,864 KB
testcase_24 AC 300 ms
56,688 KB
testcase_25 AC 310 ms
56,828 KB
testcase_26 AC 305 ms
56,672 KB
testcase_27 AC 304 ms
56,816 KB
testcase_28 AC 302 ms
56,868 KB
testcase_29 AC 301 ms
56,820 KB
testcase_30 AC 303 ms
56,724 KB
testcase_31 AC 304 ms
56,912 KB
testcase_32 AC 305 ms
56,784 KB
testcase_33 AC 305 ms
56,788 KB
testcase_34 AC 305 ms
56,748 KB
testcase_35 AC 301 ms
56,660 KB
testcase_36 AC 298 ms
56,924 KB
testcase_37 AC 300 ms
56,716 KB
testcase_38 AC 298 ms
56,672 KB
testcase_39 AC 300 ms
56,824 KB
testcase_40 AC 307 ms
56,612 KB
testcase_41 AC 304 ms
56,588 KB
testcase_42 AC 296 ms
56,828 KB
testcase_43 AC 303 ms
56,876 KB
testcase_44 AC 297 ms
56,804 KB
testcase_45 AC 300 ms
56,872 KB
testcase_46 AC 303 ms
57,040 KB
testcase_47 AC 304 ms
56,620 KB
testcase_48 AC 303 ms
56,748 KB
testcase_49 AC 308 ms
56,888 KB
testcase_50 AC 308 ms
56,668 KB
testcase_51 WA -
testcase_52 WA -
testcase_53 AC 297 ms
56,876 KB
testcase_54 AC 297 ms
56,708 KB
testcase_55 AC 303 ms
56,624 KB
testcase_56 AC 305 ms
104,412 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import numpy as np
from scipy.optimize import linprog
u,v,w,x,y = map(int,input().split())
c = [-1, -1, -1, -1, -1]
A = [[1, 0, 0, 1, 1], [1, 1, 0, 0, 1], [1, 1, 1, 0, 0], [0, 1, 1, 1, 0], [0, 0, 1, 1, 1]]
b = [u, v, w, x, y]
x1 = (0,None)
x2 = (0,None)
x3 = (0,None)
x4 = (0,None)
x5 = (0,None)
ans = linprog(c, A_ub=A, b_ub=b, bounds=(x1,x2,x3, x4, x5),method='simplex')
print(int(-ans.fun + 0.001))
0