結果

問題 No.2549 Paint Eggs
ユーザー rlangevinrlangevin
提出日時 2023-12-12 08:52:56
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 136 ms / 2,000 ms
コード長 284 bytes
コンパイル時間 203 ms
コンパイル使用メモリ 81,700 KB
実行使用メモリ 112,096 KB
最終ジャッジ日時 2023-12-12 08:53:06
合計ジャッジ時間 9,242 ms
ジャッジサーバーID
(参考情報)
judge15 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 40 ms
59,716 KB
testcase_01 AC 42 ms
59,976 KB
testcase_02 AC 40 ms
59,716 KB
testcase_03 AC 42 ms
59,976 KB
testcase_04 AC 43 ms
59,976 KB
testcase_05 AC 40 ms
59,460 KB
testcase_06 AC 43 ms
59,972 KB
testcase_07 AC 46 ms
62,248 KB
testcase_08 AC 37 ms
53,460 KB
testcase_09 AC 41 ms
59,976 KB
testcase_10 AC 122 ms
106,092 KB
testcase_11 AC 111 ms
106,716 KB
testcase_12 AC 99 ms
105,936 KB
testcase_13 AC 108 ms
105,452 KB
testcase_14 AC 95 ms
99,360 KB
testcase_15 AC 51 ms
66,460 KB
testcase_16 AC 108 ms
105,160 KB
testcase_17 AC 94 ms
104,036 KB
testcase_18 AC 89 ms
102,272 KB
testcase_19 AC 100 ms
103,848 KB
testcase_20 AC 131 ms
112,088 KB
testcase_21 AC 131 ms
111,832 KB
testcase_22 AC 129 ms
112,096 KB
testcase_23 AC 136 ms
111,836 KB
testcase_24 AC 131 ms
112,092 KB
testcase_25 AC 129 ms
112,088 KB
testcase_26 AC 131 ms
111,960 KB
testcase_27 AC 133 ms
112,096 KB
testcase_28 AC 133 ms
111,968 KB
testcase_29 AC 134 ms
111,828 KB
testcase_30 AC 130 ms
112,088 KB
testcase_31 AC 129 ms
112,092 KB
testcase_32 AC 134 ms
112,084 KB
testcase_33 AC 134 ms
112,092 KB
testcase_34 AC 134 ms
111,964 KB
testcase_35 AC 133 ms
112,096 KB
testcase_36 AC 130 ms
112,092 KB
testcase_37 AC 132 ms
112,096 KB
testcase_38 AC 130 ms
111,836 KB
testcase_39 AC 131 ms
112,092 KB
testcase_40 AC 132 ms
112,092 KB
testcase_41 AC 131 ms
111,840 KB
testcase_42 AC 131 ms
111,840 KB
testcase_43 AC 128 ms
111,836 KB
testcase_44 AC 125 ms
111,836 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N, M, K = map(int, input().split())
C = list(map(int, input().split()))
A = list(map(int, input().split()))
ans = min(A) * K
cnt = [0] * (M + 1)
for i in range(N):
    cnt[C[i]] += 1
    if i >= K:
        cnt[C[i-K]] -= 1
    ans = min(ans, (K - cnt[C[i]]) * A[C[i] - 1])

print(ans)
0