khba's blog

By khba, history, 4 weeks ago, In English

The Asia-Pacific Informatics Olympiad 2026 is just around the corner — scheduled for May 9th and 10th, 2026, and will be organized by Taiwan.

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 APIO 2026 Official Website.

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
  • +131
  • Vote: I do not like it

»
3 weeks ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

Is there any mirror contest of APIO 2026 to participate?

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

Any tips?

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

It seems that the APIO 2026 tasks used in China were different from the international version used by other participating countries/regions. Since the official APIO 2026 tasks have not been published yet, this is only an inference, but the Chinese version was based on individual test points, while the international version used subtasks.

To clarify, I'm not saying this has been officially confirmed.

Update: It's true. You can solve the tasks of Chinese APIO on Luogu.

»
3 weeks ago, hide # |
Rev. 4  
Vote: I like it -14 Vote: I do not like it

Is task 3 in C prefix sums? tried using it, didnt work.

»
3 weeks ago, hide # |
 
Vote: I like it +20 Vote: I do not like it

The contest window is over. How did everyone do? It seems that this year's contest was one of the hardest.

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

    Yeah! I though of getting a full solve on Bikes and literally got only 4 points!!!

    Then i was trying to solved the subtask where there is only one A[i] > 0, can anyone please tell me what was my mistake:

    Code
»
3 weeks ago, hide # |
 
Vote: I like it +17 Vote: I do not like it

How to solve each subtssk for C?

  • »
    »
    3 weeks ago, hide # ^ |
     
    Vote: I like it +3 Vote: I do not like it

    I was only able to get subtasks 1 through 4 in contest. I still lowkey don't know how to get subtasks 5 and 6.

    Subtask 1 (k = 1, n = 2)
    Subtask 2 (n = 1, you are given the room you are in)
    Subtask 3 (k = 1, for all v that is a multiple of n, the flavors in the bags with labels v to v + n - 1 are a permutation of [0, 1, 2, ..., n-1])
    Subtask 4 (k = n)
    • »
      »
      »
      3 weeks ago, hide # ^ |
       
      Vote: I like it +21 Vote: I do not like it

      Thanks for sharing!

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

      I got the first 4 subtasks, but I want to share some slightly different approaches for subtasks 2, 3, and 4.

      Subtask 2
      subtask 3
      subtask 4
  • »
    »
    2 weeks ago, hide # ^ |
    Rev. 2  
    Vote: I like it +17 Vote: I do not like it

    I can't provide solutions for each subtask (I solved the entire problem right away), but since there are explanations for subtasks 1-4, I guess I'll share my full solution.

    Solution
    Code
    • »
      »
      »
      9 days ago, hide # ^ |
      Rev. 7  
      Vote: I like it 0 Vote: I do not like it

      I think I can share an another solution for the problem here.

      Strategy for the guests inside the rooms
      Strategy for the guests outside the rooms
      Example for the solution
      Code (generated by Gemini based on my solution)

      This is a great problem btw, with lots of clever approaches. The official solution provide two more of them, I guess.

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

For q1, I wrote a dp solution for $$$N\le 5000$$$ but it got wrong answer, and I thought for a long time for why my solution is wrong, but I cannot disprove the solution nor find a countercase. After the contest, some other participants from Hong Kong told me that they also had the same problem. Moreover, some of them wrote brute force solution for a subtask (iirc its subtask 2) and they said their submission gave different verdict with some irrelevant changes in the code.

Did anyone face the same problems like us? I don't know whether the task is really that tricky or it actually has problems in the test data.

Upd: thanks to this comment, I understand why my solution is wrong. Sorry for doubting about the correctness of test data.

»
3 weeks ago, hide # |
Rev. 6  
Vote: I like it -8 Vote: I do not like it

Nvm it's wrong.

»
3 weeks ago, hide # |
Rev. 3  
Vote: I like it +6 Vote: I do not like it

It seems that mainland China has a unique APIO. Problems are different from other countries or regions.

196 points are needed to win the gold medal (top 75).

»
3 weeks ago, hide # |
 
Vote: I like it +34 Vote: I do not like it

Does this year's APIO have rankings of all participants (including unofficial ones)?

»
3 weeks ago, hide # |
 
Vote: I like it +9 Vote: I do not like it

how many points did u guys/people from ur country do?

»
3 weeks ago, hide # |
Rev. 3  
Vote: I like it +8 Vote: I do not like it

For problem B, I have some ideas that solve the first two subtasks completely and partially for the other subtasks, resulting in ~51 points. I'm wondering how to get more points. My approaches:

Subtask 1: N = 7
Subtask 2: Line graph
Other subtasks
  • »
    »
    3 weeks ago, hide # ^ |
    Rev. 5  
    Vote: I like it 0 Vote: I do not like it
    Optimization 1
    Optimization 2
    Subtask 3 and 4 (28/40 points)

    This achieves 70 points in total.

»
3 weeks ago, hide # |
 
Vote: I like it +9 Vote: I do not like it

Solution for B subtasks 3 and 4

