library_checker/math/
convolution_mod_1000000007.rs1use competitive::prelude::*;
2#[doc(no_inline)]
3pub use competitive::{
4 math::{Convolve, ConvolveSteps, MIntConvolve},
5 num::mint_basic::{MInt1000000007, Modulo1000000007},
6};
7
8#[verify::library_checker("convolution_mod_1000000007")]
9pub fn convolution_mod_1000000007(reader: impl Read, mut writer: impl Write) {
10 let s = read_all_unchecked(reader);
11 let mut scanner = Scanner::new(&s);
12 type M = MInt1000000007;
13 scan!(scanner, n, m, a: [M; n], b: [M; m]);
14 let c = MIntConvolve::<Modulo1000000007>::convolve(a, b);
15 iter_print!(writer, @it c);
16}