結果
問題 | No.1456 Range Xor |
ユーザー |
![]() |
提出日時 | 2025-03-20 21:15:00 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 75 ms / 2,000 ms |
コード長 | 272 bytes |
コンパイル時間 | 307 ms |
コンパイル使用メモリ | 82,244 KB |
実行使用メモリ | 96,992 KB |
最終ジャッジ日時 | 2025-03-20 21:15:40 |
合計ジャッジ時間 | 4,899 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 46 |
ソースコード
n, k = map(int, input().split())a = list(map(int, input().split()))prefix_xor = 0seen = {0}found = Falsefor num in a:prefix_xor ^= numif (prefix_xor ^ k) in seen:found = Truebreakseen.add(prefix_xor)print("Yes" if found else "No")