結果
問題 | No.90 品物の並び替え |
ユーザー |
|
提出日時 | 2022-06-21 12:55:26 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 1,182 ms / 5,000 ms |
コード長 | 312 bytes |
コンパイル時間 | 184 ms |
コンパイル使用メモリ | 82,244 KB |
実行使用メモリ | 88,396 KB |
最終ジャッジ日時 | 2024-10-14 06:14:57 |
合計ジャッジ時間 | 2,613 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 1 |
other | AC * 9 |
ソースコード
from itertools import permutationsn,m=map(int,input().split())lis=[list(map(int,input().split())) for _ in range(m)]ans=[]for per in permutations(range(n)):tmp=0per=list(per)for x,y,point in lis:if per.index(x)>per.index(y):tmp+=pointans.append(tmp)print(max(ans))