結果
問題 | No.1082 XORのXOR |
ユーザー |
|
提出日時 | 2022-11-22 11:34:54 |
言語 | Rust (1.83.0 + proconio) |
結果 |
AC
|
実行時間 | 4 ms / 2,000 ms |
コード長 | 469 bytes |
コンパイル時間 | 12,264 ms |
コンパイル使用メモリ | 401,824 KB |
実行使用メモリ | 6,948 KB |
最終ジャッジ日時 | 2024-09-22 21:01:39 |
合計ジャッジ時間 | 13,856 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 29 |
ソースコード
fn main() { let mut n = String::new(); std::io::stdin().read_line(&mut n).ok(); let n: usize = n.trim().parse().unwrap(); let mut a = String::new(); std::io::stdin().read_line(&mut a).ok(); let a: Vec<usize> = a.trim().split_whitespace().map(|s| s.parse().unwrap()).collect(); let mut result = 0usize; for i in 0..n { for j in i+1..n { result = result.max(a[i] ^ a[j]); } } println!("{}", result); }