結果

問題 No.1122 Plane Tickets
ユーザー aaaaaaaaaa2230aaaaaaaaaa2230
提出日時 2020-07-24 18:45:25
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 371 bytes
コンパイル時間 306 ms
コンパイル使用メモリ 11,008 KB
実行使用メモリ 97,596 KB
最終ジャッジ日時 2023-09-07 22:35:16
合計ジャッジ時間 22,021 ms
ジャッジサーバーID
(参考情報)
judge11 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 343 ms
56,288 KB
testcase_01 AC 307 ms
56,292 KB
testcase_02 AC 305 ms
56,444 KB
testcase_03 AC 296 ms
56,316 KB
testcase_04 AC 295 ms
56,360 KB
testcase_05 AC 299 ms
56,296 KB
testcase_06 AC 317 ms
56,560 KB
testcase_07 AC 321 ms
56,564 KB
testcase_08 AC 317 ms
56,672 KB
testcase_09 AC 321 ms
56,268 KB
testcase_10 AC 317 ms
56,264 KB
testcase_11 AC 313 ms
56,524 KB
testcase_12 AC 328 ms
56,368 KB
testcase_13 AC 323 ms
56,552 KB
testcase_14 AC 297 ms
56,500 KB
testcase_15 AC 291 ms
56,504 KB
testcase_16 AC 297 ms
56,384 KB
testcase_17 AC 294 ms
56,280 KB
testcase_18 AC 304 ms
56,300 KB
testcase_19 AC 299 ms
56,556 KB
testcase_20 AC 305 ms
56,360 KB
testcase_21 AC 293 ms
56,536 KB
testcase_22 AC 304 ms
56,508 KB
testcase_23 AC 298 ms
56,560 KB
testcase_24 AC 295 ms
56,300 KB
testcase_25 AC 294 ms
56,356 KB
testcase_26 AC 294 ms
56,564 KB
testcase_27 AC 295 ms
56,628 KB
testcase_28 AC 304 ms
56,728 KB
testcase_29 AC 307 ms
56,328 KB
testcase_30 AC 305 ms
56,460 KB
testcase_31 AC 306 ms
56,288 KB
testcase_32 AC 307 ms
56,368 KB
testcase_33 AC 323 ms
56,256 KB
testcase_34 AC 326 ms
56,572 KB
testcase_35 AC 322 ms
56,316 KB
testcase_36 AC 305 ms
56,356 KB
testcase_37 AC 292 ms
56,380 KB
testcase_38 AC 286 ms
56,448 KB
testcase_39 AC 302 ms
56,536 KB
testcase_40 AC 293 ms
56,496 KB
testcase_41 AC 292 ms
56,404 KB
testcase_42 AC 292 ms
56,444 KB
testcase_43 AC 291 ms
56,380 KB
testcase_44 AC 294 ms
56,292 KB
testcase_45 AC 301 ms
56,292 KB
testcase_46 AC 301 ms
56,448 KB
testcase_47 AC 298 ms
56,312 KB
testcase_48 AC 305 ms
56,352 KB
testcase_49 AC 300 ms
56,304 KB
testcase_50 AC 309 ms
56,280 KB
testcase_51 WA -
testcase_52 WA -
testcase_53 AC 303 ms
56,276 KB
testcase_54 AC 323 ms
56,224 KB
testcase_55 AC 331 ms
56,416 KB
testcase_56 AC 327 ms
97,596 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

from scipy.optimize import linprog
import numpy as np
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