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

Автор monu_dixit, история, 8 месяцев назад, По-английски

Python enthusiasts might face limitations accessing certain libraries like sortedcontainers during contests such as the recent Round 918 (Div 4) on Codeforces. While the problem F in that contest could be efficiently solved using SortedList from sortedcontainers, unfortunately, the platform might not support this module. Consequently, Python users had to opt for alternative approaches such as Binary Indexed Trees (BIT) or merge sort to tackle the problem. It's worth noting that while sortedcontainers could have been a valuable asset in solving the problem, its absence might have prompted participants to explore other techniques available within the contest environment.

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

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

Helpful

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

I switch to C++ for problems that require a sorted set. In the end, this limitation makes me learn.

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

very helpfu bro

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

any alternative for sortedcontainers here?

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

Yeah. You are right. Why not create a template for sortedList and keep it with you?

Something like: https://codeforces.com/contest/1915/submission/239598054

I know it will make the code long, but it's just a template you can use. I hope that helps.