結果

問題 No.90 品物の並び替え
ユーザー MaboyMaboy
提出日時 2017-04-22 17:29:27
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
TLE  
実行時間 -
コード長 229 bytes
コンパイル時間 88 ms
コンパイル使用メモリ 10,676 KB
実行使用メモリ 68,544 KB
最終ジャッジ日時 2023-09-28 21:22:09
合計ジャッジ時間 8,334 ms
ジャッジサーバーID
(参考情報)
judge12 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 16 ms
8,056 KB
testcase_01 AC 466 ms
14,460 KB
testcase_02 AC 16 ms
8,132 KB
testcase_03 AC 42 ms
8,924 KB
testcase_04 AC 61 ms
8,980 KB
testcase_05 AC 519 ms
14,472 KB
testcase_06 AC 361 ms
14,620 KB
testcase_07 AC 20 ms
8,328 KB
testcase_08 AC 16 ms
8,148 KB
testcase_09 TLE -
権限があれば一括ダウンロードができます

ソースコード

diff #

import itertools
N,M=map(int, input().split())
s=[list(map(int,input().split())) for x in range(M)]
ol=list(itertools.permutations([x for x in range(N)]))
print(max([sum([(a.index(l)<a.index(r))*s for l,r,s in s]) for a in ol]))
0