For offline practice can persist a dynamic FFT of the IDER

moment

In line with the attitude of do not want to drain the idea to write this blog.

This question is to see the following:

对于两个长度为n(最高项为n-1)的多项式A,B,求出相乘后的C的DFT数组

有m次修改:
第i次操作有三个整数:a,b,c
表示用第a个时间点修改第b位为c
然后输出C的DFT数组
1<=n<=m<=1000
数组大小控制在500000以内

In fact, very simple, green thinking questions, FFT is actually put on the purple title bar.

For the FFT process is a nlogn array.

Change a digital slowly up together, then the fact is: \ (1 + 2 + 4 + 8 + ... + the n-\)

In fact, that is \ (the n-\) , so the complexity of the modifications is \ (O (n) \) , and then be persistent memory card?

So because it is not by force, but we need to be persistent tree built out of time, then DFS on the line.

Because each point can be assigned back to his father realized again, then back only once, so that \ (O (nm) \) .

And water a blog QAQ, is ZFY, ZWQ spray SB questions, evidently can only take a sick Young.

Guess you like

Origin www.cnblogs.com/zhangjianjunab/p/12048696.html
FFT