結果
| 問題 |
No.130 XOR Minimax
|
| コンテスト | |
| ユーザー |
ふーらくたる
|
| 提出日時 | 2017-10-07 12:16:03 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 338 bytes |
| コンパイル時間 | 660 ms |
| コンパイル使用メモリ | 64,552 KB |
| 実行使用メモリ | 5,248 KB |
| 最終ジャッジ日時 | 2024-11-17 04:25:02 |
| 合計ジャッジ時間 | 2,064 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 4 WA * 17 |
ソースコード
#include <iostream>
#include <vector>
#include <algorithm>
using namespace std;
#define int long long
signed 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;
}
ふーらくたる