結果
| 問題 | No.90 品物の並び替え |
| コンテスト | |
| ユーザー |
vwxyz
|
| 提出日時 | 2022-10-18 11:32:46 |
| 言語 | PyPy3 (8.0.0 + ACL) |
| 結果 |
AC
不安定
|
| 実行時間 | 352 ms / 5,000 ms |
| + 615µs | |
| コード長 | 318 bytes |
| 記録 | |
| コンパイル時間 | 63 ms |
| コンパイル使用メモリ | 80,908 KB |
| 実行使用メモリ | 82,700 KB |
| 最終ジャッジ日時 | 2026-10-12 03:31:02 |
| 合計ジャッジ時間 | 2,323 ms |
|
ジャッジサーバーID (参考情報) |
judge4_0 / judge3_1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 |
| other | AC * 10 |
ソースコード
import itertools
import sys
readline=sys.stdin.readline
N,M=map(int,readline().split())
score=[tuple(map(int,readline().split())) for m in range(M)]
ans=0
for tpl in itertools.permutations([i for i in range(N)]):
S=0
for i,j,s in score:
if tpl[i]<tpl[j]:
S+=s
ans=max(ans,S)
print(ans)
vwxyz