結果

問題 No.2549 Paint Eggs
ユーザー titiatitia
提出日時 2023-11-29 01:47:47
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
RE  
実行時間 -
コード長 379 bytes
コンパイル時間 267 ms
コンパイル使用メモリ 11,904 KB
実行使用メモリ 41,152 KB
最終ジャッジ日時 2023-11-29 01:48:06
合計ジャッジ時間 17,405 ms
ジャッジサーバーID
(参考情報)
judge13 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 RE -
testcase_01 WA -
testcase_02 RE -
testcase_03 AC 29 ms
10,240 KB
testcase_04 AC 29 ms
10,240 KB
testcase_05 WA -
testcase_06 AC 29 ms
10,240 KB
testcase_07 WA -
testcase_08 AC 27 ms
10,112 KB
testcase_09 AC 29 ms
10,240 KB
testcase_10 AC 349 ms
37,892 KB
testcase_11 RE -
testcase_12 AC 341 ms
30,296 KB
testcase_13 AC 355 ms
36,632 KB
testcase_14 RE -
testcase_15 AC 52 ms
12,288 KB
testcase_16 AC 309 ms
34,160 KB
testcase_17 AC 263 ms
27,304 KB
testcase_18 AC 196 ms
25,428 KB
testcase_19 AC 277 ms
27,792 KB
testcase_20 AC 495 ms
41,152 KB
testcase_21 WA -
testcase_22 AC 475 ms
41,152 KB
testcase_23 WA -
testcase_24 AC 513 ms
41,152 KB
testcase_25 AC 419 ms
40,168 KB
testcase_26 WA -
testcase_27 WA -
testcase_28 WA -
testcase_29 AC 455 ms
41,152 KB
testcase_30 AC 497 ms
41,152 KB
testcase_31 AC 459 ms
41,152 KB
testcase_32 WA -
testcase_33 WA -
testcase_34 AC 415 ms
40,172 KB
testcase_35 AC 495 ms
41,152 KB
testcase_36 AC 503 ms
41,152 KB
testcase_37 WA -
testcase_38 AC 452 ms
41,152 KB
testcase_39 AC 449 ms
41,152 KB
testcase_40 WA -
testcase_41 WA -
testcase_42 WA -
testcase_43 AC 536 ms
41,152 KB
testcase_44 AC 507 ms
41,152 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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)
0