結果

問題 No.1082 XORのXOR
ユーザー syomu
提出日時 2020-06-20 01:16:05
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 8 ms / 2,000 ms
コード長 729 bytes
コンパイル時間 1,462 ms
コンパイル使用メモリ 167,728 KB
実行使用メモリ 6,944 KB
最終ジャッジ日時 2024-07-03 16:27:30
合計ジャッジ時間 2,531 ms
ジャッジサーバーID
(参考情報)
judge4 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 29
権限があれば一括ダウンロードができます

ソースコード

diff #

/********************************************************************
* @brief https://yukicoder.me/problems/no/1082
* @date 2020/06/19
*********************************************************************/

#include <bits/stdc++.h> //全てのヘッダファイルをインクルード

//ループ
#define rep(i, n) for(int i = 0; i < n; i++) //普通のループ
#define repr(i, n) for(int i = n; i >= 0; i--) //逆ループ

//型名省略
typedef long long ll;
//値
static const ll MX = 1e18;

using namespace std;

int main(){
    int n;
    cin >> n;
    int a[n], x=0;
    rep(i, n){
        cin >> a[i];
    }
    rep(i, n){
        rep(j, n){
            x = max(x, a[i]^a[j]);
        }
    }
    cout << x << endl;
}
0