結果

問題 No.1082 XORのXOR
ユーザー koya_bot2koya_bot2
提出日時 2020-06-20 17:45:28
言語 C++17
(gcc 13.3.0 + boost 1.87.0)
結果
WA  
実行時間 -
コード長 384 bytes
コンパイル時間 675 ms
コンパイル使用メモリ 71,144 KB
最終ジャッジ日時 2025-01-11 08:45:55
ジャッジサーバーID
(参考情報)
judge1 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample WA * 3
other WA * 29
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
#include <vector>

using namespace std;
using vi = vector<int>;

int main()
{
    int N;
    cin >> N;
    vi A(N);
    for (int i = 0; i < N; ++i)
        cin >> A[i];
    
    int ans = -1;
    for (int i = 0; i < N; ++i)
    {
        for (int j = i + 1; j < N; ++j)
        {
            if (i ^ j > ans) ans = i ^ j;
        }
    }
    cout << ans << endl;
}
0