Solution
  • »
    »
    2 weeks ago, hide # ^ |
     
    Vote: I like it +8 Vote: I do not like it

    This can also be extended to the general case to achieve $$$S=14$$$:

    Solution
»
3 weeks ago, hide # |
 
Vote: I like it +28 Vote: I do not like it

Dear apio, publish the ranking💢

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

Türkiye: (Not all, but probably enough to get an idea because some other participants didn't give exact scores, they're probably in the [25, 60] range.)

ItsNotMeItsYou — 117.71(=24+46.71+47)

carcinisation — 112(=12+0+100)

mutlu — 81(=4+56+21)

Synd209 — 68.5(=19.5+2+47)

int23_t — 68.38(=0+35.58+33)

PieArmy — 28(=13+0+15)

»
3 weeks ago, hide # |
 
Vote: I like it +9 Vote: I do not like it

Syria top 6 (as far as I know)

1- Ibrahim Fostok 68 Fostok

2- Hadi Suleiman 58.72 edogawa_something

3- Abdalrhman Sfar 42 Abdalrhman

4- Mohammad Diaa Srouji 33 NoVaLux

5- Kamal Alfakir 15 terminatorCM

6- Ahmad Salman 15 Ahmad_salman

»
3 weeks ago, hide # |
Rev. 2  
Vote: I like it +7 Vote: I do not like it

Bangladesh's top 6:

  1. Desh Acharjee (Desh01) — 141.22 (4-37.22-100)
  2. Wali E Zaman (walizamanee) — 22 (0-0-22)
  3. Sazid Hasan (iamsazidh) — 20 (2-18-0)
  4. Rayan Ferdous (_raayyyaaaannnnn_) — 13 (13-0-0)
  5. Mohammed Marzuq Rahman (Marzuq01) — 12 (4-0-8)
  6. Aritro Sarkar (Aritro_) — 10 (4-6-0)
»
3 weeks ago, hide # |
 
Vote: I like it -19 Vote: I do not like it

APIO 2026 is worst APIO

»
3 weeks ago, hide # |
Rev. 2  
Vote: I like it +10 Vote: I do not like it

APIO2026 Problems => here

»
2 weeks ago, hide # |
Rev. 3  
Vote: I like it +25 Vote: I do not like it

Kazakhstan top6 results:

Wansur — 178(= 24 54 100)

is_i — 106.5(= 6.5 0 100)

ImDMka — 97(=13 37 47)

Aldk — 86.22(=4 53.22 29)

ahyeon — 81(=13 0 68)

WansurMyKing667 — 66(=13 6 47)

»
2 weeks ago, hide # |
Rev. 5  
Vote: I like it +17 Vote: I do not like it

so since unoficial results is taking so long to get released, i made a form which i will convert to a sheet, feel free to give u guys points or people u know!! https://forms.gle/AXTfLzPq8oSqeZYF7, i will share the sheets ASAP if theres many responders

edit: anyone who has filled the form can get the sheet by friending madmi1010 on discord and give ur name/screen shot of the form so i know u actually filled it.

edit 2: i added all the ones from this blog to the sheets aswell (now containing 80 people in the sheet)

»
2 weeks ago, hide # |
 
Vote: I like it +21 Vote: I do not like it

Singapore Top 3 (to the best of my knowledge):

literalchild: $$$100 + 58 + 29 = 187$$$

Tyx2019: $$$24 + 54/58 + 68 = 146/150$$$ (P2 submission judged after window ended)

Girrysnake: $$$2 + 0 + 100 = 102$$$

»
2 weeks ago, hide # |
Rev. 3  
Vote: I like it +35 Vote: I do not like it
Solution for Bike
»
2 weeks ago, hide # |
 
Vote: I like it +43 Vote: I do not like it

Dear APIO Organizing Committee and tmt514,

We, the participants of APIO 2026, are eager to learn about the performance of all the participants of APIO 2026. In previous years, the unofficial rank list was typically released as soon as the contest window closed. It is disheartening to see that the unofficial rank list has not yet been released for over 29 hours since the contest window ended. Could you please release it now, or tell us when the unofficial ranklist will be released? The contestants would be very pleased if you could do that. Our anxiety is increasing every minute without the rank list.

Sincerely yours,
An APIO 2026 Participant

親愛的 APIO 籌辦委員會您好:
我們是 APIO 2026 的參賽者,非常希望能夠得知所有參賽者在 APIO 2026 的表現。往年通常會在比賽時段結束後立即公布非官方排名。然而令人遺憾的是,自比賽時段結束以來,至今已超過 29 小時,非官方排名仍尚未公布。 請問您們是否能夠現在公布非官方排名,或者告知我們預計何時會公布呢?若能如此,所有參賽者都將不勝感激。在沒有排名的情況下,我們的焦慮感正隨著每一分鐘不斷增加。
此致
敬禮
一位 APIO 2026 參賽者

»
2 weeks ago, hide # |
 
Vote: I like it +3 Vote: I do not like it

Philippines: 97.22 / 86.72 / 39 / 30 / 23 / 19 / 19.

The three IOI 2025 contestants who took APIO 2026 got 97.22, 86.72, and 23, respectively.

