結果
| 問題 | No.1082 XORのXOR | 
| コンテスト | |
| ユーザー |  | 
| 提出日時 | 2020-06-19 22:03:36 | 
| 言語 | Rust (1.83.0 + proconio) | 
| 結果 | 
                                AC
                                 
                             | 
| 実行時間 | 3 ms / 2,000 ms | 
| コード長 | 500 bytes | 
| コンパイル時間 | 21,828 ms | 
| コンパイル使用メモリ | 383,276 KB | 
| 実行使用メモリ | 6,948 KB | 
| 最終ジャッジ日時 | 2024-07-03 14:40:34 | 
| 合計ジャッジ時間 | 13,515 ms | 
| ジャッジサーバーID (参考情報) | judge3 / judge2 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 3 | 
| other | AC * 29 | 
ソースコード
use std::cmp::*;
use std::io::*;
fn main() {
    let mut s: String = String::new();
    std::io::stdin().read_to_string(&mut s).ok();
    let mut itr = s.trim().split_whitespace();
    let n: usize = itr.next().unwrap().parse().unwrap();
    let a: Vec<usize> = (0..n)
        .map(|_| itr.next().unwrap().parse().unwrap())
        .collect();
    let mut ans = 0;
    for i in 0..n {
        for j in i + 1..n {
            ans = max(ans, a[i] ^ a[j]);
        }
    }
    println!("{}", ans);
}
            
            
            
        