結果
問題 | No.1082 XORのXOR |
ユーザー |
![]() |
提出日時 | 2020-07-12 16:31:16 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 4 ms / 2,000 ms |
コード長 | 438 bytes |
コンパイル時間 | 1,553 ms |
コンパイル使用メモリ | 167,240 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-10-15 13:53:13 |
合計ジャッジ時間 | 2,856 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 29 |
ソースコード
#include <bits/stdc++.h>using ll = long long;using namespace std;int main(){cin.tie(nullptr);ios::sync_with_stdio(false);int n;scanf("%d", &n);vector<int> a(n);for (int i = 0; i < n; ++i)scanf("%d", &a[i]);int res{ 0 };for (int i =0; i < n-1; ++i){for (int j = i+1; j < n; ++j)res = max(res, a[i]^a[j]);}printf("%d\n", res);return 0;}