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

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

We will hold Marubeni Programming Contest 2024 (AtCoder Regular Contest 183).

The point values will be 400-600-600-800-900-1100.

We are looking forward to your participation!

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

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

Solved B at 119 min 46 sec! Thrilling!

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

What does run-length encoding mean for the editorial in question B thanks!

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

    I think they don't actually mean run-length encoding, but rather:

    compress identical adjacent elements to one element

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

Is it possible to provide only the gist part of the solution [by the exclusion of all the templates and typedef stuffs] in the Editorial? I need to scroll a lot of templates of the author and got lost in the middle of the Editorial of problem A.

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

Can problem D be solved this way? Since a tree is a bipartite graph, the pair of leaves we choose must not belong to the same partite set, ensuring a perfect matching. So we can color each vertex either red or blue based on it's partite set. Next, we need to find an edge that divides the graph into two equal parts. If a perfect matching exists, there should be an equal number of red and blue vertices on either side of this edge(uncertain if this claim is true). However, I'm uncertain whether such an edge always exists. The goal is simply to pair any two vertices from these components. we can pair them in any way, it shall satisfy that they were leaves at the moment they were being paired.

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

Problem B is novel and interesting, solution to Problem D is beautiful!

I wonder why that my solution to D takes such long time (1864 ms) to execute?

My solution shares the same beginning with the official solution, the last part is based on heavy-light decomposition. I think its time complexity is $$$\mathcal O(N \log N)$$$ with space $$$\mathcal O(N)$$$. It's weird for it to take 1864 ms on one testcase.

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

The problems are really good, though both D and E are a bit implementation heavy (especially E, considering the fact that there are lots of details in implementing), which makes it really hard to solve both in 2 hours.

Just curious if the sample of B was made weak intentionally or not. It was really frustrating when I forgot a corner case and had no idea why it got WA :(

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

problem B was really interesting, thanks you!

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

Thanks for the contest!

Can problem C be solved if the requirement was on the value itself, not the index? $$$X_i$$$ instead of $$$P_{X_i}$$$.

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

Regarding problem B editorial, what the heck does this mean: “If you want to change ∗x to x∗: think of ∗x as xx and perform the operation to turn it into x∗.” I don’t see at all how wildcard helps us in this problem.