結果

問題 No.1870 Xor Matrix
ユーザー Navier_BoltzmannNavier_Boltzmann
提出日時 2024-01-04 23:19:02
言語 C++23
(gcc 12.3.0 + boost 1.83.0)
結果
AC  
実行時間 85 ms / 2,000 ms
コード長 1,018 bytes
コンパイル時間 9,448 ms
コンパイル使用メモリ 350,180 KB
実行使用メモリ 6,676 KB
最終ジャッジ日時 2024-01-04 23:19:16
合計ジャッジ時間 11,726 ms
ジャッジサーバーID
(参考情報)
judge11 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
6,676 KB
testcase_01 AC 2 ms
6,676 KB
testcase_02 AC 2 ms
6,676 KB
testcase_03 AC 50 ms
6,676 KB
testcase_04 AC 80 ms
6,676 KB
testcase_05 AC 50 ms
6,676 KB
testcase_06 AC 58 ms
6,676 KB
testcase_07 AC 69 ms
6,676 KB
testcase_08 AC 70 ms
6,676 KB
testcase_09 AC 43 ms
6,676 KB
testcase_10 AC 62 ms
6,676 KB
testcase_11 AC 67 ms
6,676 KB
testcase_12 AC 70 ms
6,676 KB
testcase_13 AC 41 ms
6,676 KB
testcase_14 AC 79 ms
6,676 KB
testcase_15 AC 39 ms
6,676 KB
testcase_16 AC 46 ms
6,676 KB
testcase_17 AC 85 ms
6,676 KB
testcase_18 AC 61 ms
6,676 KB
testcase_19 AC 73 ms
6,676 KB
testcase_20 AC 52 ms
6,676 KB
testcase_21 AC 33 ms
6,676 KB
testcase_22 AC 49 ms
6,676 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#pragma GCC target("avx2")
#pragma GCC optimize("O3")
#pragma GCC optimize("unroll-loops")
#include <bits/stdc++.h>
#include <atcoder/all>


using namespace std;
using namespace atcoder;
#define rep(i,m,n,k) for (int i = (int)(m); i < (int)(n); i += (int)(k))
#define rrep(i,m,n,k) for (int i = (int)(m); i > (int)(n); i += (int)(k))
#define ll long long
#define list(T,A,N) vector<T> A(N);for(int i=0;i<(int)(N);i++){cin >> A[i];}
template<typename T> bool chmin(T& a, T b){if(a > b){a = b; return true;} return false;}
template<typename T> bool chmax(T& a, T b){if(a < b){a = b; return true;} return false;}
using modint = modint998244353;
int main(){
    ll N,M;
    cin >> N >> M;
    list(ll,A,N);
    list(ll,B,M);
    ll ta=0;
    ll tb=0;
    for(auto a:A){
        ta ^= a;
    }
    for(auto b:B){
        tb ^= b;
    }
    if (ta!=tb){
        cout << 0 << endl;
        return 0;
    }
    ll L = 20*(N-1)*(M-1);
    ll ans = 1;
    ans = pow_mod(2,L,998244353);
    cout << ans << endl;
    return 0;

}
0