Skip to: roles · history · contestant record · discussion sessions · my problems
I have a strong connection with all kinds of programming contests. I feel that they can be a huge motivation factor for students, helping in the promotion of computer science and the desire for always knowing more.
For a more complete list of the prizes I got in the contests I participated see my contestant record. For a more textual description of my involvement in contests or for a list of my problems, continue in this page.
Current roles
- Leading the organization of the National Olympiads in Informatics (ONI), together with Pedro Paredes and APDSI: national finals and team selections at my department, problem setting and coaching.
- Portuguese team leader at the IOI (deputy leader from 2005 to 2008, team leader since 2009), and also at the OII and the WEOI.
- Organizer of Bebras PT, together with TreeTree2, since 2019.
- Member of the scientific committee of MIUP, problem setter and coach of the University of Porto teams.
Past organization
- Director of MIUP in 2012 and 2015, hosted at DCC/FCUP.
- Responsible for organizing the OII in 2012 and 2013.
- Organization of SWERC 2014 to 2016 at my department.
- Organization of the ICPC World Finals 2019 and the 2025 ICPC Europe Championship, both held at Porto.
- Scientific committee of the IEEEXtreme Programming Contest in 2008 and 2009.
Awards
- 2019: Received the ICPC Joseph S. DeBlasi Outstanding Contribution Award, as a part of the ICPC University of Porto Team, “for advancing the art and science of computing, in the classroom and lab, and through providing gifted students in Europe and around the globe opportunities to pursue excellence through competitive programming. For over two decades, ICPC Porto volunteers have provided training and ICPC competitions culminating in hosting the 2019 ICPC World Finals in Porto.”
- 2009: Received the IEEE 2009 MGA Achievement Award, as a part of the IEEEXtreme Team, for outstanding accomplishment and contributions toward the implementation of the 2009 IEEEXtreme Programming Contest.
History
Olympiads in Informatics


It all started when I was 15 years old and still in high school, influenced by my brother. While still on 9th grade I participated in the National Olympiads in Informatics (ONI) and I was the youngest contestant. I was 2nd in the national finals and obtained the right to represent Portugal in the International Olympiads in Informatics (IOI) in the Netherlands. I also got the opportunity to participate in a training campus organized by Prof. Pedro Guerreiro which proved to be very influential on good programming techniques.
From there it all started to be part of my life. While I was still at high school, I entered three more editions of ONI and got the 1st place in all of the national finals. With that, I represented Portugal in three more IOI’s, held at Hungary, South Africa and Portugal.
Nowadays I cannot participate but I’m still actively involved in the community. I’m leading the organization of the National Olympiads (together with my former student Pedro Paredes and APDSI). I organize the national finals and team selections at my department and I’m also active on the scientific side (as a problemsetter and coach) and I am currently the portuguese team leader at the IOI (from 2005 to 2008 I was the deputy leader and since 2009 I’m the team leader) and also at other international high-school competitions such as the Ibero-American Olympiads in Informatics (OII) and the Western-European Olympiad in Informatics (WEOI). In 2012 and 2013 I was also responsible for organizing OII.
ICPC Competitions

When I entered the university, I promoted programming competitions and basically helped in the first experiences in my faculty on that field in the ICPC International Collegiate Programming Contest, which is a team contest (up to three students), in opposition to the Olympiads, which are individual. In this endeavour I was immensely helped by Prof. Fernando Silva, who believed in me and in competitive programming and helped in all aspects.
In 1999 I entered my first Southwestern Europe Regional Contest (SWERC) obtaining the 11th place among teams from 4 different countries.
In 2000 the University of Porto Programming Contest (CPUP) was started, with teams from several departments, and I won that first edition. In SWERC'2000 I was now 2nd (still the best rank of a portuguese team at SWERC, equalled in 2023 by a team I coached), but failed the qualification for the world finals by a single place (only one team passed at that time - the next edition saw 2 teams advancing but also more countries participating: Switzerland, Austria and Germany.).
I then proceeded to win all editions of CPUP I participated in (2000 to 2003), gaining the right to represent my university at SWERC level, where I was always part of the best portuguese team. During those years I helped in founding the Maratona Inter-Universitária de Programação (MIUP), the portuguese ICPC contest, with teams from all over the country. I won all the editions of that contest that I participated in, from 2001 to 2003.
While training, among several other sites, I dedicated some time to the UVA Online Judge (the most well known at that time), in which I solved more than 600 programming problems.
Nowadays I cannot participate as a contestant but I’m an active problemsetter and organizer. I am part of the scientific committee of MIUP, and I coach the university teams. In 2012 and 2015 I was the director of MIUP and I hosted it at DCC/FCUP. From 2014 to 2016 I was involved in the organization of SWERC at my department and I was also involved on the organization of the ICPC World Finals 2019 and the 2025 ICPC Europe Championship, both held at Porto.
IEEEXtreme Programming Contest
I was part of the scientific committee of the IEEEXtreme Programming Contest in 2008 and 2009, authoring several problems.
Logical Programming Contests

