結果

問題 No.90 品物の並び替え
ユーザー ixmelixmel
提出日時 2017-04-01 16:05:08
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 1,868 ms / 5,000 ms
コード長 198 bytes
コンパイル時間 259 ms
コンパイル使用メモリ 10,588 KB
実行使用メモリ 22,356 KB
最終ジャッジ日時 2023-09-22 02:03:58
合計ジャッジ時間 3,611 ms
ジャッジサーバーID
(参考情報)
judge15 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 18 ms
8,208 KB
testcase_01 AC 151 ms
9,672 KB
testcase_02 AC 17 ms
8,152 KB
testcase_03 AC 27 ms
8,472 KB
testcase_04 AC 37 ms
8,424 KB
testcase_05 AC 171 ms
9,764 KB
testcase_06 AC 125 ms
9,804 KB
testcase_07 AC 20 ms
8,172 KB
testcase_08 AC 17 ms
8,168 KB
testcase_09 AC 1,868 ms
22,356 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import itertools
n,m=map(int,input().split())
s=[list(map(int,input().split())) for _ in range(m)]
print(max([sum([c if t[a]<t[b] else 0 for a,b,c in s]) for t in itertools.permutations(range(n))]))
0