Almost Equal — Advanced, HackerRank

Правка en3, от rumman_sust, 2015-06-19 01:36:28

I've found an interesting problem in hackerrank. But couldn't solve it. I've tried so many ways, but no one can pass the time limit. That's why I've decided to seek some help from you guys :) Here is the problem link. If anyone have an idea to solve it, please share your thoughts :)

UPD: Solved it with mo's algorithm + binary index tree. Thanks for the hint mkirsche :)

Теги data structures, rmq, interval tree, segment tree, sqrt_decomposition, binary indexed tree

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en3 Английский rumman_sust 2015-06-19 01:36:28 1
en2 Английский rumman_sust 2015-06-19 01:22:14 113
en1 Английский rumman_sust 2015-06-18 13:40:01 381 Initial revision (published)