結果
問題 |
No.1082 XORのXOR
|
ユーザー |
![]() |
提出日時 | 2021-03-28 18:16:21 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 11 ms / 2,000 ms |
コード長 | 330 bytes |
コンパイル時間 | 2,740 ms |
コンパイル使用メモリ | 191,424 KB |
最終ジャッジ日時 | 2025-01-20 00:18:11 |
ジャッジサーバーID (参考情報) |
judge2 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 29 |
ソースコード
#include <bits/stdc++.h> using namespace std; typedef long long ll; #define rep(i,n) for(int i=0;i<n;i++) typedef pair<int,int>P; int main(){ int n; cin>>n; int a[n]; rep(i,n) cin>>a[i]; int maxans=0; rep(i,n) rep(j,n){ if(i==j) continue; maxans=max(maxans,a[i]^a[j]); } cout<<maxans<<endl; return 0; }