結果
問題 | No.1870 Xor Matrix |
ユーザー |
|
提出日時 | 2022-03-11 21:56:39 |
言語 | C++23 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 85 ms / 2,000 ms |
コード長 | 388 bytes |
コンパイル時間 | 2,672 ms |
コンパイル使用メモリ | 246,824 KB |
実行使用メモリ | 5,376 KB |
最終ジャッジ日時 | 2024-09-16 02:10:06 |
合計ジャッジ時間 | 4,940 ms |
ジャッジサーバーID (参考情報) |
judge6 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 20 |
ソースコード
#include <bits/stdc++.h>#include <atcoder/modint>using namespace std;using Mint = atcoder::modint998244353;int main(){int N, M;cin >> N >> M;int r = 0;for (int i = 0; i < N + M; ++i){int t;cin >> t;r ^= t;}if (!r)cout << Mint(2).pow(20LL * (N - 1) * (M - 1)).val() << endl;elsecout << 0 << endl;}