結果
問題 | No.1082 XORのXOR |
ユーザー |
![]() |
提出日時 | 2020-06-19 21:44:37 |
言語 | Rust (1.83.0 + proconio) |
結果 |
AC
|
実行時間 | 4 ms / 2,000 ms |
コード長 | 557 bytes |
コンパイル時間 | 11,659 ms |
コンパイル使用メモリ | 404,500 KB |
実行使用メモリ | 6,944 KB |
最終ジャッジ日時 | 2024-07-03 14:12:32 |
合計ジャッジ時間 | 12,903 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 29 |
ソースコード
fn main() {let n: usize = {let mut buf = String::new();std::io::stdin().read_line(&mut buf).unwrap();buf.trim_end().parse().unwrap()};let a: Vec<usize> = {let mut buf = String::new();std::io::stdin().read_line(&mut buf).unwrap();let iter = buf.split_whitespace();iter.map(|x| x.parse().unwrap()).collect()};let mut ans = 0;for i in 0..n {for j in (i + 1)..n {ans = std::cmp::max(ans, a[i] ^ a[j]);}}println!("{}", ans);}