Problem F from CERC 15
I was trying to solve problem F from CERC 15. The problem was basically reduced to finding the sum . How can I find this sum in better than quadratic time without FFT?
Atcoder ABC #351 Short Solution Discussion