結果

問題 No.1870 Xor Matrix
ユーザー kiyoshi0205kiyoshi0205
提出日時 2022-03-12 14:09:01
言語 C++23
(gcc 12.3.0 + boost 1.83.0)
結果
WA  
実行時間 -
コード長 316 bytes
コンパイル時間 5,637 ms
コンパイル使用メモリ 304,332 KB
実行使用メモリ 4,480 KB
最終ジャッジ日時 2023-10-15 03:12:08
合計ジャッジ時間 8,105 ms
ジャッジサーバーID
(参考情報)
judge15 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1 ms
4,352 KB
testcase_01 AC 2 ms
4,352 KB
testcase_02 WA -
testcase_03 WA -
testcase_04 AC 72 ms
4,348 KB
testcase_05 WA -
testcase_06 AC 52 ms
4,348 KB
testcase_07 AC 62 ms
4,348 KB
testcase_08 WA -
testcase_09 AC 39 ms
4,348 KB
testcase_10 WA -
testcase_11 WA -
testcase_12 AC 64 ms
4,352 KB
testcase_13 AC 36 ms
4,352 KB
testcase_14 AC 71 ms
4,352 KB
testcase_15 WA -
testcase_16 WA -
testcase_17 AC 77 ms
4,352 KB
testcase_18 WA -
testcase_19 AC 66 ms
4,348 KB
testcase_20 AC 49 ms
4,348 KB
testcase_21 WA -
testcase_22 WA -
権限があれば一括ダウンロードができます

ソースコード

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((N-1LL)*(M-1)).val()<<'\n';
}
0