Competitive Programming

In the last week of March / 2022 will happen the Brazilian final of the SBC Programming Marathon. beecrowd is the official sponsor of this event! Taking advantage of this Marathon climate, our text today is about Competitive Programming. These competitions are super important in a programmer's career. Read how it works!

Human beings are competitive by nature. It is said that competition has been in our DNA since the stone age (competition for food) and that it is part of our survival and evolution.

It is very common for us to follow competitions in the Olympics, Super Bowl and in the Soccer World Cup. They are the most widespread and well-known competitions. But there are other types of competitions, which do not involve physical effort and competitors do not necessarily depend on their physical condition. In these competitions, the indispensable item is the power of reasoning. Among them, we can mention the high school Olympiads (mathematics, computer chemistry) and higher education (programming marathon for those studying Computer Science and similar courses).

These events are characterized by competitive programming, that is, programming in a competitive environment. The team that solves the highest number of problems in a specified amount of time, using a programming language and according to the specifications provided, wins. In case of a tie, the team that took less time to solve the problems wins.

By the way, speaking of competitive programming, we are close to the date of the grand finale of the XXVI Brazilian Programming Marathon. In March of this year, the 60 best teams in Brazil (comprising 3 competitors each) that have been approved in the first phase will compete (about 800 teams from numerous universities competed in the first phase). This competition will be held in Gramado-RS and the same event will take place simultaneously in several other Latin American countries. The best qualifiers earn, as a reward, the possibility of participating in the event’s World final. For those who are students of Computer Science, there is certainly no other event of greater importance and with such a wealth of learning. In addition to personal qualification, there is also the experience of an unforgettable trip.

An interesting tip is that students who choose to participate in these competitions are usually the most sought after by companies, as competitive programming encourages them to seek additional knowledge to solve problems and provides the experience of working in groups under pressure. Just as athletes must exercise and obtain physical conditioning, we can see these competitions as a way for academics to exercise their brain and better prepare themselves for the job market, managing to apply non-trivial solutions and different ways of approaching and solving problems when they are facing real challenges within a company.

The beecrowd portal has over two thousand three hundred problems typical of programming competitions, in a format very similar to the problems available in the Brazilian Olympiad of Informatics (OBI) and Programming Marathon. By the way, for those who want to train, all the problems from the previous editions of the OBI and the Programming Marathon (elimination phases and final phases) are available on the portal. There are also many problems from regional competitions (such as the Mineira’s Marathon) and from the Winter and Summer schools Marathon (preparatory events for the competing teams). These problems are excellent for programmers to further develop algorithms and improve their programming techniques.

This year, beecrowd will be the official sponsor of the final of the Programming Marathon (Latin American qualifier for the world final) and we usually mirror the competition on the same date as the official race. This means that, if your team was left out of the finals, you can try to solve the same problems that qualified teams will be solving in Gramado-RS. The event on the portal (beecrowd) usually starts few hours after the official event. Just use the link https://beecrowd.com/ , to register, log in and access the CONTESTS tab to find the contest. We will let you know when the contest will be available at our platform.

Finally, just to know the details of a competition. The contest takes 5 hours (both the first and final phases). Usually, 8 to 13 problems of varying subjects and complexities are made available to teams (the finals usually mix some subjects in certain questions in addition to requiring excellent logical thinking). These problems range from very simple problems that usually the best teams spend a few minutes to solve to very complex problems, which few teams in Latin America can solve.

To illustrate a little and explain some details, follow the score of a competition.

This was an individual competition, and the competition is over (time 00:00 to resolve). There was a total of 13 problems, but the competitor who won solved 9 of them. The gray square indicates the contestant who was the first of all to submit a correct solution to the problem (e.g. problem C for contestant 2). Also, the number in the circles indicates the number of times the competitor submitted a given solution until he got the problem right (competitor 1 submitted 4 times problem B and 1 time problem A, for example).

It is also interesting that each wrong submission adds a penalty to the total resolution time and the number below the problem indicates the time of the contest that the competitor managed to get the right solution. For example, competitor 3 solved problem A in the 112th minute of the contest, that is, just before reaching 2 hours from the start of the contest. These times are tiebreakers. For example, although the second and third places solved 8 problems, the second place solved them in a much shorter time. Problems with the white color indicate that the competitor failed to get it right. For example, the first competitor submitted problem I 10 times without success. In any case, this time is not computed (when the competitor does not get the problem right).

Below is also a photo of a Programming Marathon National Final event. This image is from the 2012 National Final, and took place in Londrina, PR, Brazil. Each balloon indicates a challenge solved by the teams.

Follow our blog and social networks for more information about this year’s Programming Marathon final.

Do you like our content? So, follow us on social media to stay on top of innovation and read our blog.

Author: Neilor Tonin is the Chief Academic Officer at beecrowd. He is also a professor and coordinator responsible for the areas of Computer Engineering and Computer Science at a large Brazilian university. Neilor is an active member of the committee responsible for organizing the Brazilian Olympiad in Informatics (OBI), the Brazilian chapter of the International Olympiad in Informatics (IOI).

CONTENT

Our Latest Articles
Read about the latest trends in technology
blog ai
Intelligent refactoring, powered by AI, transforms the code refactoring process, making it...
Blog trends
APIs continue to evolve, and by 2025, new trends promise to transform...
Blog doc
Code documentation is crucial for understanding and maintaining software projects. Keeping this...

Extra, extra!

Assine nossa newsletter

Fique sempre atualizado com as novidades em tecnologia, transformação digital, mercado de trabalho e oportunidades de carreira

Would you like to speak with a Sales Representative?

Interested in:

Unlocking the Potencial of LATAM Tech Talent: Nearshoring Opportunities to Drive Innovation