結果

問題 No.130 XOR Minimax
ユーザー ふーらくたる
提出日時 2017-10-07 12:13:33
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
WA  
実行時間 -
コード長 312 bytes
コンパイル時間 677 ms
コンパイル使用メモリ 64,456 KB
実行使用メモリ 5,248 KB
最終ジャッジ日時 2024-11-17 04:24:55
合計ジャッジ時間 2,110 ms
ジャッジサーバーID
(参考情報)
judge2 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 4 WA * 17
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
#include <vector>
#include <algorithm>
using namespace std;

int main() {
 int n; cin >> n;
 vector<int> a(n);
 for (int i = 0; i < n; i++) cin >> a[i];
 
 sort(a.begin(), a.end());

 int ans = 0;
 for (int i = 0; i < n; i++) ans =max(ans, a[i] ^ a[0]);

 cout << ans << endl;

 return 0;
}
 
0