結果

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

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 AC 41 ms
62,236 KB
testcase_02 WA -
testcase_03 AC 43 ms
62,368 KB
testcase_04 AC 42 ms
62,228 KB
testcase_05 AC 36 ms
53,460 KB
testcase_06 WA -
testcase_07 AC 46 ms
64,468 KB
testcase_08 AC 35 ms
53,460 KB
testcase_09 AC 43 ms
62,344 KB
testcase_10 AC 182 ms
118,544 KB
testcase_11 AC 158 ms
119,168 KB
testcase_12 WA -
testcase_13 WA -
testcase_14 AC 113 ms
99,776 KB
testcase_15 AC 72 ms
76,944 KB
testcase_16 AC 174 ms
111,408 KB
testcase_17 AC 120 ms
93,784 KB
testcase_18 AC 110 ms
91,840 KB
testcase_19 AC 141 ms
105,008 KB
testcase_20 WA -
testcase_21 AC 227 ms
121,472 KB
testcase_22 AC 221 ms
120,580 KB
testcase_23 AC 203 ms
120,452 KB
testcase_24 WA -
testcase_25 WA -
testcase_26 AC 203 ms
118,784 KB
testcase_27 AC 237 ms
120,580 KB
testcase_28 AC 232 ms
120,456 KB
testcase_29 AC 206 ms
120,452 KB
testcase_30 WA -
testcase_31 WA -
testcase_32 AC 226 ms
120,584 KB
testcase_33 AC 203 ms
120,580 KB
testcase_34 AC 226 ms
121,604 KB
testcase_35 WA -
testcase_36 WA -
testcase_37 AC 225 ms
120,580 KB
testcase_38 WA -
testcase_39 WA -
testcase_40 AC 194 ms
121,732 KB
testcase_41 AC 241 ms
120,324 KB
testcase_42 AC 191 ms
121,476 KB
testcase_43 WA -
testcase_44 WA -
権限があれば一括ダウンロードができます

ソースコード

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