i_love_huyhau6a2's blog

By i_love_huyhau6a2, history, 11 months ago, In English

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.

  • Vote: I like it
  • +75
  • Vote: I do not like it

»
11 months ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

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

»
11 months ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

orz danghuyhau

»
11 months ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

Oh wow

»
11 months ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

orz danghuyhau

»
11 months ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

Orz danghuyhau

»
11 months ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

danghuyhau orz

»
11 months ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

as his friend, i_love_huyhau6a2 OTL

»
11 months ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

as a penguin, i_love_huyhau6a2 orz

»
11 months ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

as his friend, i_love_huyhau6a2 orz

»
11 months ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

orz danghuyhau

»
11 months ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

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?

»
11 months ago, hide # |
 
Vote: I like it +24 Vote: I do not like it

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.

»
11 months ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

orz danghuyhau

»
11 months ago, hide # |
 
Vote: I like it +5 Vote: I do not like it

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!

»
11 months ago, hide # |
 
Vote: I like it +8 Vote: I do not like it

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.

  • »
    »
    11 months ago, hide # ^ |
     
    Vote: I like it 0 Vote: I do not like it

    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").