Quantcast
Channel: CodeChef Discuss - latest questions
Viewing all articles
Browse latest Browse all 40121

explaination of Forbidden Sum?

$
0
0

can someone explain this part of the editorial of Forbidden Sum of January Long (http://discuss.codechef.com/questions/35346/frbsum-editorial)
"For the static Segment Tree, we can maintain a sorted list in each node with their prefix sum (O(N log N) space is needed, because there are O(N) numbers stored in each level). When the query covered the whole interval stated by the node, binary search is adopted to fast locate the "x <= S + 1" position and return the prefix sum. Therefore, we can solve each query in O(log^2 N) time"


Viewing all articles
Browse latest Browse all 40121

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>