結果
| 問題 |
No.3066 Collecting Coins Speedrun 1
|
| コンテスト | |
| ユーザー |
lam6er
|
| 提出日時 | 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 gap
prev = 0
for num in a:
gap_length = num - prev - 1
if gap_length > 0:
gaps.append(gap_length)
prev = num
# Handle the last gap
gap_last = k - prev
if gap_last > 0:
gaps.append(gap_last)
xor_sum = 0
for l in gaps:
mod = l % 4
if mod == 0 or mod == 1:
xor_sum ^= 1
else:
xor_sum ^= 0
print("Yes" if xor_sum != 0 else "No")
lam6er