Problem with MO's algorithm

Revision en1, by svg_af, 2015-12-24 22:31:57

Hello there I've been reading up on MO's algorithm and sqrt decomposition and i think i've figured out the concept

so i'm trying to solve this problem but i keep getting TLE and i can't seem to figure out what i'm doing wrong

Here's my code

Thank you all in advance :D

Tags sqrt_decomposition, mos_algorithm, time limit exceeded

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en1 English svg_af 2015-12-24 22:31:57 380 Initial revision (published)