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

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

Hello, I am one of the participants of APIO 2025 (you can check at rank 44). The problems are really hard and tricky, and one of them is the 3rd problem — rotate. You guys can check the statements of APIO2025 in here: https://github.com/apio2025/apio2025_tasks.

I won't talk about the statement of the 3rd problem here since it's already in github; you guys should check that before reading my solution.

So, I don't know if this is the intended solution, but I think I am really lucky when I got accepted at 4h45. And that solution is really simple. Here's my solution:

Solution
Code

I can't prove my solution, so can you guys check this and prove it for me, or is this solution wrong?

Thank you for reading this blog.

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

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

Auto comment: topic has been updated by i_love_huyhau6a2 (previous revision, new revision, compare).

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

orz danghuyhau

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

Oh wow

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

orz danghuyhau

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

Orz danghuyhau

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

danghuyhau orz

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

as a penguin, i_love_huyhau6a2 orz

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

as his friend, i_love_huyhau6a2 orz

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

orz danghuyhau

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

How does the energy not decrease at all when you do this. This is the second subtasks solution so how does it work for full points?

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

Your solution are actually correct.

Because when you rotate $$$v_{\lfloor\frac n2\rfloor}$$$ to be perpendicular to $$$v_0$$$, consider the acute angle between them. There are at least $$$\lfloor\frac n2\rfloor-1$$$ lines in this angle (specifically, $$$v_1,v_2,\ldots,v_{\lfloor\frac n2\rfloor-1}$$$ or $$$v_{\lfloor\frac n2\rfloor+1},v_{\lfloor\frac n2\rfloor+2},\ldots,v_{n-1}$$$). Obviously they, as well as $$$v_0$$$, will be always getting further from $$$v_{\lfloor\frac n2\rfloor}$$$ during the first rotation. That are at least $$$\lfloor\frac n2\rfloor$$$ lines, so the efficiency always increases during the first rotation.

Now $$$v_0$$$ and $$$v_{\lfloor\frac n2\rfloor}$$$ are already perpendicular. Obviously, the sum of distance to the two lines of any other line is $$$25000$$$, which is a constant. So we can just "delete" the two lines, remaining a subproblem of $$$n-2$$$ lines.

By induction, the correctness of the solution can be shown.

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

Before the model solution was released, I thought that this was actually the intended solution. I was shocked when I saw that the model solution was much more complicated!

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

And any code will get to 74 points, even local search. Maybe this was intended to be an easy problems, but somehow 90% of people haven't got a single idea on this problem.

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

    Can't really blame them, it's geometry + constructive (the two things people hate most). Personally, one of my friends (who's pretty good at math olympiads) didn't even try it during contest, and then solved in 20 minutes afterwards. So, yeah. I think people just got intimidated by the problem.

    Personally: I got a 54 (yeah I am cursing myself afterwards), after using ternary search and some optimizations (I didn't local search, my method was just "take the thing which increase you efficiency most at the current moment").