結果

問題 No.2860 Heal Slimes
ユーザー 👑 rin204rin204
提出日時 2024-08-25 15:56:43
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 610 bytes
コンパイル時間 261 ms
コンパイル使用メモリ 82,504 KB
実行使用メモリ 107,340 KB
最終ジャッジ日時 2024-08-25 15:56:55
合計ジャッジ時間 10,783 ms
ジャッジサーバーID
(参考情報)
judge5 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 WA -
testcase_02 WA -
testcase_03 WA -
testcase_04 WA -
testcase_05 WA -
testcase_06 WA -
testcase_07 WA -
testcase_08 WA -
testcase_09 WA -
testcase_10 AC 96 ms
75,748 KB
testcase_11 AC 96 ms
75,676 KB
testcase_12 AC 96 ms
75,668 KB
testcase_13 AC 98 ms
75,804 KB
testcase_14 AC 93 ms
75,660 KB
testcase_15 WA -
testcase_16 WA -
testcase_17 WA -
testcase_18 WA -
testcase_19 WA -
testcase_20 AC 99 ms
100,608 KB
testcase_21 AC 100 ms
100,508 KB
testcase_22 AC 78 ms
87,396 KB
testcase_23 AC 116 ms
101,968 KB
testcase_24 AC 103 ms
104,320 KB
testcase_25 AC 83 ms
93,648 KB
testcase_26 AC 70 ms
83,468 KB
testcase_27 AC 98 ms
100,820 KB
testcase_28 AC 100 ms
104,156 KB
testcase_29 AC 87 ms
95,844 KB
testcase_30 AC 106 ms
106,128 KB
testcase_31 AC 106 ms
107,340 KB
testcase_32 AC 105 ms
106,756 KB
testcase_33 AC 103 ms
106,240 KB
testcase_34 AC 113 ms
101,892 KB
testcase_35 AC 106 ms
106,572 KB
testcase_36 AC 100 ms
105,880 KB
testcase_37 AC 107 ms
106,492 KB
testcase_38 AC 103 ms
106,304 KB
testcase_39 AC 105 ms
106,584 KB
testcase_40 AC 112 ms
102,416 KB
testcase_41 AC 113 ms
101,992 KB
testcase_42 AC 112 ms
102,436 KB
testcase_43 AC 113 ms
102,396 KB
testcase_44 AC 113 ms
102,308 KB
testcase_45 AC 112 ms
102,324 KB
testcase_46 AC 113 ms
102,252 KB
testcase_47 AC 114 ms
102,316 KB
testcase_48 AC 113 ms
101,988 KB
testcase_49 AC 112 ms
102,052 KB
testcase_50 AC 114 ms
101,992 KB
testcase_51 AC 115 ms
102,164 KB
testcase_52 AC 120 ms
102,024 KB
testcase_53 AC 119 ms
102,360 KB
testcase_54 AC 114 ms
102,244 KB
testcase_55 AC 114 ms
102,024 KB
testcase_56 AC 115 ms
102,224 KB
testcase_57 AC 114 ms
102,328 KB
testcase_58 AC 115 ms
102,176 KB
testcase_59 AC 115 ms
102,408 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

def solve():
    n, k, x = map(int, input().split())
    H = list(map(int, input().split()))
    if len(set(h % x for h in H)) != 1:
        print("No")
        return

    cnt = [0] * k
    ma = max(H)
    for i, h in enumerate(H):
        cnt[i % k] += (ma - h) // x

    bef = cnt[: n % k]
    aft = cnt[n % k :]
    if bef and len(set(bef)) >= 2:
        print("No")
        return
    if aft and len(set(aft)) >= 2:
        print("No")
        return

    if bef and aft:
        if bef[0] < aft[0]:
            print("No")
            return

    print("Yes")


for _ in range(int(input())):
    solve()
0