結果
| 問題 |
No.90 品物の並び替え
|
| コンテスト | |
| ユーザー |
zinnnia123
|
| 提出日時 | 2019-09-07 22:19:27 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 330 bytes |
| コンパイル時間 | 155 ms |
| コンパイル使用メモリ | 12,672 KB |
| 実行使用メモリ | 75,060 KB |
| 最終ジャッジ日時 | 2024-06-27 06:14:24 |
| 合計ジャッジ時間 | 9,790 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 |
| other | AC * 8 TLE * 1 |
ソースコード
import itertools
N, M = map(int, input().split())
score = [list(map(int, input().split())) for _ in range(M)]
A = list(itertools.permutations(list(range(N))))
B = [0]*len(A)
for i in range(M):
for j in range(len(A)):
if A[j].index(score[i][0]) > A[j].index(score[i][1]):
B[j] += score[i][2]
print(max(B))
zinnnia123