結果
問題 | No.1082 XORのXOR |
ユーザー |
![]() |
提出日時 | 2020-06-25 23:51:50 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 4 ms / 2,000 ms |
コード長 | 1,288 bytes |
コンパイル時間 | 853 ms |
コンパイル使用メモリ | 85,884 KB |
実行使用メモリ | 5,376 KB |
最終ジャッジ日時 | 2024-07-03 21:58:14 |
合計ジャッジ時間 | 1,891 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 29 |
ソースコード
#include <iostream>#include <cmath>#include <string>#include <vector>#include <map>#include <algorithm>#include <queue>#include <stack>#include <list>#include <deque>#include <set>using namespace std;using ll = long long;using ld = long double;const ll MOD = 1000000000 + 7;const ll INF = 1e+9;const ld PI = acos((long double)(-1));#define no "no"#define No "No"#define NO "NO"#define yes "yes"#define Yes "Yes"#define YES "YES"#define next '\n'#define sp " "#define print(x) cout << (x) << endl;#define rep(i, n) for(int (i) = (0); (i) < (n); (++i))#define FOR(i, start, end) for(int (i) = (start); (i) < (end); (++i))#define foreach(elem, _list) for(auto& (elem) : (_list))#define view(_list) foreach(e, _list){ cout << e << sp; } cout << next#define FAST ios::sync_with_stdio(false); cin.tie(nullptr)#define size(s) (s).size()#define ALL(vec) (vec).begin(), (vec).end()#define pb(e) push_back(e)#define eb(e) emplace_back(e)#define EPS 0.00000001int main() {FAST;int n;cin >> n;vector<ll> vll(n);rep(i, n){cin >> vll[i];}ll ans = 0;for(int i = 0; i < n - 1; ++i){for(int j = i + 1; j < n; ++j){ans = std::max(ans, vll[i] xor vll[j]);}}print(ans);}