結果
| 問題 | 
                            No.90 品物の並び替え
                             | 
                    
| コンテスト | |
| ユーザー | 
                             ckawatak
                         | 
                    
| 提出日時 | 2017-07-20 00:09:09 | 
| 言語 | Python3  (3.13.1 + numpy 2.2.1 + scipy 1.14.1)  | 
                    
| 結果 | 
                             
                                WA
                                 
                             
                            
                         | 
                    
| 実行時間 | - | 
| コード長 | 436 bytes | 
| コンパイル時間 | 347 ms | 
| コンパイル使用メモリ | 12,544 KB | 
| 実行使用メモリ | 10,880 KB | 
| 最終ジャッジ日時 | 2024-10-08 14:41:11 | 
| 合計ジャッジ時間 | 3,824 ms | 
| 
                            ジャッジサーバーID (参考情報)  | 
                        judge3 / judge1 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 1 | 
| other | WA * 9 | 
ソースコード
from itertools import permutations
n,m = list(map(int, input().split(' ')))        
scores = []
for i in range(n):
    r = [0] * n
    scores.append(r)
for i in range(m):
    left, right, score = list(map(int, input().split(' ')))
    scores[left][right] = score
ms = -1    
for p in permutations(range(n)):
    score = 0
    for i in range(n-1):
        score += scores[p[i]][p[i+1]]
        ms = max(ms, score)
print(ms)        
            
            
            
        
            
ckawatak