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

Автор NeroZein, история, 2 года назад, По-английски

This year's Asia-Pacific Informatics Olympiad (APIO) will take place on the 18-th of May.

For those who don't know about APIO, it's an IOI-style competition with 3 tasks and 5 hours and it serves as one of the main team selection tests for IOI 2024 for most of the participating countries. You can find more on apio2024.org

Let's discuss problems/cutoffs/results here in the comments after the contest (and the mirror, if there's any) ends.

Looking forward to a great contest!

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

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

I was also wondering, is getting a bronze/silver medal in APIO harder than in IOI ? and what would be a good strategy for someone aiming for them ?

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

GLHF

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

good luck for all participants

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

I'm in Hangzhou now, where it's held. Good luck!

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

Ann will win APIO 2024!

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

evenvalue will win APIO 2024!

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

NeroZein will win APIO 2024!

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

Everyone who gives APIO 2024 is a winner!

»
2 года назад, скрыть # |
Rev. 3  
Проголосовать: нравится -10 Проголосовать: не нравится

Deleted

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

In which level you have to be to get at least bronze in APIO? (first time participating)

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

I am first time participating, but I'm curios about why APIO lets participants choose their start time, can it be a reason of cheating?

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

    It is because of different timezones.

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

      so in theory, there may be cheating? If yes, it's sad

      • »
        »
        »
        »
        2 года назад, скрыть # ^ |
        Rev. 2  
        Проголосовать: нравится +25 Проголосовать: не нравится

        Yes. There can be, but in general, in all of these olympiads, there is a fairly large reliance on sportsmanship or self honesty, like the team leader of any team gets the problems a lot earlier in both IOI and IMO (I don't know about other olympiads, but at least for these two I do know for sure), and if they want to, they can pretty easily share it with their team. But this obviously goes against the spirit of the olympiad (and in fact, I think for most countries, even if the team leader did that, no student would be willing to cheat), so like there's not a huge reliance on fully cheating proof regulation. Of course, they try their best, but in the end, it falls to the participants themselves to uphold the spirit of the olympiads.

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

    So that, everybody is at ease and nobody has to stress out to follow the chosen timeslot.
    Otherwise, multiple people would have time zones and other scheduling problems.
    Also, Read the rules, it says: Every participant is expected to show good sportsmanship by following the rules.

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

owoovo will win APIO 2024!

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

This will also be the last contest of Taiwan's provincial team selection! Good luck to everyone competing for the last spot of Taiwan(Province of China)'s IOI team

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

How to solve practice session A problem?

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

    I think we should wait until the contest is over before discussing problems publicly.

  • »
    »
    2 года назад, скрыть # ^ |
    Rev. 4  
    Проголосовать: нравится +14 Проголосовать: не нравится

    First, we can make $$$4$$$ arrays $$$gr, gl, sr, sl$$$ which stores for index $$$i$$$, what's the nearest greater value to the right, to left and smaller value to left and to right. This can be done using stack in $$$O(n)$$$. Now, let's consider the edges (there is an edge between $$$(i, j)$$$ if we can go from $$$i$$$ to $$$j$$$ in $$$1$$$ move i.e all elements in between are between $$$a_i$$$, $$$a_j$$$). Important thing to notice is that, we will take the edge which brings us closest to $$$r$$$ (considering the query $$$(l, r)$$$). Also, another observation is that it is easily determinable that whether $$$a_i$$$ is a min-point or max-point. We can just check that whether $$$a_{i + 1}$$$ is less or greater than $$$a_i$$$ and then we can't have $$$a_i$$$ as min if $$$a_{i + 1}$$$ is less than it (similar for other case).

    Assume that $$$a_i \lt a_{i + 1}$$$ since other case is similar. Now, $$$a_i$$$ is min and we want the max points. Note that the edges from $$$i$$$ are going to the changes in the max as we go towards right from $$$i$$$. Now, where will the last edge be? It will be to the maximum in the valid range. What is a valid range? the range will be valid such that the min point $$$i$$$ does not change. So, beyond $$$sr_i$$$ (the first index to the right of $$$i$$$ which have smaller value than $$$a_i$$$)we don't have any edge outgoing from $$$i$$$. So, we just get the max in the range $$$[i, sr_i)$$$. Now, we have $$$O(n)$$$ edges added in $$$O(n \space lg(n))$$$.

    We can also do binary lifting and store where do I land when I take $$$2^x$$$ edges.

    Now, when the query comes, we just go to the rightmost point we can from $$$l$$$ which is $$$\leq r$$$. What to do after that? We can now just do the same things we did for going in the right direction, for the left direction. Now, we starting going left from $$$r$$$ (using binary lifting). And we want the minimum jumps needed to get $$$r \leq l$$$. Now, we add both of the steps and we are done.

    Proofs of the observations are not hard, I believe that you should try them.

    Implementation
  • »
    »
    2 года назад, скрыть # ^ |
    Rev. 3  
    Проголосовать: нравится +32 Проголосовать: не нравится

    I tried my best to divide the solution into reasonable parts, hopefully it'd be helpful.

    init
    calc_f

    P.S: It appears that there are some similarities between my sol and the sol above, which wasn't there when I started writing the comment.

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

I don't like the idea of counting a compilation error as a submission. Still its not that bad, but counting in the rule of 1 minute pause is too bad. It can be so frustrating sometimes.

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

Practice is over. Is there any standings?

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

Is there going to be a mirror?

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

When will every country participated and I can discuss problems?

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

According to regulation schedule, the contest window is over. But is it truly over? Are there anyone who didn't participate?

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

When will ranking come out

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

Asia-Pacific Informatics Olympiad

Asia-Pacific Graphs Olympiad

Anyway, I think problems were cool

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

[Unofficial rankings]

Please add your scores in this spreadsheet

Edit: In case the public editing version is vandalized, you can view this backup

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

Pakistan top 6

Ghulam_Junaid 100+0+100=200
Kaleem_Raza_Syed 100+0+100=200
Muhammad_Aneeq 100+10+5=115
Sir-Ahmed-Imran 100+5+5=110
M.UmairAhmadMirza 100+5+5=110
Muhammad-Saram 100+5+5=110

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

China

56 300s.

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

Guys I totally did not write a random solution for C and got either only st3 correct or both st2 and st3 correct, and in the end wrote a sol for st1 specifically!!!

There were no dependencies set !!!

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

In my opinion, not a good contest.

The first problem is too easy. It is probably the easiest one in APIO for years.

The second problem is good. A good problem about DP optimization and persistent DS. The official solution is a bit hard (even a LGM failed to pass the problem), but some algorithms with $$$O(n\sqrt{n\log n})$$$ passed.

But the third one is 'fantastic'.

The official solution is long and extremely hard, while there is a much easier solution which can pass at about n=75 in all test cases, and about n=600 at the worst case (if the interactive lib is perfect, which is obviously impossible). What's more, the problemsetter put an $$$X \le 25,000,000$$$ which is supposed to lead the contestants to approach the solution, but it made many people try to solve T2 (at least in China) and some of them failed, getting a low score; while some successfully gets 100 points in T3 using easy solutions.

It's amazing that NOBODY found the easy solution of T3 before the contest.

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

    I think all of the countries finished taking the APIO can you tell me the full solution for C 100 points?

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

      This is a very genius solution I heard from someone in the Errichto server: Connect for all $$$2 \le i \le n$$$, the vertices $$$X \pmod{i - 1} + 1$$$, and $$$i$$$. Clearly the first vertex is always less than the second, so there cannot be any cycles. On the other hand, the graph has exactly $$$n - 1$$$ edges. Thus, it must be a tree. In order to restore the answer, you can use CRT (chinese remainder theorem).

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

      Here is how I solved C.

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

    I agree. In my country the competition was only about 15 points because of easy problem A and hard BC. Maybe we have skill issue, but it's still bad to be able to get A in the first 20 minutes and struggle to get anything else the rest of the contest

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

    I had the $$$O(n \sqrt{n \log n})$$$ solution during the contest but I didn't want to code it since the TL was 1s and $$$n$$$ was up to $$$10^5$$$, why weren't there any subtasks rewarding that solution especially that there aren't that many subtasks to think of in P2 and P3 :))

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

    What is $$$n$$$ (in the third problem)?

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

    Can you explain more about the solution of B?

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

I think problem C was better as "minimizing n" problem(i.e. your solution is judged by the max n it uses)

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

when will be results publish?

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

A very hard contest.

Kevin114514 got 115.

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

China score line: bronze (Cu) >= 115 silver (Ag) >= 200 gold (Au) >= 240

only got 140 :(

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

A well known saying in China: "Instead of beating the problem, I only need to beat the author." The person who said it got accepted in C with $$$n=75$$$, and his algorithm's easy to hack.

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

    but if u have a bigger n it is still OK to pass.

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

    What I mean is that this solution can beat the author, but I did pass this question using $$$n=75$$$ during the competition, and I can also guarantee to pass it when $$$n=615$$$.

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

      I guess your solution is to connect $$$(x\bmod i,i)$$$ for all $$$1\le i \lt n$$$. (The nodes are 0-indexed).

      With some modifications to the solution, it can be achieved for $$$n=101$$$, and the correctness is guaranteed.

      Instead of connecting $$$(x\bmod i,i)$$$, we can connect $$$(x\bmod a_i,i)$$$.

      sequence a (0-indexed)

      Proof:

      We need to prove that after deleting at most $$$49$$$ elements of $$$a$$$, the $$$\operatorname{lcm}$$$ of $$$a$$$ is still greater than $$$10^{18}$$$.

      The sequence $$$a$$$ only contains powers of prime numbers. Therefore, different prime numbers can be considered independent.

      For a prime $$$p$$$, let $$$p^k$$$ be the greatest power of $$$p$$$ that occurred in the sequence $$$a$$$, it is optimal for the grader to delete all $$$p^k$$$ first, then delete all $$$p^{k-1}$$$, ..., until $$$p$$$.

      We can use dynamic programming to calculate the maximum possible decrease of the $$$\operatorname{lcm}$$$ caused by the grader.

»
2 года назад, скрыть # |
 
Проголосовать: нравится +41 Проголосовать: не нравится
A simple solution to Task 3
»
2 года назад, скрыть # |
 
Проголосовать: нравится +45 Проголосовать: не нравится

The third problem "magic" is just a retard, but it also warns me that I'm a retard too. lol

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

Me refreshing the ranking page for the 100000th time

»
2 года назад, скрыть # |
Rev. 2  
Проголосовать: нравится -10 Проголосовать: не нравится

Easy idea for C

Get 2 nodes lets say 0 and 1 and connect them. Then we split X in to 64 groups for each bit. All nodes belonging to the first group will be connected to 1 if the bit at position 1 is '1'. Now we can just see if at least 1 node of group 1 is connected to node 0 then first bit is 0 otherwise first bit is 1. Then we can just reconstruct the number using its bits. We split the nodes to groups using some seed that will be constant no matter what X is.

  • »
    »
    2 года назад, скрыть # ^ |
     
    Проголосовать: нравится -8 Проголосовать: не нравится

    What if the judge deletes all nodes of group 1?

    • »
      »
      »
      2 года назад, скрыть # ^ |
      Rev. 5  
      Проголосовать: нравится +8 Проголосовать: не нравится

      I didn’t know the judge was smart but then don’t make one node for bit ‘1’ and ‘0’ but make 500 nodes for each let’s say and distribute the nodes among them

      EDIT: Idea 2 to fix this issue: If a group is all deleted then just imagine its from the node which has more deleted so for the case which all '1's are deleted then all the deleted nodes u would imagine they are from '1' if it uses its deletes evenly then there is a very high probability that the whole group didn't get deleted

      I think this is an easy idea compared to the other ideas I have seen

»
2 года назад, скрыть # |
 
Проголосовать: нравится +8 Проголосовать: не нравится
My sol for C
»
2 года назад, скрыть # |
 
Проголосовать: нравится +39 Проголосовать: не нравится

where is the standing

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

This is quite appalling. They opened an appeal session but did not give any chance to do any resubmission (as in analysis mode). Neither do they publish on their website the task statements, the test data, nor the unofficial standings.

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

Me refreshing the ranking page for the 1000000000th time

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

At least give a date on which results will be published so that we need not refresh the page 1000000000 times daily

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

Can somebody write editorial of problem A please!

  • »
    »
    23 месяца назад, скрыть # ^ |
     
    Проголосовать: нравится +3 Проголосовать: не нравится
    Solution - Problem A
»
23 месяца назад, скрыть # |
Rev. 7  
Проголосовать: нравится +135 Проголосовать: не нравится

Why is the APIO website just dead? There's no update so far after the contest.

We'll get GTA 6 before the unofficial ranking.

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

Instead of waiting indefinitely, One suggestion would be to contact your country's delegation leader on this. He should be able to communicate directly with the APIO organizing team to know the status.

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

The organizers have sent the PRELIMINARY results to the team leaders. According to it:

  • Gold >= 240 points (40 people)

  • Silver >= 200 points (39 people)

  • Bronze >= 135 points (33 people)

Remember, these results are NOT OFFICIAL, yet. Also, we should not expect them until 31st May.

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

The long wait is over, and the ranking has been released.