結果
| 問題 |
No.2549 Paint Eggs
|
| コンテスト | |
| ユーザー |
titia
|
| 提出日時 | 2023-11-29 01:47:47 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
RE
|
| 実行時間 | - |
| コード長 | 379 bytes |
| コンパイル時間 | 220 ms |
| コンパイル使用メモリ | 12,672 KB |
| 実行使用メモリ | 41,588 KB |
| 最終ジャッジ日時 | 2024-09-26 13:14:22 |
| 合計ジャッジ時間 | 18,293 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 27 WA * 14 RE * 4 |
ソースコード
from collections import Counter
N,M,K=map(int,input().split())
B=list(map(int,input().split()))
A=list(map(int,input().split()))
MAX=[0]*(M+1)
C=Counter()
for i in range(K):
C[B[i]]+=1
for c in C:
MAX[c]=C[c]
for i in range(K,N):
C[B[i]]+=1
C[B[i-M]]-=1
MAX[B[i]]=C[B[i]]
ANS=1<<60
for i in range(1,M+1):
ANS=min(ANS,(K-MAX[i])*A[i-1])
print(ANS)
titia