結果
| 問題 | No.1082 XORのXOR | 
| コンテスト | |
| ユーザー |  | 
| 提出日時 | 2020-06-28 20:02:52 | 
| 言語 | Rust (1.83.0 + proconio) | 
| 結果 | 
                                AC
                                 
                             | 
| 実行時間 | 4 ms / 2,000 ms | 
| コード長 | 490 bytes | 
| コンパイル時間 | 12,914 ms | 
| コンパイル使用メモリ | 385,444 KB | 
| 実行使用メモリ | 6,944 KB | 
| 最終ジャッジ日時 | 2024-07-08 02:07:41 | 
| 合計ジャッジ時間 | 13,605 ms | 
| ジャッジサーバーID (参考情報) | judge1 / judge4 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 3 | 
| other | AC * 29 | 
ソースコード
use std::cmp::max;
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: usize = 0;
    for i in 0..n {
        for j in i..n {
            result = max(result, a[i] ^ a[j]);
        }
    }
    println!("{}", result);
}
            
            
            
        