The editorial says the complexity is $$$O(M \log M \log N)$$$. I would think one part is from $$$O(M \log M)$$$ FFT, but I don't get the $$$\log N$$$ part. The editorial just says that each 'element' (aka a $$$dp'_{(A_i)}$$$) is 'involved' in at most $$$O(\log N)$$$ calls. I understand this claim, but I don't see how it helps. The only conclusion that comes to mind is that we're doing $$$O(\log N)$$$ FFTs, but that doesn't seem to be the case.
I would say there are roughly $$$\frac{n}{2} + \frac{n}{4} + \frac{n}{8} + \dots \approx n$$$ multiplications, so for me this would be $$$O(N M \log M)$$$.
Some time ago I also had this misconception in the complexity analysis in the editorial of a Codechef problem (you can also see the comments).
Basically, I want to know what I didn't understand, and why the complexity is actually $$$O(M \log M \log N)$$$.
PS: I made this blog because it seems there was no announcement (nor any discussion blog). Feel free to use it to discuss other problems too.