結果
| 問題 | No.90 品物の並び替え |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2020-10-23 00:55:10 |
| 言語 | Python3 (3.15.0 + numpy 2.5.4 + scipy 1.18.1 + ACL) |
| 結果 |
WA
不安定
|
| 実行時間 | - |
| コード長 | 400 bytes |
| 記録 | |
| コンパイル時間 | 303 ms |
| コンパイル使用メモリ | 21,408 KB |
| 実行使用メモリ | 15,996 KB |
| 最終ジャッジ日時 | 2026-08-21 13:16:26 |
| 合計ジャッジ時間 | 10,329 ms |
|
ジャッジサーバーID (参考情報) |
judge2_0 / judge1_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 |
| other | AC * 1 WA * 7 TLE * 1 |
ソースコード
from itertools import permutations
N,M = map(int,input().split())
l = [[] for _ in range(N)]
ans = 0
for _ in range(M):
i,y,s = map(int,input().split())
l[i].append([y,s])
for perm in permutations(range(N)):
perm = list(perm)
now = 0
for i in range(N):
for item,score in l[i]:
if item in perm[:i]:
now += score
ans = max(ans,now)
print(ans)