結果
問題 | No.1082 XORのXOR |
ユーザー |
![]() |
提出日時 | 2020-06-19 21:37:33 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 6 ms / 2,000 ms |
コード長 | 837 bytes |
コンパイル時間 | 1,589 ms |
コンパイル使用メモリ | 167,556 KB |
実行使用メモリ | 6,944 KB |
最終ジャッジ日時 | 2024-07-03 14:06:10 |
合計ジャッジ時間 | 2,541 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 29 |
ソースコード
#include<bits/stdc++.h> using namespace std; #define FOR(i,l,r) for(long long i=(l);i<(r);++i) #define REP(i,n) FOR(i,0,n) #define REPS(i,n) FOR(i,1,n+1) #define RFOR(i,l,r) for(long long i=(l);i>=(r);--i) #define RREP(i,n) RFOR(i,n-1,0) #define RREPS(i,n) RFOR(i,n,1) #define int long long #define mp make_pair #define pb push_back #define eb emplace_back #define SZ(x) ((int)(x).size()) #define all(x) (x).begin(),(x).end() #define rall(x) (x).rbegin(),(x).rend() template<class T> inline bool chmin(T& a, T b) {if (a > b) {a = b; return true; }return false; } template<class T> inline bool chmax(T& a, T b) {if (a < b) {a = b; return true; }return false; } const int INF = 1e18; int ans; signed main(){ int n; cin >> n; int a[n]; REP(i,n) cin >> a[i]; REP(i,n)REP(j,n) chmax(ans,a[i]^a[j]); cout << ans << '\n'; }