All the afore mentioned contests use imperative programming (I mainly use C/C++). In 2003 I decided to experiment another programming paradigm in contests and I participated for the first time in the National Logic Programming Contest (CENPLF), working in Prolog. The contest had an open division, in which post-graduate students could participate and I got the global first place.
I repeated the experience in 2004 and 2005 (where the contest gained a functional arm, with Haskell being permitted) and in both years I repeated the global first place.
Bebras - International Challenge on Informatics and Computational Thinking


I always wanted to promote computational thinking and computer science for even younger ages and in 2019 I started the portuguese edition of the Bebras, an international initiative aiming to promote Informatics (Computer Science, or Computing) and computational thinking among school students at all ages
I organize Bebras PT together with TreeTree2 and we challenge students from the 3rd to the 12th school years, reaching almost all pre-university years. The portuguese edition has been growing (~5K students in 2019, ~17K in 2020, ~43K in 2021, ~77K in 2022, over 105K from around 700 schools in 2023, ~135K from ~800 schools in 2024) and in 2025 we had ~150K students participating from around 800 schools from all over the country.
Ciber-Rato (Cyber-Mouse) Competition

In 2002, during my final BSc project, I decided to enter a different competition, dedicated to artificial intelligence. I participated in the Ciber-Rato (Cyber-Mouse) virtual robot contest, in which a software agent has to be very fast in solving a maze. I got the first place among teams from several institutions. In 2003 I won again and continued to participate until 2006 (albeith spending less and less time developing the agent), obtaining the 2nd place in 2005.
Contestant record
| International Olympiads in Informatics (IOI) | |
|---|---|
| 1995 | Represented Portugal on IOI'1995, The Netherlands |
| 1996 | Represented Portugal on IOI'1996, Hungary |
| 1997 | Represented Portugal on IOI'1997, South Africa |
| 1998 | Represented Portugal on IOI'1998, Portugal |
| National Olympiads in Informatics (ONI) | |
| 1995 | 2nd place at the national finals |
| 1996 | 1st place at the national finals |
| 1997 | 1st place at the national finals |
| 1998 | 1st place at the national finals |
| Southwestern Europe Regional ACM ICPC Contest (SWERC) | |
| 1999 to 2003 | always the best portuguese team |
| 2000 | 2nd place out of 24 teams from 4 countries |
| Maratona Inter-Universitária de Programação (MIUP) | |
| 2001 | 1st place out of 21 teams, FCUP, Porto |
| 2002 | 1st place out of 33 teams, FCUL, Lisbon |
| 2003 | 1st place out of 32 teams, Univ. Minho, Braga |
| University of Porto Programming Contest (CPUP) | |
| 2000 | 1st place out of 18 teams |
| 2001 | 1st place out of 24 teams |
| 2002 | 1st place out of 18 teams |
| 2003 | 1st place out of 20 teams |
| National Logical and Functional Programming Contest (CENPLF) | |
| 2003 | 1st global place (open division) out of 15 teams (Univ. Évora) |
| 2004 | 1st global place (open division) out of 17 teams (IST, Lisbon) |
| 2005 | 1st global place (open division) out of 24 teams (ESTG, Bragança) |
| Ciber-Rato (Cyber-Mouse) virtual robot contest | |
| 2002 | 1st place out of 13 teams |
| 2003 | 1st place out of 14 teams |
| 2005 | 2nd place out of 10 teams |
Problem discussion sessions
- 2016MIUP'2016 Problems Discussion Session pdf
- 2015MIUP'2015 Problems Discussion Session
- 2014MIUP'2014 Problems Discussion Session
- 2013MIUP'2013 Problems Discussion Session html
- 2012MIUP'2012 Problems Discussion Session html
- 2011MIUP'2011 Problems Discussion Session html
- 2009MIUP'2009 Problems Discussion Session html
- 2008MIUP'2008 Problems Discussion Session html
- 2007MIUP'2007 Problems Discussion Session html
- 2006MIUP'2006 Problems Discussion Session html
- 2005MIUP'2005 Problems Discussion Session html
List of my problems
This is a list of some of my online available problems that were used on real programming competitions. I also contributed to many other contest problems (either on ideas, problem statement or solutions) and I have authored dozens of other problems used in several types of courses.
No problems match.