結果
| 問題 | No.90 品物の並び替え |
| コンテスト | |
| ユーザー |
bellangeldindon
|
| 提出日時 | 2019-05-08 16:05:34 |
| 言語 | PyPy2 (7.3.15) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 594 bytes |
| 記録 | |
| コンパイル時間 | 154 ms |
| コンパイル使用メモリ | 77,280 KB |
| 最終ジャッジ日時 | 2025-12-04 01:39:12 |
|
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 |
| other | AC * 8 TLE * 1 |
ソースコード
N, M = map(int, raw_input().split()) sequence = [[]] memo = [] while sequence != []: now = sequence.pop(0) if len(now) == N: memo.append(now) else: for i in range(0, N): newseq = [] for j in range(0, len(now)): newseq.append(now[j]) if i not in newseq: newseq.append(i) sequence.append(newseq) pointlist = [] for i in range(0, M): pointlist.append(map(int, raw_input().split())) max = 0 for i in range(0, len(memo)): sum = 0 for j in range(0, M): if memo[i][pointlist[j][0]] < memo[i][pointlist[j][1]]: sum += pointlist[j][2] if max < sum: max = sum print max
bellangeldindon