
.
Programming codes, working under pressure, and a strong team spirit compose the competitive environment that drives the talents of the Program Marathon Study Group (Gema), a team from USP’s Institute of Mathematics and Computational Sciences (ICMC) that has excelled in competitions in the field.
Since its formation in 2008, the group has been a constant presence at the national finals of the Programming Marathon, promoted by the Brazilian Computer Society (SBC). In addition, between 2019 and 2023, its members are also guaranteed participation in the world final of the International Collegiate Programming Contest (ICPC). In 2024, the competition brought together 420 competitors from more than 50 countries in Kazakhstan, and the Gema team, composed of students Dikson Ferreira dos Santos, Kenzo Yves Yamashita Nobre, André Luis Mendes Fakhoury, and Thiago Sena de Queiroz, representing not only USP but also Brazil.
In 2024, Gema also excelled in the Brazilian Computer Olympiad (OBI), a competition aimed at freshmen in higher education. Of the 25 ICMC students who participated, six excelled, winning a silver medal, three bronzes, and two honorable mentions.
For Professor João Batista Neto, Gema’s coordinator, the group’s achievements reflect the quality of ICMC’s teaching and the students’ commitment, who come together voluntarily to improve their knowledge. “Teaching within the group follows a virtuous cycle: seniors teach freshmen. This system allows knowledge to be transmitted efficiently and dynamically,” he says.
Another milestone for the team was hosting the regional stage of the SBC Marathon for the first time, which took place in August 2024 at the ICMC. “This has strengthened us and given the group a new and enriching experience,” Pietra Gullo, a student and Gema’s coordinator, points out.

.
Gema also excelled in the Women’s Programming Marathon (MFP), which encourages women’s participation in competitive programming. For the first time, the Marathon was open to women from all over Latin America. Divided into an online selection phase and an in-person final at Unicamp (State University of Campinas), the ICMC group managed to rank eight competitors for the decisive phase, and student Pietra Gullo won second place overall, the first among Brazilian students. “This is relevant because it strengthens women’s participation in competitive programming and takes ICMC’s name to the top of these competitions,” Professor João Neto says.
How do the competitions work?
The programming marathons, organized by the SBC since 1996, gather university teams of three students and a coach. On the day of the competition, the participants gather in one place. At this point, they are given around ten problems, which they must solve by programming within five hours. Each team has only one computer, which requires strategic planning and collaborative work.
According to the professor, the psychological aspect plays a crucial role in the dispute. One of the most striking elements is the use of colored balloons to signal the teams that have completed the challenges successfully. “As the teams solve the problems, balloons are placed on their tables. This intensifies the tension, as competitors can see in real-time how many questions their opponents have already solved,” João Neto explains.

.
The competition takes place in progressive stages. There are several regional offices in Brazil, with around seven headquarters in the state of São Paulo alone. The best-performing teams advance to the national final, bringing together around 45 teams. The top teams are guaranteed a place in the next stage, which is composed of the best teams in Latin America. To advance to the world final, you have to pass this new stage, which was added in 2023. “Before, Brazil was guaranteed five to six places after the national marathon,” Gema’s coordinator adds.
What the training sessions are like
The Gema team meets weekly at the ICMC to study competitive programming in a structured way, combining theory and practice. The aim is for participants to develop mastery of algorithms and data structures while applying this knowledge to solving real problems.
“Training sessions are organized according to the students’ level of experience. Beginners start with basic programming concepts and gradually move on to more complex challenges. On the other hand, seniors have in-depth meetings, with content suggested and taught by the members themselves. On Saturdays, the team runs drills that recreate the environment of official competitions, ensuring intensive preparation,” Pietra explains.
In addition to regular classes, Gema promotes internal competitions, known as Contests dos Bichos, simulating the Programming Marathon’s format. The top three finishers in these challenges are guaranteed a place in the regional stage of the competition.
The group also promotes events open to the public, such as in-person and online mini-courses, which are accessible to anyone interested. It is also involved in promoting the OBI to high school students in the São Carlos region, encouraging new generations to enter the world of programming.
To follow Gema’s activities, visit the group’s website, linktr.ee, and Instagram.
.
Text: Gabriele Maciel, ICMC Communications Office
English version: Nexus Traduções