結果

問題 No.90 品物の並び替え
ユーザー mottodoramottodora
提出日時 2016-10-31 23:36:46
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 1,862 ms / 5,000 ms
コード長 234 bytes
コンパイル時間 186 ms
コンパイル使用メモリ 10,632 KB
実行使用メモリ 22,240 KB
最終ジャッジ日時 2023-08-16 12:07:36
合計ジャッジ時間 3,375 ms
ジャッジサーバーID
(参考情報)
judge11 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 16 ms
8,104 KB
testcase_01 AC 147 ms
9,620 KB
testcase_02 AC 16 ms
8,104 KB
testcase_03 AC 24 ms
8,316 KB
testcase_04 AC 30 ms
8,216 KB
testcase_05 AC 167 ms
9,604 KB
testcase_06 AC 122 ms
9,680 KB
testcase_07 AC 17 ms
8,212 KB
testcase_08 AC 16 ms
8,056 KB
testcase_09 AC 1,862 ms
22,240 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

from itertools import permutations
N, M = map(int, input().split(' '))
rules = [list(map(int, input().split(' '))) for i in range(M)]
print(max([sum([k if t[i] < t[j] else 0 for i, j, k in rules]) for t in permutations(range(N), N)]))
0