結果

問題 No.90 品物の並び替え
コンテスト
ユーザー mlihua09
提出日時 2020-08-23 13:33:20
言語 PyPy3
(7.3.23 + ACL)
コンパイル:
pypy3 -mpy_compile _filename_
実行:
pypy3 _filename_
結果
AC  
実行時間 410 ms / 5,000 ms
+ 307µs
コード長 300 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 75 ms
コンパイル使用メモリ 80,768 KB
実行使用メモリ 83,584 KB
最終ジャッジ日時 2026-09-18 21:02:48
合計ジャッジ時間 2,513 ms
ジャッジサーバーID
(参考情報)
judge1_0 / judge3_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 1
other AC * 9
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code





N, M = map(int, input().split())

item = list(list(map(int, input().split())) for i in range(M))

ans = 0


from itertools import permutations

for i in permutations(range(N), N):
    
    ans = max(ans, sum([score if i[item1] > i[item2] else 0 for item1, item2, score in item]))
    
print(ans)
0