Please read the new rule regarding the restriction on the use of AI tools. ×

Problem on MO's algo

Revision en1, by starbot, 2017-10-08 21:10:21

My solution to the problem barely passed after many optimizations.... This problem mainly asks to calculate a functions value over a range of array and give output. My solutions offline query method.(MO's algorithm) Can anyone suggest any improvements !!

Problem : http://codeforces.net/problemset/problem/86/D

My Solution's Link : https://pastebin.com/Gcuxet5h

Thank You !

(PS : any other ways to do the problem are also welcomed :D )

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en2 English starbot 2017-10-08 21:11:45 8
en1 English starbot 2017-10-08 21:10:21 471 Initial revision (published)