結果

問題 No.1870 Xor Matrix
ユーザー kiyoshi0205kiyoshi0205
提出日時 2022-03-12 14:10:48
言語 C++23
(gcc 12.3.0 + boost 1.83.0)
結果
AC  
実行時間 76 ms / 2,000 ms
コード長 319 bytes
コンパイル時間 5,336 ms
コンパイル使用メモリ 304,180 KB
実行使用メモリ 4,352 KB
最終ジャッジ日時 2023-10-15 03:14:34
合計ジャッジ時間 7,867 ms
ジャッジサーバーID
(参考情報)
judge15 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
4,348 KB
testcase_01 AC 1 ms
4,348 KB
testcase_02 AC 2 ms
4,348 KB
testcase_03 AC 45 ms
4,348 KB
testcase_04 AC 72 ms
4,348 KB
testcase_05 AC 45 ms
4,348 KB
testcase_06 AC 53 ms
4,352 KB
testcase_07 AC 60 ms
4,352 KB
testcase_08 AC 64 ms
4,348 KB
testcase_09 AC 38 ms
4,348 KB
testcase_10 AC 54 ms
4,352 KB
testcase_11 AC 60 ms
4,348 KB
testcase_12 AC 63 ms
4,352 KB
testcase_13 AC 37 ms
4,352 KB
testcase_14 AC 71 ms
4,352 KB
testcase_15 AC 36 ms
4,348 KB
testcase_16 AC 42 ms
4,348 KB
testcase_17 AC 76 ms
4,348 KB
testcase_18 AC 55 ms
4,348 KB
testcase_19 AC 64 ms
4,352 KB
testcase_20 AC 49 ms
4,348 KB
testcase_21 AC 29 ms
4,348 KB
testcase_22 AC 43 ms
4,348 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include<atcoder/all>
#include<bits/stdc++.h>
using namespace std;
int N,M,A,x;
int main(){
  cin>>N>>M;
  for(int i=0;i<N;++i){
    cin>>x;
    A^=x;
  }
  for(int i=0;i<M;++i){
    cin>>x;
    A^=x;
  }
  if(A){
    puts("0");
    return 0;
  }
  cout<<atcoder::modint998244353(2).pow(20LL*(N-1)*(M-1)).val()<<'\n';
}
0