Need some help with Splay Trees (SPOJ : QMAX3VN)

Revision en1, by pranet, 2016-01-13 10:47:17

Statement

Is it possible to solve this question using splay trees (without using any sort of randomization)?

I have tried the following:-

  • Treaps (isolate range for query): TLE Code

  • Treaps (query by traversing BST): AC Code

  • Splay (isolate range for query): TLE Code

  • Splay (query by traversing BST): TLE Code

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en2 English pranet 2016-01-13 10:59:06 319 Tiny change: ' chain BST. And sinc' - (published)
en1 English pranet 2016-01-13 10:47:17 513 Initial revision (saved to drafts)