ludo.'s blog

By ludo., 11 months ago, In English

The Asia-Pacific Informatics Olympiad (APIO) 2025 is just around the corner — scheduled for May 17th and 18th, and will be hosted by Uzbekistan.

For those who haven’t heard of it, APIO is a prestigious IOI-style online contest featuring 3 challenging tasks over 5 hours. It's an important part of the IOI team selection process for many countries across the Asia-Pacific region. More info is available at https://apio2025.uz/.

Feel free to use the comments to discuss problem ideas, scores, cutoffs, and results after the contest (and any mirror, if there is one) wraps up.

Good luck to everyone participating — hope it’s a fun and insightful contest!

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

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

Kindful notice: Please wait until the entire flexible window ends before you discuss the problems, as the contest runs on a flexible window spanning over two days. This is stated in the rules also.

Also you wrote 2024 in place of 2025 in the blog, looks like a typo lol

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

Bro started farming contribution even before the contest starts;)

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

will there be mirror?

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

Our country just received an email saying that online resources are banned. Has anyone received similar things? Quite a drastic change to the contest format if it's true..

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

    Yes.

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

    Our country also received a similar email.

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

    hey, any update on this?

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

      “any sources of information” refers only to code written by the contestant before the contest, such as GitHub templates or old Codeforces submissions.

      This does not permit viewing others’ code, searching for solutions online, or discussing the problems. Contestants may not read blogs or algorithm explanations on websites such as Codeforces or CP-Algorithms.

      So apparently you can only view codes written by yourself. Not sure how they're going to police it though

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

    At the very least, this change should have been made a month ago. When the information was sent to the players in our country, it was four hours before the start.

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

    Yeah, I guess all countries did.

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

I guess the contest must be ended now, congrats to all the participants ^_^

Can anyone share p1 (hack) subtask 3 idea?, you can share any partial results solution, I could solve the first two subtasks only

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

    To check if the size is less than $$$x$$$ or not, do

    $$$1, 2, \ldots, \sqrt{x}, 2\sqrt{x}, 3\sqrt{x}, \ldots, x$$$

    Do binary search. When your range is $$$[l, r]$$$ you don't actually need to check from $$$1, 2, \ldots, x$$$ but rather do

    $$$1, 2, \ldots, \sqrt{x}, l, l+\sqrt{x}, \ldots, r$$$

    where $$$x = r-l+1$$$

    This way, you use about $$$\sqrt{10^9} + \sqrt{10^9/2} + \sqrt{10^9/4} + \ldots$$$ in total. (idk might be wrong, but this is about 150k queries => $$$78.1$$$ pt)

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

      I thought about keeping n constant: If you do not change it, and only alternate with the second range, it will be log(n)*(n^(1/2)) + sqrt(1e9) + sqrt(1e9)/2... since 1, 2... sqrt(n) doesn't decrease. However, to make this work, you can do one iteration on 1, 2, sqrt(n), then one iteration on sqrt(n), 2*sqrt(n).. n This will be as such: 1st: sqrt(n) + sqrt(n)/2 2nd: sqrt(n)/2 + sqrt(n)/2 3rd: sqrt(n)/2 + sqrt(n)/4 4th: sqrt(n)/4 + sqrt(n)/4 ... Which sums up to be around 158000 for 1e9. And that nets you 50pts on the 3rd subtask. You can optimize the 1st iteration, since it will always trigger for l=1e9/2 r = 1e9 (for bs on the left sequence), you can make the first one take sqrt(n) queries only, instead of 3/2sqrt(n) queries. Netting around 55pts. Maybe this kind of logic could be merged to give a better score ?

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

      Ok, I found the AC sol:

      We can assume that the mod > 1e9/2

      Now, we have number of queries is 2sqrt(1e9/4) + 2sqrt(1e9/8) + 2sqrt(1e9/16) + 2sqrt(1e9/32)... = 108000 queries (we already reduced it to [1e9/2, 1e9] so it takes 2sqrt(1e9/2/(2**i)) for the ith iteration (0 indexed)) We know that if x is the modulo, then a*x will also cause collisions as if it was the modulo. (a being a positive integer)

      And so, what we can try to do, is to try to remove a prime factor one by one from our answer.

      Let's say we got answer x

      We will query [x/p+1, 1] to check if the actual answer was smaller than x.

      if it returns 1 collision, then x:=x/p

      We repeat this until we don't get any collisions with all primes.

      This should stay under 1.1e5.

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

