結果
問題 | No.2860 Heal Slimes |
ユーザー | 👑 rin204 |
提出日時 | 2024-08-25 15:57:53 |
言語 | PyPy3 (7.3.15) |
結果 |
WA
|
実行時間 | - |
コード長 | 610 bytes |
コンパイル時間 | 203 ms |
コンパイル使用メモリ | 82,496 KB |
実行使用メモリ | 107,232 KB |
最終ジャッジ日時 | 2024-08-25 15:58:04 |
合計ジャッジ時間 | 10,185 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
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 | 87 ms
75,884 KB |
testcase_11 | AC | 89 ms
75,644 KB |
testcase_12 | AC | 86 ms
76,112 KB |
testcase_13 | AC | 83 ms
75,616 KB |
testcase_14 | AC | 83 ms
75,864 KB |
testcase_15 | AC | 89 ms
75,912 KB |
testcase_16 | AC | 92 ms
75,588 KB |
testcase_17 | AC | 93 ms
75,744 KB |
testcase_18 | AC | 90 ms
75,924 KB |
testcase_19 | AC | 91 ms
76,284 KB |
testcase_20 | AC | 87 ms
100,328 KB |
testcase_21 | AC | 84 ms
100,728 KB |
testcase_22 | AC | 72 ms
86,100 KB |
testcase_23 | AC | 106 ms
102,212 KB |
testcase_24 | AC | 90 ms
104,308 KB |
testcase_25 | AC | 75 ms
94,056 KB |
testcase_26 | AC | 67 ms
84,128 KB |
testcase_27 | AC | 95 ms
100,636 KB |
testcase_28 | AC | 98 ms
104,316 KB |
testcase_29 | AC | 81 ms
96,324 KB |
testcase_30 | AC | 94 ms
106,148 KB |
testcase_31 | AC | 98 ms
107,232 KB |
testcase_32 | AC | 105 ms
107,172 KB |
testcase_33 | AC | 95 ms
106,100 KB |
testcase_34 | AC | 102 ms
101,884 KB |
testcase_35 | AC | 100 ms
106,760 KB |
testcase_36 | AC | 98 ms
105,812 KB |
testcase_37 | AC | 100 ms
106,720 KB |
testcase_38 | AC | 95 ms
106,364 KB |
testcase_39 | AC | 96 ms
106,348 KB |
testcase_40 | AC | 102 ms
101,996 KB |
testcase_41 | AC | 102 ms
102,152 KB |
testcase_42 | AC | 102 ms
101,944 KB |
testcase_43 | AC | 103 ms
102,356 KB |
testcase_44 | AC | 109 ms
102,160 KB |
testcase_45 | AC | 103 ms
102,156 KB |
testcase_46 | AC | 101 ms
101,944 KB |
testcase_47 | AC | 102 ms
102,392 KB |
testcase_48 | AC | 102 ms
102,156 KB |
testcase_49 | AC | 100 ms
102,592 KB |
testcase_50 | AC | 103 ms
102,280 KB |
testcase_51 | AC | 107 ms
101,976 KB |
testcase_52 | AC | 108 ms
102,160 KB |
testcase_53 | AC | 107 ms
101,992 KB |
testcase_54 | AC | 105 ms
101,924 KB |
testcase_55 | AC | 103 ms
102,368 KB |
testcase_56 | AC | 108 ms
102,060 KB |
testcase_57 | AC | 104 ms
102,100 KB |
testcase_58 | AC | 102 ms
102,076 KB |
testcase_59 | AC | 101 ms
102,224 KB |
ソースコード
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()