Блог пользователя faild-in-2021

Автор faild-in-2021, история, 22 месяца назад, По-английски

I found this problem and i really can't solve it using java because of the weak DS in java, i want to ask if this is the limits of java or just me who didn't know how to solve it, if you have any idea please help,

https://cses.fi/problemset/task/2163

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

»
22 месяца назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

What was the time complexity of your solution? If it's nlogn (using order statistic tree) it should pass. Even an nlognlogn solution using binary search with segment tree might work.

»
22 месяца назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

Because of the relative speed/limit of the judge, there are some problems on CSES that are difficult to solve in Java just because Java is a little slower. For most problems the test cases are available on the submission site so you can try to download them test your program locally.