結果
| 問題 | 
                            No.90 品物の並び替え
                             | 
                    
| コンテスト | |
| ユーザー | 
                             | 
                    
| 提出日時 | 2018-02-01 11:47:38 | 
| 言語 | Python3  (3.13.1 + numpy 2.2.1 + scipy 1.14.1)  | 
                    
| 結果 | 
                             
                                TLE
                                 
                             
                            
                         | 
                    
| 実行時間 | - | 
| コード長 | 390 bytes | 
| コンパイル時間 | 216 ms | 
| コンパイル使用メモリ | 12,544 KB | 
| 実行使用メモリ | 67,620 KB | 
| 最終ジャッジ日時 | 2024-12-31 00:16:15 | 
| 合計ジャッジ時間 | 9,790 ms | 
| 
                            ジャッジサーバーID (参考情報)  | 
                        judge2 / judge4 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 1 | 
| other | AC * 8 TLE * 1 | 
ソースコード
import itertools n,m = map(int,input().split()) a = [] for i in range(m): temp = list(map(int,input().split())) a.append(temp) seq = [] for i in range(n): seq.append(i) c = list(itertools.permutations(seq)) score = [] k = len(c) for p in range(k): total = 0 for i in range(m): if c[p].index(a[i][0]) < c[p].index(a[i][1]): total += a[i][2] score.append(total) print(max(score))