結果

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

ソースコード

diff #

#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;
#define NIL = -1;

using namespace std;

//#include "./lib/generic/search.h"

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