»
2 weeks ago, hide # |
 
Vote: I like it +21 Vote: I do not like it

Malaysia top 5:

  1. Yuichiro17 13+47.22+60=120.22
  2. leg 24+62+29=115
  3. quacksaysduck 0+0+100=100
  4. _ja 15.5+39.66+29=84.16
  5. isaachew 29.5+46+0=75.5
»
2 weeks ago, hide # |
 
Vote: I like it +10 Vote: I do not like it

It's a pity that Chinese mainlanders can't join interanoinal APIO because of politic reasons.

There's only a APIO(CA) and another three problems in mainland China.

»
2 weeks ago, hide # |
 
Vote: I like it +20 Vote: I do not like it
»
9 days ago, hide # |
 
Vote: I like it +3 Vote: I do not like it

Does anyone know when the official results get released here? Want to check how I placed as I was out of my delegation's top 6.

»
8 days ago, hide # |
 
Vote: I like it +14 Vote: I do not like it

Countries ranked by mean score:

Ranking
»
6 days ago, hide # |
Rev. 3  
Vote: I like it 0 Vote: I do not like it

The task files (statements, solutions, tests, etc.) for both the practice round and the official contest are now publicly available here:

You can also participate here:

»
6 days ago, hide # |
 
Vote: I like it +34 Vote: I do not like it

We (blackyuki and Mitsubachi) are very honored that two of our tasks "bikes" and "party" were used in APIO 2026. We hope you enjoyed the tasks.

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

    For task "bikes", the first challenging step is to come up with a polynomial time algorithm.

    First, we fix our starting node $$$s$$$ and ending node $$$t$$$. We assume that all leaves have $$$A_i \neq B_i$$$, in which case we have to visit all nodes at least once. For each edge, we calculate the lower bound of how many times we have to use it. Then, for edges not on the $$$s$$$-$$$t$$$ path, we have to use that edge at least twice. For edges on the $$$s$$$-$$$t$$$ path, we cut the edge to get two subtrees, one containing $$$s$$$, and the other containing $$$t$$$ in it. In the case that the sum of $$$A_i-B_i$$$ for nodes in the subtree containing $$$s$$$ is negative, we have to use the edge three times. If not, we have to use it once. Actually, we can achieve this lower bound. Therefore, we try all pairs of $$$(s,t)$$$ to get an $$$O(N^3)$$$ solution. We speed this up using re-rooting dp to get an $$$O(N)$$$ solution. The details can be found in the official editorial.

    • »
      »
      »
      6 days ago, hide # ^ |
       
      Vote: I like it +10 Vote: I do not like it

      fun fact: Actually, we also proposed this problem to EGOI before, and got rejected with the following feedback.

      We think delivery is a nice DP problem that is very educational for training rerooting of DPs. However, for an EGOI problem, we are missing a bit of creativity.

      Although we understand that this problem was not suitable for EGOI, we didn't think that the solution was typical, so we were afraid that the solution was well known outside of Japan. However, it turned out that only 6 official participants were able to reach full score.

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

    For task "party", we have two completely different solutions.

    The first solution is to force the $$$i$$$-th player to eat the $$$(i+1)$$$-th occurence of each flavor except for flavor $$$P_i$$$. If this is achievable, then the guesser can easily reconstruct $$$P$$$.

    However, since each player doesn't know their own id, this is not simple. Our main idea is to dynamically update the prediction of their own id. First, we set $$$pred=0$$$. If the player sees an already eaten bag, assuming it is the $$$(t+1)$$$-th occurence of the same flavor, we set $$$pred=\max(pred, t+1)$$$. If the bag is uneaten and it is the $$$(pred+1)$$$-th occurence of the same flavor, then the player eats it.

    For subtask 3, the guesser can easily reconstruct because for each $$$i$$$, there is at most one bag left uneaten among the $$$(i+1)$$$-th occurence of each flavor. The only problem is when bag $$$i\cdot N$$$ has flavor $$$P_i$$$, when the next player mistakenly eats it being unable to update their prediction. In that case, the guesser can conclude that $$$P_i$$$ is the flavor of bag $$$i\cdot N$$$ when all of the $$$(i+1)$$$-th occurence bags were eaten. Actually, a similar strategy with slight modification works for general $$$P$$$ to obtain full score.

    • »
      »
      »
      6 days ago, hide # ^ |
       
      Vote: I like it +10 Vote: I do not like it

      Mitsubachi came up with a rather straight forward approach. We restrict player $$$i$$$ to only eat flavor $$$Q_i = (P_i+1) \bmod N$$$. We require player $$$i$$$ to eat the first occurrence of flavor $$$Q_i$$$ and send information using the remaining $$$N-1$$$ bags. The information to send is how many of the first occurrence bags were already eaten before the first occurrence of flavor $$$Q_i$$$. Actually, the guesser can restore $$$P$$$ only using this information, by a method similar to insertion sort.

      Since we found the first solution more interesting, we tried to find a problem setting that only accepts the first solution, but we couldn't.

      It seems that there exists some other solutions. I hope you enjoyed this problem!