NTT is not working when module is big

Правка en1, от fractal, 2021-01-17 19:12:34

Hello, Codeforces users. I started to learn NTT (i already know FFT and can implement it). But my code is not working for 998244353, but it works well for smaller modules, like 7340033 and 65537.

Here is my code: https://paste.ubuntu.com/p/QdKYCPMx3F/

P stands for power of 2. For example: 998244353 = 119 * 2 ^ 23 + 1. R stand for primitive root.

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en2 Английский fractal 2021-01-17 19:35:03 373
en1 Английский fractal 2021-01-17 19:12:34 390 Initial revision (published)