結果
問題 | No.90 品物の並び替え |
ユーザー | dango |
提出日時 | 2023-06-15 21:07:03 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 630 ms / 5,000 ms |
コード長 | 215 bytes |
コンパイル時間 | 260 ms |
コンパイル使用メモリ | 87,244 KB |
実行使用メモリ | 100,860 KB |
最終ジャッジ日時 | 2023-09-05 23:54:56 |
合計ジャッジ時間 | 2,563 ms |
ジャッジサーバーID (参考情報) |
judge12 / judge15 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 69 ms
71,416 KB |
testcase_01 | AC | 151 ms
78,708 KB |
testcase_02 | AC | 70 ms
71,388 KB |
testcase_03 | AC | 99 ms
77,436 KB |
testcase_04 | AC | 96 ms
77,288 KB |
testcase_05 | AC | 140 ms
78,728 KB |
testcase_06 | AC | 128 ms
78,728 KB |
testcase_07 | AC | 79 ms
76,036 KB |
testcase_08 | AC | 66 ms
71,412 KB |
testcase_09 | AC | 630 ms
100,860 KB |
ソースコード
from itertools import permutations 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 permutations(range(N))]))