santa_x112's blog

By santa_x112, history, 6 weeks ago, In English

So far I have tried this code but couldn't approach to the optimised way of solving the problem. A small hint would be a great help instead of complete solution.

Link to the problem : https://cses.fi/problemset/task/2416

 
 
 
 
  • Vote: I like it
  • +5
  • Vote: I do not like it

»
3 days ago, # |
  Vote: I like it +1 Vote: I do not like it

Did you solved it ?

»
3 days ago, # |
Rev. 2   Vote: I like it 0 Vote: I do not like it

You can use segment tree to solve this problem.

Hint1
Solution