結果
問題 | No.90 品物の並び替え |
ユーザー |
![]() |
提出日時 | 2023-12-28 13:15:00 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 412 ms / 5,000 ms |
コード長 | 280 bytes |
コンパイル時間 | 343 ms |
コンパイル使用メモリ | 82,532 KB |
実行使用メモリ | 75,392 KB |
最終ジャッジ日時 | 2024-09-27 15:43:54 |
合計ジャッジ時間 | 1,685 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 1 |
other | AC * 9 |
ソースコード
from itertools import permutationsN,M = map(int,input().split())XYS = [list(map(int,input().split())) for _ in range(M)]ans = 0for L in permutations(range(N),N):tmp = 0for x,y,s in XYS:if L[x] < L[y]:tmp += sans = max(ans,tmp)print(ans)