How Brazilian students prepare for their Olympiad in Informatics
If you are a Brazilian student, we recommend you change the website language to Portuguese, so you get a complete guide on how to prepare yourself for the Brazilian Olympiad in Informatic. For those of you who are only interested in know how we prepare our students, let’s go on 😃
This post is divided in:
What is OBI?
The Brazilian Olympiad in Informatica (in Portuguese Olimpíada Brasileira de Informática - OBI) is a scientific olympiad that aims to instigate the interest of elementary and high school students in the field of computing. Through its annual tests, OBI creates a fun competition among students from all over Brazil, encouraging them to solve logical challenges through programming.
What are the benefits of participating in OBI?
Like all science competitions, OBI encourages students to delve into complex subjects and teaches them to be resilient. Having everything memorized is not enough to face the OBI. You must also be flexible, creative, and innovative to find efficient and brilliant ways to solve the tasks. Moreover, the challenges of studying extensive topics, practising test-taking strategies, improving your emotional intelligence during the competitions, and learning to open your mind to understand new perspectives influence the development of such a trait. No wonder we see Olympic alumni in great careers using their resilience, imagination, and curiosity to impact society positively.
Aside from personal development, the OBI also provides other kinds of achievements, including Olympic medals. Participating in a scientific Olympiad such as the OBI has been valued nationally and even internationally. Brazilian universities such as UNICAMP and USP have already adopted systems of vacancies for Olympic students, and along with these institutions, several universities outside of Brazil also recognize the importance and impact of this competition on the curriculum of their students.
At the end of each year, OBI selects the best students from all over Brazil to participate in the Olympic Week at UNICAMP. This event consists of various classes, tours and activities aimed at further integrating the Olympic community. This is a unique opportunity to exchange experiences and meet great people.
During the Olympic Week, there is also the Selection for International Olympiads (for Level 2 Programming students, we will talk about the different levels below). This event consists of four tests during one week to select the best students to participate in competitions such as the International Informatics Olympiad (IOI), the Ibero-American Competition for Informatics and Computing (CIIC) and, more recently, the European Girls’ Olympiad in Informatics (EGOI). In other words, OBI also opens doors for students to go beyond, encouraging them to reach international levels and represent Brazil in other countries.
Basically, the rewards consist of enriching experiences! Meeting people who are passionate about the same subject as you, winning medals, being recognized nationally and even internationally, travelling to new places, experiencing other cultures, having fun learning exciting contents, and developing yourself. Students do improve personally, socially and intellectually by participating in OBI!
What are the contents of the OBI?
OBI is divided into two main categories: Initiation and Programming. Each of these categories is divided into multiple levels: Junior Level, Level 1, and Level 2 (in the programming category, we also have Senior Level).
The type of content is different in each category. In the Initiation category, practising logical and analytical skills is enough to solve the required problems. However, in the Programming category, it is necessary to learn more extensive content such as data structures, algorithms, and code complexity analysis.
Below you can see the contents required in the different levels for the programming category of the exam.
|J||This topic can be covered from Junior Level on.|
|N1||Topic that can be covered from Level 1 and above.|
|N2||Topic that can be covered from Level 2 onwards (in Senior Level, the same topics as in Level 2 can be present).|
|S||Topic that can be covered in the Selection for the IOI|
- Basic Concepts of Arithmetic and Geometry
- [J] Integers, operations and comparisons.
- [J] Basic properties of integers (sign, parity, divisibility, etc).
- [J] Fractions.
- [J] Line, line segment, angle, triangle, rectangle, square, circle.
- [J] Euclidean distance.
- [J] Pythagorean theorem.
- [J] Prime numbers.
- [N1] Point, vector, coordinates in plane.
- [N2] Basic modular arithmetic: addition, subtraction and multiplication.
- [N2] Polygon (vertex, edge, convex, area).
- [N2] Operations with matrices (addition, multiplication, and exponentiation).
- Basic concepts of Discrete Mathematics
- [J] Graphs and trees concepts
- [J] Trees and their basic properties, rooted trees
- [J] Directed and undirected graphs
- [J] Degree, path, cycle, connectivity
- [N1] Graphs with weights, colors or ratings on edges or vertices.
- [N2] Simple operations on integers of arbitrary size.
- [N2] Brute-force algorithms and dynamic programming using bitmasks.
- [N2] Matrix exponentiation to solve dynamic programming problems.
- [S] Quickselect to find the k-th smallest element
- Algorithms on graphs
- [J] Searching graphs with breadth search and depth search
- [N1] Minimal path algorithms (Dijkstra, Bellman-Ford, Floyd-Warshall)
- [N1] Finding connected components.
- [N1] Topological sorting.
- [N1] Minimal spanning trees
- [N2] Euler path/cycle finding
- [S] Set of independent edges in a bipartite matching graph in O(VE).
- Data structures
- [J] Not required, but very useful to know STL using C++
- [J] Stacks and queues
- [J] Linked lists
- [J] Graph representation.
- [J] Static binary search tree
- [N1] Binary heap
- [N1] Disjoint sets: Union-find.
- N1] 1D binary indexed Fenwick tree
- [N1] Lowest common ancestor: algorithm for answering queries in O(logN)
- [N2] 2D binary indexed tree
- [N2] Segment tree
- [S] Persistent data structures
- [S] Partition into buckets of size √N (square root decomposition).
- [S] Balanced binary search trees (Treaps, splay trees, etc)
- [S] 2D segment tree
- [S] Tries.
- Computational geometry
- [N1] Points, vectors, lines and line segments
- [N1] Collinear points, parallel and orthogonal vectors.
- [N1] Intersection of two lines
- [N2] Coordinate compression
- [N2] Convex hull in O(NlogN)
- [N2] Line sweep.
- [S] Calculate area of a polygon.
- [S] Check if a polygon contains a point.
We know that the content list is huge, and learning all this content and preparing to take the exam is not an easy task. Therefore, in this post, we will show strategies on how, where and when to study these subjects.
How are the OBI exams organized?
Regardless of the level and modality, the OBI exams are organized in 3 phases: local, state and national. In each phase, the best-placed students are invited to the next phase.
For Initiation students, the three phases are composed of 1-hour-long tests.
Meanwhile, in the Programming category, the local and state phases are composed of 2-hour tests. The national phase comprises 3-hour tests for Junior Level, 4-hour tests for Level 1, and 5-hour tests for Level 2 and Senior Level.
What to learn first and where to start studying?
We have created some strategies that students can address during their learning journey. The strategies depend on the student level of logic and previous experience with subjects such as mathematics, their knowledge of programming, and their familiarity with the types of websites and online judges (sites where you can submit your code and practice exercises).
For the beginner students
For students who are just starting out on their OBI journey (students classified as Junior Programming level or students who are just starting to code and do not have a lot of familiarity with the content), we have distributed their study journey into two parts :
The first step is to learn the basics of computer programming, so we strongly recommend them to start studying the basic programming course. If they are a complete beginner we recommend them the course Computer 101, this is a very basic course. The content of the first 3 or 4 lessons is probably very well known, but don’t worry, it gets pretty interesting afterwards 😉. After this course, beginner students go to the Introduction to Programming course to learn how to actually program.
In these courses, students learn how to download compilers (tools needed to run your code), understand basic programming concepts and create your code from scratch. More precisely, with these classes, they cover fundamental topics such as:
- repetition structures (for and while);
- conditional structures (if)
After each class, there is always a shortlist of exercises, and we encourage students to solve them to master the content and become familiar with the Judge. The courses teach them how to submit solutions and interact with the Judge, but it is very simple, and we can teach it to you here too. There is always a space to put your code on the page of the exercises you want to solve. This space might be hidden, but just look for a button that says “Submit”, “Submit Solution” or something that means something like that, and it will appear. After you put your code in it, just submit it and see if your program is correct. The Judge is a computer program that will evaluate your code and give you feddback in real-time. The Judge at Neps is similar to the Judge used during the OBI exam.
Now that students know basic programming after learning the initial content, they can continue to learn using Neps Academy.
Before we proceed, we need to explain about the PRO subscription here at Neps. The PRO subscription is a monthly or yearly fee where you contribute to the site and help us maintain the platform and create even more quality content. If you are planning to dedicate yourself to study for the OBI or other programming competition this year, we strongly recommend that you subscribe to the PRO version. If you can evolve more in less time, you have a big advantage over the other competitors. With the PRO features, you will have access to the advanced courses and several features that will greatly accelerate your learning, such as tutorials for the programming exercises and creating virtual exams for example.
So, after beginner students have subscribed to the PRO plan, it is simple to continue studying. We recommend they just follow the order of the courses on the Courses page.
- Basic Data Structures;
- Programming Techniques;
- Computational Graphs;
- Computational Math is working in progress and should be launched soon.
Some lessons during the courses refer to the content from the Object Oriented Programming course, although ideally, it is important to take this course before the above courses, it is not essential to understand most of the content.
If you plan to take a Computer related course in college, we advise you to take the Object Oriented Programming course before the above courses. If you are not sure what to take, you can skip it and go back just to understand the topics needed. There are references to the topics needed to understand the lesson in each lesson.
To intermediate students
We classify intermediate students as those who already have the knowledge background of beginner students and have acquired some programming experience. Examples include students who are at Level 1 of the OBI programming modality or students who have already completed the study journey for beginner students recommended by Neps.
As these types of students already have some experience, we only recommend continuing to study topics from the syllabus and practice exercises constantly. Again, if they have subscribed to the PRO plan, they can just continue following the courses in the order presented on the courses page.
Since some topics can be more advanced, it is normal not to understand the lessons or the codes at first, so it is important not to get frustrated. Reviewing the lessons, talking to friends, or even discuss questions with the Neps community on Neps Academy Discord are some good strategies to understand the topics better. Also, as intermediate students have more experience, we also recommend looking for other sources of study in these situations. So, if you consider yourself as an intermediate student or have similar experience compared to them, we recommend you to do the following things:
- Look for the book Competitive Programming 3 or 4 and the Guide to Competitive Programming to improve your understanding of algorithms and data structures;
- Use the website Codeforces to search for exercises on the subject you are having difficulty with and look at other people’s code. This may help you to understand the subject in another way. In addition, Codeforces have blogs on specific subjects that may clarify certain doubts. In this link there are only a few of these blogs, but we encourage you to explore the site on your own as well;
- Explore CP-Algorithms. On this site, there is a lot of material explained with theories and code. In addition, it has good recommendations for exercises to practice the content taught at the end of each post;
For the advanced students
We believe that advanced students are those who are at Level 2 of the Programming category and already have plenty of experience with competitive programming. They have already mastered much of the subject matter, if not all of the subject matter, covered for Junior Level and Level 1 of Programming category.
For advanced students, the only important tip we can reinforce is: solve as many programming exercises as you can. At this stage, the difference between students who have practised several exercises and students who have only solved a few exercises increases a lot because it is unlikely that someone will master several complex subjects by programming each new algorithm or technique only once. It is necessary to develop a lot of familiarity with both code and ideas. Therefore, later in this post, we will show how and where to efficiently train all the subjects and ideas one have learned along the way.
How to train for OBI (and other competitive programming exams)?
Three important aspects are tested in students during OBI exams: their baggage of knowledge in competitive programming subjects, their ability to implement code, and their creativity in solving problems. Thus, developing these three characteristics in a balanced way is the key to training and preparing for OBI.
To achieve this, we recommend OBI students, and also you who wants to become better at competitive programming, to do the following strategy:
Choose a topic at your level that you don’t know yet and study it by reading tutorials and lessons, visiting the recommended websites.
Once you understand the subject, the best way to fix it in your head is to do exercises. Start with the basic exercises and gradually increase the difficulty. This way, you will be learning to master a new subject while practising your code implementation skills. It is something crucial during the OBI and other competitive programming exams because you not only need to know how to solve problems, you also need to know how to translate your idea into a program).
We also recommend that you don’t stick just to one content during your journey and solve random exercises in parallel. They can be on subjects you have already seen, or they can be problems with ingenious tiny ideas that you have never seen before but have the ability to solve or learn something from them. In this way, you will keep your mind sharp through these constant challenges.
When you feel confident about the main subject, simply select a new subject and start the learning cycle all over again.
You will find the exercises categorized by subject on the Subjects page here at Neps.
We have seen that solving exercises is essential for fixing material, improving code implementation and keeping your brain active, so we recommend that you practice and have lots of fun at the following sites:
- Neps Academy - On Neps there are several types of exercises divided by difficulty (in exercises), exercises from past OBI (in sources and exercises categorized by subjects). All kinds of students can learn something from the large number and diversity of problems accessible.
- URI - URI is a Brazilian judge, great for training too. Like Neps, it has a wide variety of exercises divided into major topics and difficulty levels graded from 1 to 10. We recommend using it to practice exercises constantly. URI is a great source to expand your amount of solved problems.
- SPOJ - SPOJ is another Judge widely used by students who study for OBI, especially the Brazilian version, which has many problems from past Brazilian competitions. Like the other sites, SPOJ has several problems and can be another option to look for interesting problems.
- Codeforces - Codeforces is one of the most famous sites for competitive programming, which also has a large variety of exercises divided by topics and difficulty. Due to its weekly contests it is an excellent place to solve the parallel exercises and keep your mind sharp.
- CSES - CSES is an excellent place to fix a subject and learn classic problems from it. The statements of the exercises are very clear and succinct. However, due to the difficulty of the problems, we recommend that only intermediate or advanced students start using it.
- OJ.uz - OJ.uz is perfect for simulating and solving past international exams, such as the IOI, BOI, CEOI, APIO, and others. However, we recommend its use only for advanced students due to the serious difficulty of the problems.
- There are other sites in English for very experienced intermediate or advanced students to explore if they wish : Kattis, Codechef, DMOJ and AtCoder.
Simulating a competition
Finally, we recommend that OBI students and you simulate competitions to train under time pressure.
Students can select an OBI from previous years at the level they are preparing for, separate the problems, set the timer and start solving the exercises. Only at the end of the time should you send your submissions to the Judge. That is precisely how it will happen in the official exam.
If you have a PRO subscription, just select the exam you want to simulate and click the Simulate button. The Neps will take care of creating a competition for you with all the OBI rules, plus you can invite friends to join and train with you (even if they do not have a PRO membership), just click the Show Password button on the competition page and share the ID and password with them. Then they can simply enter their ID and password in the fields on the competition page.
Figure 1 :Choosing a competition to simulate
Figure 2 : Setting up the simulation
Figure 3 : Competition is running
If you would like to show your love for this guide or want to make contributions, please leave your comments below. If you have any questions about the content or want to discuss some problems and ideas, please join the Neps Academy Discord. Don’t be shy to chat or ask questions. There is an entire community there that is passionate about programming and is willing to help and learn together.