結果

問題 No.2549 Paint Eggs
ユーザー KudeKude
提出日時 2023-11-25 13:12:58
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 253 ms / 2,000 ms
コード長 413 bytes
コンパイル時間 487 ms
コンパイル使用メモリ 81,700 KB
実行使用メモリ 121,340 KB
最終ジャッジ日時 2023-11-25 13:13:10
合計ジャッジ時間 10,636 ms
ジャッジサーバーID
(参考情報)
judge15 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 43 ms
60,020 KB
testcase_01 AC 44 ms
62,232 KB
testcase_02 AC 43 ms
60,020 KB
testcase_03 AC 46 ms
62,356 KB
testcase_04 AC 47 ms
62,224 KB
testcase_05 AC 39 ms
53,460 KB
testcase_06 AC 47 ms
62,228 KB
testcase_07 AC 49 ms
64,460 KB
testcase_08 AC 38 ms
53,460 KB
testcase_09 AC 48 ms
62,344 KB
testcase_10 AC 204 ms
118,544 KB
testcase_11 AC 162 ms
119,036 KB
testcase_12 AC 195 ms
104,852 KB
testcase_13 AC 208 ms
114,240 KB
testcase_14 AC 120 ms
99,776 KB
testcase_15 AC 78 ms
76,936 KB
testcase_16 AC 194 ms
111,396 KB
testcase_17 AC 123 ms
93,656 KB
testcase_18 AC 115 ms
91,712 KB
testcase_19 AC 149 ms
105,004 KB
testcase_20 AC 249 ms
120,444 KB
testcase_21 AC 229 ms
121,340 KB
testcase_22 AC 240 ms
120,440 KB
testcase_23 AC 248 ms
120,316 KB
testcase_24 AC 253 ms
120,444 KB
testcase_25 AC 227 ms
120,444 KB
testcase_26 AC 235 ms
118,652 KB
testcase_27 AC 223 ms
120,444 KB
testcase_28 AC 223 ms
120,316 KB
testcase_29 AC 228 ms
120,192 KB
testcase_30 AC 237 ms
120,444 KB
testcase_31 AC 236 ms
120,448 KB
testcase_32 AC 228 ms
120,440 KB
testcase_33 AC 225 ms
120,448 KB
testcase_34 AC 223 ms
120,192 KB
testcase_35 AC 234 ms
120,444 KB
testcase_36 AC 224 ms
120,444 KB
testcase_37 AC 225 ms
120,448 KB
testcase_38 AC 226 ms
120,192 KB
testcase_39 AC 234 ms
120,444 KB
testcase_40 AC 232 ms
120,444 KB
testcase_41 AC 222 ms
120,316 KB
testcase_42 AC 216 ms
120,180 KB
testcase_43 AC 244 ms
120,192 KB
testcase_44 AC 221 ms
120,192 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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):
    ans = min(ans, x * k)
    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)
0