結果

問題 No.1870 Xor Matrix
ユーザー 👑 colognecologne
提出日時 2022-03-11 21:56:39
言語 C++23(draft)
(gcc 13.2.0 + boost 1.83.0)
結果
AC  
実行時間 77 ms / 2,000 ms
コード長 388 bytes
コンパイル時間 2,648 ms
コンパイル使用メモリ 243,756 KB
実行使用メモリ 4,356 KB
最終ジャッジ日時 2023-10-14 07:04:13
合計ジャッジ時間 5,095 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

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

ソースコード

diff #

#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;
    else
        cout << 0 << endl;
}
0