Hello, Codeforces!
The 2026 ICPC Latin America Championship was held last weekend, and the full problem set is now available on Codeforces Gym for virtual participation and upsolving. Whether you want a team practice or a solo grind, you're invited to try it and discuss solutions here.
This contest brings together the top teams from the ICPC Latin America Regional Contests of the 2025–2026 season.
The championship was held in Chile on March 7, 2026, where qualified teams from across the region competed for the title and for advancement to the ICPC World Finals. You can check the official results here: https://scorelatam.naquadah.com.br/pda26/. There was also a mirror on the ICPC-LA CF Group (see The 2026 ICPC Latin America Championship).
Huge thanks to the championship jury who prepared and tested the tasks, and to all the volunteers and organizers who made the event possible. The problems were written and prepared by Alejandro Strejilevich de Loma, arthur.nascimento, brunomont, byakko, kobus, Humberto Díaz Suárez, Juan Pablo Marin Rosas, Ayalla, Malheiros, lsantire, cosenza, mnaeraxr, MarcosK, martins, Moro Silverio, Roberio, Sarai Ramirez Gomez, cabessa, VinnySJ and me. Also thanks to Agreb, crbonilha, Franco1010, IvanBorquez and VladaMG98 for testing the set and providing feedback on the problem statements.
An editorial with solution sketches is in the works; this post will be updated with the link as soon as it's ready.
Use the comments to share hints, approaches, and editorials (please mark spoilers).
Hope you enjoy the problems and have fun!








Can someone explain solution to problem D? I've managed to get AC but it seems to me that my solution is overkill
Hello! I participated as a member of one of the extra teams (CCL) in this contest.
Let's create a window of size $$$k + 1$$$ that ends (inclusively) at the last position ($$$i = n$$$). Now, notice that an element can be at the last position if and only if it's inside that window. Therefore, we're forced to choose an element from that window and place it at that position.
Next, let's move back one position, so now we're at position $$$i = n - 1$$$. At this point, the elements we can place at the penultimate position ($$$i$$$) are all of the elements from the previous window except for the element we were forced to put at the $$$n$$$-th position plus the element at position $$$i - k = n - 1 - k$$$ (if this position doesn't exist, we can simply assume it's $$$0$$$). And once again, we are forced to choose one of the elements from this alternate window.
Inductively, this pattern continues. Thus, the solution consists of iterating from the last position to the first with a starting window based on a multiset of size $$$k$$$ of the last elements. Then, at each iteration you extend the window by the element at position $$$i - k$$$ and choose either the largest element of the multiset or the smallest depending on whether the position when indexed by one is divisible by $$$x + 1$$$ or not. This chosen element is removed from the multiset but is also added to the answer (well, divided by two of course).
375158737
There are a number of problems akin to this one where you find some fixed perspective that always forces you to make a move but that you are free to choose which move it is. There was a really nice one from the 2025 OCPC Winter training camp, which I'll add to this comment if they give me permission.
Anyways, hope this comment helped :)
Thanks!
any editorial ?
Can Someone explain the solution of G?