[Help] Doubt Regarding Using Mo's Algorithm for 86D

Правка en1, от Vicennial, 2016-10-24 21:18:22

86D - Мощный массив

I tried implementing Mo's Algorithm to solve this problem but I ran into a couple of TLE's when taking block size as sqrt(Max N) which is 448.
The submission can be viewed here-21756475 The result was TLE when using block size=448.
In the next submission-21756591 , I put block size=1000 and the result was AC.

So my question is how do I figure out what value to use as my block size?

Теги 86d, mo algorithm, time limit exceeded

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en2 Английский Vicennial 2016-10-24 21:19:15 0 (published)
en1 Английский Vicennial 2016-10-24 21:18:22 492 Initial revision (saved to drafts)