Why fixing Box size in mo's algorithm makes code faster

Revision en1, by unt311, 2021-04-25 01:07:00

In my opinion, using box size as (int)sqrt(n) is best for mo's algorithm.

But my two submissions differ in just that(fixing block size or taking it as (int)sqrt(n), and one gets TLE and other one gets AC.

What is the logic here ?

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en1 English unt311 2021-04-25 01:07:00 410 Initial revision (published)