結果
| 問題 |
No.90 品物の並び替え
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2022-06-21 12:49:26 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 294 bytes |
| コンパイル時間 | 132 ms |
| コンパイル使用メモリ | 12,800 KB |
| 実行使用メモリ | 13,768 KB |
| 最終ジャッジ日時 | 2024-10-14 06:09:29 |
| 合計ジャッジ時間 | 9,347 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 |
| other | AC * 8 TLE * 1 |
ソースコード
from itertools import permutations
n,m=map(int,input().split())
lis=[list(map(int,input().split())) for _ in range(m)]
ans=[]
for per in permutations(range(n)):
tmp=0
for x,y,point in lis:
if per.index(x)>per.index(y):
tmp+=point
ans.append(tmp)
print(max(ans))