結果
問題 |
No.1456 Range Xor
|
ユーザー |
|
提出日時 | 2024-06-20 16:26:48 |
言語 | Rust (1.83.0 + proconio) |
結果 |
WA
|
実行時間 | - |
コード長 | 404 bytes |
コンパイル時間 | 14,210 ms |
コンパイル使用メモリ | 402,948 KB |
実行使用メモリ | 6,944 KB |
最終ジャッジ日時 | 2024-06-20 16:27:05 |
合計ジャッジ時間 | 16,794 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 44 WA * 2 |
ソースコード
use std::{collections::HashSet, io::Read}; fn main() { let mut s = String::new(); std::io::stdin().read_to_string(&mut s).ok(); let v: Vec<usize> = s.split_whitespace().flat_map(str::parse).collect(); let mut h = HashSet::new(); let mut t = 0; for &a in &v[2..] { t ^= a; h.insert(t); } println!( "{}", if h.iter().any(|x| h.contains(&(x ^ v[1]))) { "Yes" } else { "No" } ) }