結果

問題 No.1122 Plane Tickets
ユーザー shell_mugshell_mug
提出日時 2020-07-22 22:08:26
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
TLE  
実行時間 -
コード長 302 bytes
コンパイル時間 292 ms
コンパイル使用メモリ 10,648 KB
実行使用メモリ 96,060 KB
最終ジャッジ日時 2023-09-04 20:48:34
合計ジャッジ時間 4,850 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 TLE -
testcase_01 AC 287 ms
57,980 KB
testcase_02 AC 290 ms
57,860 KB
testcase_03 AC 293 ms
58,484 KB
testcase_04 AC 293 ms
58,300 KB
testcase_05 AC 291 ms
57,880 KB
testcase_06 AC 294 ms
58,348 KB
testcase_07 AC 302 ms
58,596 KB
testcase_08 AC 298 ms
58,604 KB
testcase_09 AC 295 ms
58,168 KB
testcase_10 AC 297 ms
58,340 KB
testcase_11 AC 298 ms
58,136 KB
testcase_12 AC 296 ms
58,256 KB
testcase_13 AC 298 ms
58,172 KB
testcase_14 AC 298 ms
58,188 KB
testcase_15 AC 294 ms
58,640 KB
testcase_16 AC 298 ms
58,604 KB
testcase_17 AC 294 ms
58,152 KB
testcase_18 AC 294 ms
58,212 KB
testcase_19 AC 298 ms
58,252 KB
testcase_20 AC 294 ms
58,340 KB
testcase_21 AC 297 ms
58,076 KB
testcase_22 AC 296 ms
58,252 KB
testcase_23 AC 294 ms
58,256 KB
testcase_24 AC 295 ms
58,244 KB
testcase_25 AC 295 ms
58,112 KB
testcase_26 AC 302 ms
58,188 KB
testcase_27 AC 295 ms
58,072 KB
testcase_28 AC 301 ms
58,024 KB
testcase_29 AC 299 ms
58,144 KB
testcase_30 AC 300 ms
57,992 KB
testcase_31 AC 333 ms
58,444 KB
testcase_32 WA -
testcase_33 AC 296 ms
58,328 KB
testcase_34 AC 299 ms
58,032 KB
testcase_35 AC 293 ms
58,120 KB
testcase_36 AC 289 ms
58,176 KB
testcase_37 AC 289 ms
58,024 KB
testcase_38 AC 288 ms
57,972 KB
testcase_39 AC 289 ms
58,392 KB
testcase_40 AC 288 ms
57,980 KB
testcase_41 AC 295 ms
58,520 KB
testcase_42 AC 291 ms
57,860 KB
testcase_43 AC 290 ms
57,856 KB
testcase_44 AC 297 ms
58,460 KB
testcase_45 AC 296 ms
58,384 KB
testcase_46 AC 300 ms
58,064 KB
testcase_47 AC 294 ms
57,940 KB
testcase_48 AC 293 ms
58,056 KB
testcase_49 WA -
testcase_50 AC 300 ms
57,920 KB
testcase_51 WA -
testcase_52 WA -
testcase_53 AC 294 ms
58,012 KB
testcase_54 WA -
testcase_55 AC 293 ms
58,184 KB
testcase_56 AC 293 ms
96,060 KB
権限があれば一括ダウンロードができます

ソースコード

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)
print(int(round(-res.fun,0)))
0