library_checker/math/
polynomial_taylor_shift.rs

1use competitive::prelude::*;
2#[doc(no_inline)]
3pub use competitive::{
4    math::Fps998244353, math::MemorizedFactorial, num::montgomery::MInt998244353,
5};
6
7#[verify::library_checker("polynomial_taylor_shift")]
8pub fn polynomial_taylor_shift(reader: impl Read, mut writer: impl Write) {
9    let s = read_all_unchecked(reader);
10    let mut scanner = Scanner::new(&s);
11    scan!(scanner, n, c: MInt998244353, a: [MInt998244353; n]);
12    let f = MemorizedFactorial::new(n);
13    let a = Fps998244353::from_vec(a);
14    let res = a.taylor_shift(c, &f);
15    iter_print!(writer, @it res);
16}