NIT Jamshedpur brings to you CODEMANIA, the competitive programming event of its tech fest OJASS’19 with prizes worth 36,000 INR.
We would like to invite you all to join the contest on codechef which will be held on 28th FEB 2019, 21:30 IST.
Codemania Prelims — Contest Link
This will be a 2.5 hours contest consisting of 6 problems. Problems are prepared by neeleshsinha , joker_in , vikas_kumar and sarwarkhan.
Note: Prizes will be given to the winners of the Onsite round to be held at NIT Jamshedpur during Ojass-19 (5th to 7th April).
Please read the contest details before participating. To be eligible for the prizes, fill this form.
Auto comment: topic has been updated by sarwarkhan (previous revision, new revision, compare).
How to solve Reimer Tiemann.. https://www.codechef.com/CONA2019/problems/COMA19E
Ideas/Hints?
HLD and binary search.
You can read about it here.
Isn't that O(Q(logn)^3), why were the constraint for Q so high (5*10^5)? or is there some observation to improve the time complexity?
It can be done in O(Q(log(n))^2). For any query: First, find the chain number of possible answer O(log(n)^2). Then binary search in that chain to find the answer O(log(n)^2).
What is the approach for "help ramanujan"?