There is a question Chef and Numbers. According to Editorial it is purely based on FFT having overall time complexity $O(n * log(n))$. But after crawling other solution i found one of the solution which is Based on Dynamic programming. So the doubt is about it's time complexity which seems to be $O(n^2)$.
Can anyone tell me the full explanation about it's real complexity of that ACsolution?