結果

問題 No.2658 L-R Nim
ユーザー SnowBeenDidingSnowBeenDiding
提出日時 2024-03-01 22:47:45
言語 C++23
(gcc 12.3.0 + boost 1.83.0)
結果
WA  
実行時間 -
コード長 1,042 bytes
コンパイル時間 5,625 ms
コンパイル使用メモリ 315,300 KB
実行使用メモリ 6,676 KB
最終ジャッジ日時 2024-03-01 22:47:54
合計ジャッジ時間 8,732 ms
ジャッジサーバーID
(参考情報)
judge13 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
6,676 KB
testcase_01 AC 1 ms
6,676 KB
testcase_02 AC 2 ms
6,676 KB
testcase_03 AC 2 ms
6,676 KB
testcase_04 AC 2 ms
6,676 KB
testcase_05 WA -
testcase_06 AC 8 ms
6,676 KB
testcase_07 WA -
testcase_08 WA -
testcase_09 AC 8 ms
6,676 KB
testcase_10 AC 8 ms
6,676 KB
testcase_11 WA -
testcase_12 AC 8 ms
6,676 KB
testcase_13 AC 8 ms
6,676 KB
testcase_14 AC 8 ms
6,676 KB
testcase_15 WA -
testcase_16 AC 8 ms
6,676 KB
testcase_17 AC 8 ms
6,676 KB
testcase_18 WA -
testcase_19 AC 8 ms
6,676 KB
testcase_20 WA -
testcase_21 AC 8 ms
6,676 KB
testcase_22 AC 8 ms
6,676 KB
testcase_23 WA -
testcase_24 WA -
testcase_25 AC 47 ms
6,676 KB
testcase_26 AC 48 ms
6,676 KB
testcase_27 AC 49 ms
6,676 KB
testcase_28 AC 48 ms
6,676 KB
testcase_29 AC 49 ms
6,676 KB
testcase_30 AC 48 ms
6,676 KB
testcase_31 AC 49 ms
6,676 KB
testcase_32 AC 48 ms
6,676 KB
testcase_33 AC 28 ms
6,676 KB
testcase_34 AC 42 ms
6,676 KB
testcase_35 WA -
testcase_36 AC 48 ms
6,676 KB
testcase_37 AC 33 ms
6,676 KB
testcase_38 WA -
testcase_39 WA -
testcase_40 WA -
testcase_41 WA -
testcase_42 WA -
testcase_43 WA -
testcase_44 WA -
testcase_45 WA -
testcase_46 WA -
testcase_47 WA -
testcase_48 WA -
testcase_49 AC 48 ms
6,676 KB
testcase_50 AC 48 ms
6,676 KB
testcase_51 WA -
testcase_52 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>

#include <atcoder/all>
#define rep(i, a, b) for (ll i = (ll)(a); i < (ll)(b); i++)
using namespace std;
using namespace atcoder;

typedef long long ll;

int op(int a, int b) { return a ^ b; }
int e() { return 0; }

int main() {
    int n, k;
    cin >> n >> k;
    vector<int> a(n);
    rep(i, 0, n) cin >> a[i];
    map<int, int> ma;
    int x = 0;
    ma[0]++;
    rep(i, 0, n) {
        x ^= a[i];
        ma[x]++;
    }
    x = 0;
    int ct = 0;
    rep(i, 0, n) {
        ma[x]--;
        ct += ma[x];
        x ^= a[i];
    }
    cerr << ct << endl;
    if (ct >= 2) {
        cout << "No" << endl;
        return 0;
    } else {
        cout << "Yes" << endl;
    }

    // segtree<int, op, e> st(a);
    // int seg = 0;
    // int l = 0;
    // int ni = 0;
    // rep(i, 0, n) {
    //     if (st.prod(ni, i + 1) == 0) {
    //         seg++;
    //         ni = i + 1;
    //     }
    // }
    // cerr << seg << endl;
    // if (seg > 1) {
    //     cout << "No" << endl;
    //     return 0;
    // }
}
0