結果
問題 | No.3066 Collecting Coins Speedrun 1 |
ユーザー |
![]() |
提出日時 | 2025-03-31 17:35:00 |
言語 | PyPy3 (7.3.15) |
結果 |
RE
|
実行時間 | - |
コード長 | 480 bytes |
コンパイル時間 | 222 ms |
コンパイル使用メモリ | 82,248 KB |
実行使用メモリ | 67,492 KB |
最終ジャッジ日時 | 2025-03-31 17:36:02 |
合計ジャッジ時間 | 3,754 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | RE * 2 |
other | RE * 32 |
ソースコード
n, k = map(int, input().split())a = [int(input()) for _ in range(n)]gaps = []# Handle the first gapprev = 0for num in a:gap_length = num - prev - 1if gap_length > 0:gaps.append(gap_length)prev = num# Handle the last gapgap_last = k - previf gap_last > 0:gaps.append(gap_last)xor_sum = 0for l in gaps:mod = l % 4if mod == 0 or mod == 1:xor_sum ^= 1else:xor_sum ^= 0print("Yes" if xor_sum != 0 else "No")