Ex - Odd Sum Editorial by spheniscine


You may have trouble getting your implementation from the official editorial to pass if you use a slower language or have a slower FFT implementation.

However, you can decrease the number of double-polynomials you need to “multiply” to at most \(10\) by pre-combining the double-polynomial for equal values of \(A_i\) using binomial coefficients. This experimentally improves my solution’s speed by a factor of over \(3.3\times\).

posted:
last update: