結果
問題 |
No.1870 Xor Matrix
|
ユーザー |
![]() |
提出日時 | 2022-03-12 14:10:48 |
言語 | C++23 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 78 ms / 2,000 ms |
コード長 | 319 bytes |
コンパイル時間 | 4,454 ms |
コンパイル使用メモリ | 307,288 KB |
実行使用メモリ | 6,944 KB |
最終ジャッジ日時 | 2024-09-16 20:46:56 |
合計ジャッジ時間 | 6,652 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 20 |
ソースコード
#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'; }