Hello, Codeforces!
Introduction
Recently, we had the opportunity to prepare an editorial for problems from the USP Tryouts 2025.
My friends (murkat and GuilhermeKK) and I put a lot of effort into creating a detailed editorial, trying to teach the used techniques.
Who is this for?
The contest has problems ranging from relatively straightforward observations and standard algorithms to much more complex data structures and techniques.
If you are still building your competitive programming foundations, the easiest problems are a good opportunity to practice identifying the main idea and turning it into a clean implementation.
If you already have more experience, the most difficult problems cover advanced techniques(try problem C and E).
Even if you have already solved the contest, reading through the editorial can still be useful for comparing approaches and finding different ways to reason about the problems.
The Full Editorial
We prepared the editorial in both Portuguese and English. Both versions contain detailed explanations of the main ideas, complexity analysis, and complete C++ implementations.
The Portuguese version can be found here:
The English version can be found here:
We recommend spending some time thinking about each problem before reading its full solution. Some of the most interesting parts of this contest are precisely the observations that lead to the intended approaches! If you are stuck, we highly recommend you to not read the complete solution, maybe reading a little bit it's enough for you to solve the entire problem!
Conclusion
If you liked the contest, have any suggestions, found an alternative solution, or noticed any mistakes in the editorial, please let us know in the comments!








