結果

問題 No.1122 Plane Tickets
ユーザー shell_mugshell_mug
提出日時 2020-07-22 22:59:11
言語 Python3
(3.11.6 + numpy 1.26.0 + scipy 1.11.3)
結果
TLE  
実行時間 -
コード長 372 bytes
コンパイル時間 266 ms
コンパイル使用メモリ 10,876 KB
実行使用メモリ 106,148 KB
最終ジャッジ日時 2023-09-05 22:13:21
合計ジャッジ時間 23,912 ms
ジャッジサーバーID
(参考情報)
judge14 / judge11
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 TLE -
testcase_01 AC 311 ms
57,912 KB
testcase_02 AC 312 ms
57,900 KB
testcase_03 AC 316 ms
58,264 KB
testcase_04 AC 318 ms
58,268 KB
testcase_05 AC 320 ms
58,368 KB
testcase_06 AC 318 ms
58,264 KB
testcase_07 AC 312 ms
57,944 KB
testcase_08 AC 310 ms
57,912 KB
testcase_09 AC 316 ms
57,904 KB
testcase_10 AC 313 ms
58,128 KB
testcase_11 AC 314 ms
58,420 KB
testcase_12 AC 315 ms
58,260 KB
testcase_13 AC 313 ms
57,952 KB
testcase_14 AC 311 ms
58,152 KB
testcase_15 AC 312 ms
58,156 KB
testcase_16 AC 309 ms
58,220 KB
testcase_17 AC 310 ms
58,328 KB
testcase_18 AC 323 ms
58,148 KB
testcase_19 AC 314 ms
57,952 KB
testcase_20 AC 315 ms
58,256 KB
testcase_21 AC 312 ms
58,248 KB
testcase_22 AC 319 ms
58,372 KB
testcase_23 AC 318 ms
58,048 KB
testcase_24 AC 309 ms
58,160 KB
testcase_25 AC 306 ms
58,180 KB
testcase_26 AC 311 ms
58,192 KB
testcase_27 AC 316 ms
58,272 KB
testcase_28 AC 315 ms
58,192 KB
testcase_29 AC 318 ms
58,192 KB
testcase_30 AC 308 ms
58,228 KB
testcase_31 AC 307 ms
57,868 KB
testcase_32 AC 309 ms
58,184 KB
testcase_33 AC 312 ms
58,136 KB
testcase_34 AC 309 ms
58,180 KB
testcase_35 AC 306 ms
57,936 KB
testcase_36 AC 311 ms
58,280 KB
testcase_37 AC 311 ms
58,240 KB
testcase_38 AC 311 ms
58,260 KB
testcase_39 AC 315 ms
58,252 KB
testcase_40 AC 307 ms
58,232 KB
testcase_41 AC 316 ms
58,180 KB
testcase_42 AC 315 ms
58,264 KB
testcase_43 AC 312 ms
58,156 KB
testcase_44 AC 312 ms
57,912 KB
testcase_45 AC 313 ms
57,896 KB
testcase_46 AC 311 ms
57,944 KB
testcase_47 AC 313 ms
58,208 KB
testcase_48 AC 310 ms
57,980 KB
testcase_49 AC 309 ms
58,028 KB
testcase_50 AC 309 ms
58,112 KB
testcase_51 AC 312 ms
58,196 KB
testcase_52 AC 314 ms
58,220 KB
testcase_53 WA -
testcase_54 WA -
testcase_55 WA -
testcase_56 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

from scipy.optimize import linprog
c = [-1,-1,-1,-1,-1]
a_ub = [[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_ub = list(map(int, input().split()))
bounds = (0, None)
res = linprog(c, A_ub=a_ub, b_ub=b_ub, bounds=bounds, method='revised simplex')
frac = -res.fun - int(-res.fun)
print(int(-res.fun) + (frac > 0.9999999))
0