rankings and cutoffs when?

»
11 months ago, hide # |
Rev. 4  
Vote: I like it +43 Vote: I do not like it

The server says that the contest is over.

How much did the top 6 of your countries get?

Egypt:

  1. contee — 25 + 70 + 54 = 149

  2. MinaRagy06 — 51.1 + 22 + 74 = 147.1

  3. Octagons — 8 + 12 + 63 = 83

  4. O_Elmasry — 25 + 36 + 5 = 66

  5. 3omar_ahmed — 25 + 12 + 24 = 61

  6. HossamHero7 — 25 + 12 + 16 = 53

  7. ASGA_RedSea — 25 + 12 + 16 = 53

  8. phir. — 25 + 12 + 16 = 53

»
11 months ago, hide # |
Rev. 4  
Vote: I like it +3 Vote: I do not like it

Türkiye (some people unknown, I will update when new ones are shared)

Seferoglu 82.5+12+16 = 110.5

carcinisation 72.2+22+16 = 110.2

mychecksdead 43+12+54 = 109

kerembozkaya 8+0+100 = 108

ItsNotMeItsYou 25+12+63 = 100

int_slowbutbitbetter23_t 78.1+0+0 = 78.1

PieArmy 8+46+5 = 59

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

    Can you explain how you got 82.5 for the first problem?

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

      I first thought about cheaply verifying if x <= n for some x. If we can do that we can binary search on n.

      I noticed that the collision thingy only outputs positive integers if there are two numbers in its input whose difference is divisible by n. So if I were to somehow input a short list of numbers such that all differences in 1...n were present, we can check if x <= n definitively just by checking if anything collided. A simple construction for n = 81 is as follows:

      1 2 3 4 5 6 7 8 9 10 20 30 40 50 60 70 80 81 82

      I think this example will show the idea pretty well but the idea is you can use first O(B) numbers to create first B-1 diferences and O(N/B) numbers to get the rest. selecting B~O(sqrt N) yields around 43 pts. Then you basically optimise empirically, I got 78 pts for a long time but managed to optimise to 83 pts with a few math observations

»
11 months ago, hide # |
Rev. 2  
Vote: I like it +14 Vote: I do not like it

India (sorry, I don't know/remember exact scores and distributions for many, if you find your score is wrong please contact me and I'll fix it):

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

Taiwan (I don't know the exact distribution because we only put our total scores into a spreadsheet):

»
11 months ago, hide # |
Rev. 2  
Vote: I like it +6 Vote: I do not like it
»
11 months ago, hide # |
 
Vote: I like it -33 Vote: I do not like it

Heard that the problemset has 2 interactives and 1 constructive. What the hell lmao

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

ojuz will the problems be available for upsolving?

Edit: they're on QOJ: https://qoj.ac/contest/2031

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

Hi, I authored problem 2 (permutation game) this year.

You can find the my pdf sunmission here and my rantings here

  • »
    »
    11 months ago, hide # ^ |
    Rev. 6  
    Vote: I like it -34 Vote: I do not like it

    LOL that response from EGOI, it better not turn out that they rejected random problems on random graph classes because "it takes place on a graph, and it quickly becomes clear that the structure of the graph is very important". That really sounds like double standards to me.

    Also I and conqueror_of_tourist authored problem 1 (hack) while making ideas for OCPC Potluck Contest 2 last year!

    You can check the PDF submission here.

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

    "it quickly becomes clear that the structure of the graph is not very important" how is that even remotely trivial? Yeah it's easy to guess, but if the server were slow and I didn't get full feedback to check my guess I would poop my pants out.

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

Can I discuss now? I have some questions about the 3rd problem.

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

shoutout to Muaath_5 for getting the ideas to the three tasks but not being to implement them

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

Upsolve is available on Eolymp.

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

Upsolve is available on 洛谷.