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

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

Recently, I came across this problem through the USACO Guide (thanks Benq, thecodingwizard, caoash, darren_yao, nchn27, and frodakcin for the the amazing resource!).

I know (from the guide) that the solution involves Wavelet Trees, I have no idea how to use it here (actually, I really only understand the basic implementation).

Any hint/solution/approach is greatly appreciated.

Thanks.

Edit: I couldn't find any editorials online either, the closest I found was this. The problem comes from the 2019 ICPC Asia Danang Regional Contest (Problem E).

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

»
6 лет назад, скрыть # |
 
Проголосовать: нравится +14 Проголосовать: не нравится

Added my code and a brief sketch.