Блог пользователя anonymous1233

Автор anonymous1233, история, 7 лет назад, По-английски

Given n intervals, its interval being [li,ri], and q query intervals, how can we find no of intervals lying inside each query interval In O(logn) ?? Can the above problem be done using segment tree/ BIT(as on net I saw it being implemented using "interval tree" something I have not learnt yet, so I was curious if an alter approach exists.

Полный текст и комментарии »

  • Проголосовать: нравится
  • +7
  • Проголосовать: не нравится

Автор anonymous1233, история, 7 лет назад, По-английски

Hello Codeforces. This is a fake account of an anonymous blue coder who is too shy to ask his doubts otherwise. I am currently in second year computer science engineering and have done all math required for engineering purposes well. I however didn't know and hence prepare for IMO( very few students know much about it in my country before 11/12th). and hence my pure math is quite weak. Usually in construction problems I fail to think of a good construction even after hours of thinking but am able to understand solutions at once. Sometimes in 2E/2F level DP Problems I always make errors like creating more states than required, or struggling to implement(sometimes even create) a recursion, though I am usually able to understand editorials and then curse myself on not able to think them :) I also want to improve my graph and probability theory which I am not quite good at. So I am planning to try if possible some good math books and resources side by side which have good problems/tricks capable of enhancing my dull brain. I searched on Codeforces quite a lot but have not found any resource yet. Please help me by suggesting some books/blogs etc. which I can use to improve my math.

Thanking you The above mentioned

Полный текст и комментарии »

  • Проголосовать: нравится
  • +17
  • Проголосовать: не нравится