結果

問題 No.90 品物の並び替え
ユーザー MaboyMaboy
提出日時 2017-04-22 18:12:31
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 2,770 ms / 5,000 ms
コード長 226 bytes
コンパイル時間 296 ms
コンパイル使用メモリ 10,552 KB
実行使用メモリ 67,668 KB
最終ジャッジ日時 2023-09-28 21:23:29
合計ジャッジ時間 4,633 ms
ジャッジサーバーID
(参考情報)
judge13 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 16 ms
8,116 KB
testcase_01 AC 220 ms
16,992 KB
testcase_02 AC 16 ms
8,156 KB
testcase_03 AC 29 ms
8,916 KB
testcase_04 AC 38 ms
8,832 KB
testcase_05 AC 246 ms
17,036 KB
testcase_06 AC 179 ms
15,040 KB
testcase_07 AC 19 ms
8,256 KB
testcase_08 AC 16 ms
8,140 KB
testcase_09 AC 2,770 ms
67,668 KB
権限があれば一括ダウンロードができます

ソースコード

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)]))
a=set([sum([(a[l]<a[r])*s for l,r,s in s]) for a in ol])
print(max(a))
0