結果
| 問題 |
No.2549 Paint Eggs
|
| コンテスト | |
| ユーザー |
Kude
|
| 提出日時 | 2023-11-25 13:10:25 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 387 bytes |
| コンパイル時間 | 192 ms |
| コンパイル使用メモリ | 82,176 KB |
| 実行使用メモリ | 122,332 KB |
| 最終ジャッジ日時 | 2024-09-26 10:22:35 |
| 合計ジャッジ時間 | 11,033 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 29 WA * 16 |
ソースコード
n, m, k = map(int, input().split())
c = [[] for _ in range(m)]
for i, x in enumerate(map(int, input().split())):
c[x - 1].append(i)
ans = 10 ** 9 * k
for x, indices in zip(map(int, input().split()), c):
j = 0
for i in range(len(indices)):
while j < len(indices) and indices[j] - indices[i] < k:
j += 1
ans = min(ans, (k - (j - i)) * x)
print(ans)
Kude