FFT on 2200 rated div2 problem

Revision en5, by greateric, 2026-04-10 06:38:31

Think FFT doesn't matter? You're probably right I found an unintended extra speedup to a div 2 E that I thought was funny.

I was practicing and came across 2025E while practicing, a 2200 problem from an educational div2.

If you want, try the problem yourself. Then suppose $$$m = 1000, n = 1000$$$, and see if you can solve it in faster than cubic time.


This is my cubic solution (read this even if you've solved it yourself/seen the editorial since I thought of a slightly different way to do it)

Answer

Now for the fun part.

FFT
Tags fft

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en5 English greateric 2026-04-10 06:38:31 32 post (published)
en4 English greateric 2026-04-10 06:36:18 27 finish
en3 English greateric 2026-04-10 06:30:17 1394 write more
en2 English greateric 2026-04-10 06:17:13 2983 write stuff
en1 English greateric 2026-04-10 05:54:42 316 Initial revision (saved to drafts)