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

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

"Conclusion" porblems refer to problems which you may think a lot for a "conclusion" but the codding is very easy. For example, 1919A - Wallet Exchange, 1919B - Plus-Minus Split, 1919C - Grouping Increases, 1919D - 01 Tree and so on.

I am very confused about these problems. Almost always, I'm struggling on one of these problems (maybe C or D or even B in a Div.2 contest). I cannot find such "conclusion" quickly. How can I improve?

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

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

Do you mean problems that seems difficult, or with long solution, but can be solved in much easy way? Because I don't get what do you mean by "conclusion" problems

»
4 месяца назад, # |
Rev. 2   Проголосовать: нравится +6 Проголосовать: не нравится

Honestly, I don't think there's much good advice beyond "solve more problems" and "try not to overthink if it's div2A".

Also, can you tell me how to implement 1919D - 01 Tree since you said you found it easy to code? I spent quite some time while coding it :p

  • »
    »
    4 месяца назад, # ^ |
      Проголосовать: нравится +3 Проголосовать: не нравится

    The first implementation described in the editorial is relatively messy (i.e., I think it's normal to get stuck). The linear solution requires a small extra step, but imo it's much easier to implement.

    Linear solution

    I actually implemented the linear solution in $$$O(n \log n)$$$ because it's even shorter.