Solving 2200 rated div2 problem with FFT

Правка en3, от greateric, 2026-04-10 06:30:17

Think FFT doesn't matter? You're probably right It's an unintended extra speedup to a div 2 E!

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 time
Теги fft

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en5 Английский greateric 2026-04-10 06:38:31 32 post (published)
en4 Английский greateric 2026-04-10 06:36:18 27 finish
en3 Английский greateric 2026-04-10 06:30:17 1394 write more
en2 Английский greateric 2026-04-10 06:17:13 2983 write stuff
en1 Английский greateric 2026-04-10 05:54:42 316 Initial revision (saved to drafts)