結果
| 問題 | No.1082 XORのXOR | 
| コンテスト | |
| ユーザー |  poohbear | 
| 提出日時 | 2020-06-19 21:34:13 | 
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) | 
| 結果 | 
                                AC
                                 
                             | 
| 実行時間 | 8 ms / 2,000 ms | 
| コード長 | 650 bytes | 
| コンパイル時間 | 2,586 ms | 
| コンパイル使用メモリ | 193,192 KB | 
| 最終ジャッジ日時 | 2025-01-11 05:50:47 | 
| ジャッジサーバーID (参考情報) | judge2 / judge5 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 3 | 
| other | AC * 29 | 
ソースコード
#include <bits/stdc++.h>
#define rep(a,n) for (ll a = 0; a < (n); ++a)
using namespace std;
typedef long long ll;
typedef pair<ll,ll> P;
typedef pair<ll,P> PP;
typedef vector<vector<ll> > Graph;
template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return 1; } return 0; }
template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return 1; } return 0; }
const ll INF = 1e18;
int main(){
    ll n;
    cin >> n;
    vector<ll>a(n);
    rep(i,n)cin>>a[i];
    ll ans = 0;
    rep(i,n){
        rep(j,n){
            ll now = a[i]^a[j];
            chmax(ans,now);
        }
    }
    cout << ans << endl;
    return 0;
}
            
            
            
        