This documentation is automatically generated by competitive-verifier/competitive-verifier
// @brief Convolution on the Multiplicative Monoid of $\mathbb Z/p\mathbb{Z}$
#define PROBLEM "https://judge.yosupo.jp/problem/mul_modp_convolution"
#pragma GCC optimize("O3,unroll-loops")
#pragma GCC target("avx2")
#define CP_ALGO_CHECKPOINT
#include <bits/stdc++.h>
//#include "blazingio/blazingio.min.hpp"
#include "cp-algo/number_theory/euler.hpp"
#include "cp-algo/math/fft.hpp"
using namespace std;
using base = cp_algo::math::modint<998244353>;
void solve() {
int p;
cin >> p;
auto g = cp_algo::math::primitive_root(p);
cp_algo::big_vector<int> lg(p);
int64_t cur = 1;
for(int i = 0; i < p - 1; i++) {
lg[cur] = i;
cur *= g;
cur %= p;
}
cp_algo::checkpoint("find lg");
base a0, b0, as = 0, bs = 0;
cp_algo::big_vector<base> a(p-1), b(p-1);
cin >> a0;
for(int i = 1; i <= p - 1; i++) {
cin >> a[lg[i]];
as += a[lg[i]];
}
cin >> b0;
for(int i = 1; i <= p - 1; i++) {
cin >> b[lg[i]];
bs += b[lg[i]];
}
cp_algo::checkpoint("read");
base c0 = (a0 + as) * (b0 + bs) - as * bs;
cout << c0 << " ";
cp_algo::math::fft::mul(a, b);
for(size_t i = p-1; i < size(a); i++) {
a[i - (p-1)] += a[i];
}
for(int i = 1; i <= p - 1; i++) {
cout << a[lg[i]] << " ";
}
cp_algo::checkpoint("write");
cp_algo::checkpoint<1>();
}
signed main() {
//freopen("input.txt", "r", stdin);
ios::sync_with_stdio(0);
cin.tie(0);
solve();
}
Traceback (most recent call last):
File "/home/runner/.local/lib/python3.12/site-packages/competitive_verifier/oj_resolve/resolver.py", line 181, in resolve
bundled_code = language.bundle(path, basedir=basedir)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/runner/.local/lib/python3.12/site-packages/competitive_verifier/oj/verify/languages/cplusplus.py", line 252, in bundle
bundler.update(path)
File "/home/runner/.local/lib/python3.12/site-packages/competitive_verifier/oj/verify/languages/cplusplus_bundle.py", line 327, in update
assert len(lines) == len(uncommented_lines)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AssertionError
| Env | Name | Status | Elapsed | Memory |
|---|---|---|---|---|
| g++ | all_zero_00 |
|
4 ms | 4 MB |
| g++ | all_zero_01 |
|
4 ms | 4 MB |
| g++ | all_zero_02 |
|
4 ms | 4 MB |
| g++ | all_zero_03 |
|
4 ms | 4 MB |
| g++ | example_00 |
|
4 ms | 4 MB |
| g++ | example_01 |
|
4 ms | 4 MB |
| g++ | large_00 |
|
7 ms | 5 MB |
| g++ | large_01 |
|
11 ms | 6 MB |
| g++ | large_02 |
|
19 ms | 9 MB |
| g++ | large_03 |
|
34 ms | 14 MB |
| g++ | large_04 |
|
56 ms | 24 MB |
| g++ | large_05 |
|
130 ms | 47 MB |
| g++ | medium_00 |
|
5 ms | 4 MB |
| g++ | medium_01 |
|
4 ms | 4 MB |
| g++ | medium_02 |
|
4 ms | 4 MB |
| g++ | medium_03 |
|
4 ms | 4 MB |
| g++ | medium_04 |
|
4 ms | 4 MB |
| g++ | medium_05 |
|
4 ms | 4 MB |
| g++ | medium_06 |
|
4 ms | 4 MB |
| g++ | medium_07 |
|
4 ms | 4 MB |
| g++ | medium_08 |
|
5 ms | 4 MB |
| g++ | medium_09 |
|
5 ms | 4 MB |
| g++ | medium_10 |
|
6 ms | 4 MB |
| g++ | medium_11 |
|
5 ms | 4 MB |
| g++ | p_max_00 |
|
124 ms | 47 MB |
| g++ | p_max_01 |
|
127 ms | 47 MB |
| g++ | p_max_02 |
|
131 ms | 47 MB |
| g++ | p_max_03 |
|
125 ms | 47 MB |
| g++ | small_00 |
|
4 ms | 4 MB |
| g++ | small_01 |
|
4 ms | 4 MB |
| g++ | small_02 |
|
4 ms | 4 MB |
| g++ | small_03 |
|
4 ms | 4 MB |
| g++ | small_04 |
|
4 ms | 4 MB |
| g++ | small_05 |
|
4 ms | 4 MB |
| g++ | small_06 |
|
4 ms | 4 MB |
| g++ | small_07 |
|
4 ms | 4 MB |
| g++ | small_08 |
|
4 ms | 4 MB |
| g++ | small_09 |
|
4 ms | 4 MB |
| g++ | small_10 |
|
4 ms | 4 MB |
| g++ | small_11 |
|
4 ms | 4 MB |