結果

問題 No.1870 Xor Matrix
ユーザー たたき@競プロたたき@競プロ
提出日時 2023-08-13 14:47:34
言語 C++23
(gcc 12.3.0 + boost 1.83.0)
結果
WA  
実行時間 -
コード長 649 bytes
コンパイル時間 6,020 ms
コンパイル使用メモリ 307,628 KB
実行使用メモリ 5,376 KB
最終ジャッジ日時 2024-05-01 07:43:36
合計ジャッジ時間 8,989 ms
ジャッジサーバーID
(参考情報)
judge2 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
5,248 KB
testcase_01 AC 2 ms
5,376 KB
testcase_02 AC 2 ms
5,376 KB
testcase_03 WA -
testcase_04 AC 82 ms
5,376 KB
testcase_05 WA -
testcase_06 AC 59 ms
5,376 KB
testcase_07 AC 70 ms
5,376 KB
testcase_08 WA -
testcase_09 AC 44 ms
5,376 KB
testcase_10 WA -
testcase_11 RE -
testcase_12 AC 70 ms
5,376 KB
testcase_13 AC 42 ms
5,376 KB
testcase_14 AC 81 ms
5,376 KB
testcase_15 RE -
testcase_16 RE -
testcase_17 AC 88 ms
5,376 KB
testcase_18 WA -
testcase_19 AC 74 ms
5,376 KB
testcase_20 AC 54 ms
5,376 KB
testcase_21 RE -
testcase_22 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

#include<bits/stdc++.h>
using namespace std;
#include <atcoder/all>
using namespace atcoder;
using mint=modint998244353; //1000000007;
using ll=long long;
using pp=pair<int,int>;
#define sr string 
#define vc vector
#define fi first
#define se second
#define rep(i,n) for(int i=0;i<(int)n;i++)
#define pb push_back
#define all(v) v.begin(),v.end()
#define pque priority_queue
#define bpc(a) __builtin_popcount(a)
int main(){
  int n,m;cin>>n>>m;
  vc<int>a(n),b(m); rep(i,n)cin>>a[i]; rep(i,m)cin>>b[i];
  int t=0; rep(i,n)t^=a[i]; rep(i,m)t^=b[i];
  if(t){
    cout<<0;
    return 0;
  }
  mint ans=mint(2).pow(20*(n-1)*(m-1));
  cout<<ans.val();
}
0