結果

問題 No.1870 Xor Matrix
コンテスト
ユーザー 👑 cologne
提出日時 2022-03-11 21:56:39
言語 C++23
(gcc 15.3.0 + boost 1.92.0 + ACL)
コンパイル:
g++-15 -O2 -lm -std=c++23 -Wuninitialized -DONLINE_JUDGE -o a.out _filename_
実行:
./a.out
結果
AC  
実行時間 50 ms / 2,000 ms
+ 340µs
コード長 388 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 1,949 ms
コンパイル使用メモリ 332,580 KB
実行使用メモリ 6,272 KB
最終ジャッジ日時 2026-08-28 09:56:00
合計ジャッジ時間 4,774 ms
ジャッジサーバーID
(参考情報)
judge3_0 / judge2_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 20
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

#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