結果

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

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
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 94 ms
75,696 KB
testcase_11 AC 84 ms
75,844 KB
testcase_12 AC 85 ms
75,844 KB
testcase_13 AC 83 ms
75,796 KB
testcase_14 AC 90 ms
75,464 KB
testcase_15 AC 88 ms
76,000 KB
testcase_16 AC 82 ms
75,968 KB
testcase_17 AC 81 ms
75,888 KB
testcase_18 AC 84 ms
75,912 KB
testcase_19 AC 85 ms
76,852 KB
testcase_20 AC 87 ms
100,548 KB
testcase_21 AC 83 ms
100,620 KB
testcase_22 AC 72 ms
87,404 KB
testcase_23 AC 99 ms
101,864 KB
testcase_24 AC 95 ms
104,352 KB
testcase_25 AC 72 ms
93,936 KB
testcase_26 AC 62 ms
83,172 KB
testcase_27 AC 91 ms
100,320 KB
testcase_28 AC 89 ms
103,932 KB
testcase_29 AC 76 ms
96,068 KB
testcase_30 AC 90 ms
106,044 KB
testcase_31 AC 93 ms
107,028 KB
testcase_32 AC 99 ms
106,824 KB
testcase_33 AC 89 ms
106,040 KB
testcase_34 AC 98 ms
102,244 KB
testcase_35 AC 97 ms
106,568 KB
testcase_36 AC 93 ms
105,656 KB
testcase_37 AC 95 ms
106,704 KB
testcase_38 AC 91 ms
106,336 KB
testcase_39 AC 95 ms
106,896 KB
testcase_40 AC 104 ms
102,020 KB
testcase_41 AC 99 ms
102,332 KB
testcase_42 AC 101 ms
101,960 KB
testcase_43 AC 100 ms
102,232 KB
testcase_44 AC 101 ms
101,988 KB
testcase_45 AC 98 ms
102,092 KB
testcase_46 AC 101 ms
102,084 KB
testcase_47 AC 102 ms
102,056 KB
testcase_48 AC 101 ms
101,988 KB
testcase_49 AC 99 ms
102,168 KB
testcase_50 AC 100 ms
102,000 KB
testcase_51 AC 102 ms
102,248 KB
testcase_52 AC 100 ms
102,208 KB
testcase_53 AC 100 ms
102,184 KB
testcase_54 AC 100 ms
102,480 KB
testcase_55 AC 99 ms
102,052 KB
testcase_56 AC 99 ms
102,068 KB
testcase_57 AC 106 ms
102,336 KB
testcase_58 AC 101 ms
102,076 KB
testcase_59 AC 110 ms
102,404 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
    for i, h in enumerate(H):
        cnt[i % k] += 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
    print("Yes")


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