結果

問題 No.2272 多項式乗算 mod 258280327
ユーザー tsugutsugu
提出日時 2023-04-14 22:30:54
言語 C++23
(gcc 13.3.0 + boost 1.87.0)
結果
RE  
実行時間 -
コード長 673 bytes
コンパイル時間 5,230 ms
コンパイル使用メモリ 316,908 KB
実行使用メモリ 6,824 KB
最終ジャッジ日時 2024-10-10 13:26:14
合計ジャッジ時間 10,265 ms
ジャッジサーバーID
(参考情報)
judge5 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 7 RE * 26
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
#include <atcoder/all>
using namespace std;
using namespace atcoder;
const long long mod = 258280327;
int main() {
    ios::sync_with_stdio(false);
    cin.tie(nullptr);
    int n;
    cin >> n;
    vector<long long> a(n + 1);
    for (int i = 0; i < n + 1; i++) {
        cin >> a[i];
        a[i] %= mod;
    }
    int m;
    cin >> m;
    vector<long long> b(m + 1);
    for (int i = 0; i < m + 1; i++) {
        cin >> b[i];
        b[i] %= mod;
    }
    auto c = convolution<(long long) 258280327>(a, b);
    cout << n + m << '\n';
    for (int i = 0; i < (int) c.size(); i++) {
        cout << c[i] << " \n"[i + 1 == (int) c.size()];
    }
}
0