100+ Free OBI Practice Questions
Prepare for the Olimpíada Brasileira de Informática exam with instant access — no signup required.
Loading practice questions...
Explore More Brazilian Academic Olympiads
Continue into nearby exams from the same family. Each card keeps practice questions, study guides, flashcards, videos, and articles in one place.
Key Facts: OBI Exam
Governing Body
Official Website
Exam Fee
Competition Tracks
Competition Phases
Supported Languages
International Pathway
University Admission
The OBI is Brazil's premier national informatics competition organized by SBC and IC-UNICAMP, fully free of charge across three elimination phases. It tests logical deduction, discrete structures, graph theory, dynamic programming, and computational complexity. This practice bank delivers 100 high-yield multiple-choice questions modeled after official OBI and IOI syllabi.
Sample OBI Practice Questions
Try these sample questions to test your OBI exam readiness. Each question includes a detailed explanation. Start the interactive quiz above for the full 100+ question experience with AI tutoring.
1In competitive programming problems requiring the Next Greater Element (NGE) for every element in an array of size N, which data structure and strategy achieves an optimal overall time complexity of O(N)?
2In a directed graph where every edge weight is either 0 or 1, which algorithm finds the single-source shortest path to all vertices in O(V + E) time without the logarithmic overhead of standard Dijkstra?
3When implementing a Disjoint Set Union (DSU / Union-Find) data structure with both path compression and union by rank (or size), what is the amortized time complexity per find/union operation?
4Which of the following statements is TRUE regarding an in-order traversal (percurso em ordem) of a valid Binary Search Tree (BST) containing distinct integer keys?
5What is the time complexity of building a Binary Heap (Build-Heap) from an arbitrary unsorted array of N elements using Floyd's bottom-up heapify algorithm, compared to inserting elements one by one into an initially empty heap?
6A standard Segment Tree is constructed over an array of size N to support point updates and range sum queries. What are the space requirement (array size) and time complexity per point update?
7Why is Lazy Propagation (propagação preguiçosa) essential when supporting range addition updates on a Segment Tree in competitive programming?
8In a 1-indexed Fenwick Tree (Binary Indexed Tree / BIT) of size N, which bitwise expressions are used to update index `i` (adding value `v`) and compute the prefix sum up to index `i`?
9A competitive programming problem specifies a graph with V = 100,000 vertices and E = 200,000 directed edges. Why must an Adjacency List be chosen instead of an Adjacency Matrix?
10Given an unweighted connected graph with V vertices and E edges, what is the time complexity of Breadth-First Search (BFS) to compute the shortest distance (in terms of number of edges) from a single source to all vertices?
About the OBI Exam
The Olimpíada Brasileira de Informática (OBI) is Brazil's official national computer science and informatics competition, organized jointly by the Sociedade Brasileira de Computação (SBC) and the Instituto de Computação da Universidade Estadual de Campinas (IC-UNICAMP). Established in 1999, the OBI stimulates interest in computer science and algorithmic problem-solving among Brazilian youth from primary school through first-year university undergraduate levels. The competition comprises two main modalities: Modalidade Iniciação, which emphasizes computational thinking, discrete logic puzzles, state-machine tracing, and combinatorial invariants on paper without writing code; and Modalidade Programação, which tests competitive programming and software implementation across C, C++, Java, and Python under strict execution time (typically 1.0–2.0 seconds) and memory limits (typically 256–512 MB). The OBI serves as the sole official qualifying pipeline for Brazil's national team at the International Olympiad in Informatics (IOI) and the Ibero-American Competition in Informatics (CIIC). Top performers also qualify for direct university admission through Olympic quota seats (Vagas Olímpicas) at premier Brazilian research universities including UNICAMP, USP, and UNESP. (Note: While official OBI competitions require written logic proofs or source code submissions executed against judge test suites, this 100-question bank serves as an intensive multiple-choice study adaptation covering all core syllabus competencies.)
Assessment
Modalidade Iniciação: 15–20 logic tasks (Levels Júnior, 1, 2). Modalidade Programação: 3–5 coding tasks per phase across 3 progressive phases (Fase 1 Local, Fase 2 Estadual, Fase 3 Nacional). This 100-question study bank covers all 5 primary syllabus categories.
Time Limit
2 to 5 hours per competition phase
Passing Score
Phase cutoff score thresholds established by the OBI Scientific Committee
Exam Fee
Free (Gratuito) (Sociedade Brasileira de Computação (SBC) & IC-UNICAMP)
OBI Exam Content Outline
Algoritmos e Estruturas de Dados
Core and competitive programming data structures and graph algorithms: arrays, linked lists, stacks, queues, monotonic deques, priority queues (binary heaps), Disjoint Set Union (DSU / Union-Find), Binary Search Trees (BST), Segment Trees (point/range queries and lazy propagation), Fenwick Trees (BIT), Sparse Tables (RMQ), graph representations, BFS, DFS, cycle detection, Topological Sorting, Dijkstra, Bellman-Ford, Floyd-Warshall, Kruskal, Prim, and Articulation Points / Bridges.
Técnicas de Projeto de Algoritmos
Algorithmic paradigms and problem-solving patterns: Greedy algorithms (greedy-choice property, interval scheduling, fractional knapsack), Dynamic Programming (1D/2D DP, 0/1 knapsack, unbounded knapsack, Longest Common Subsequence, Longest Increasing Subsequence in O(N log N), interval DP, bitmask DP, digit DP, tree DP), Divide and Conquer (Merge Sort, inversion counting, Quickselect), Binary Search on Answers (monotonic feasibility functions), Two Pointers, Sliding Window, Prefix Sums, Difference Arrays, and Backtracking with pruning.
Análise de Complexidade e Otimização
Asymptotic analysis and computational performance optimization: Big-O, Big-Omega, Big-Theta formal definitions, Master Theorem for divide-and-conquer recurrences, nested loop analysis, harmonic series bounds, space complexity and recursion call stack depth, amortized analysis (vector doubling), and execution time/memory limits on competitive programming judges (10^8 operations/second, 256MB limits, fast I/O in C++).
Raciocínio Lógico e Iniciação
Foundational discrete logic, computational thinking, and paper-based problem solving: propositional logic, truth tables, contrapositive and negation, invariants and parity arguments, the Pigeonhole Principle (Princípio da Casa dos Pombos), combinatorial games (Nim, subtraction games, Sprague-Grundy theorem), state machine / automaton tracing, flowcharts, variable execution tracing, loop invariants, and puzzle deduction.
Matemática Computacional e Teoria dos Números
Computational mathematics, number theory, and string algorithms: fast modular exponentiation (binary exponentiation), Euclidean and Extended Euclidean algorithms (GCD, Bézout coefficients, modular inverse), Fermat's Little Theorem, Sieve of Eratosthenes, bitwise tricks and low-bit isolation (LSB), prime factorization, number of divisors, Euler's totient function, Chinese Remainder Theorem, matrix exponentiation for linear recurrences, polynomial rolling hash, and Knuth-Morris-Pratt (KMP).
How to Pass the OBI Exam
What You Need to Know
- Passing score: Phase cutoff score thresholds established by the OBI Scientific Committee
- Assessment: Modalidade Iniciação: 15–20 logic tasks (Levels Júnior, 1, 2). Modalidade Programação: 3–5 coding tasks per phase across 3 progressive phases (Fase 1 Local, Fase 2 Estadual, Fase 3 Nacional). This 100-question study bank covers all 5 primary syllabus categories.
- Time limit: 2 to 5 hours per competition phase
- Exam fee: Free (Gratuito)
Keys to Passing
- Work through all 100 available questions
- Review every answer and explanation
- Track weak areas and revisit them
- Use our AI tutor for tough concepts
OBI Study Tips from Top Performers
Frequently Asked Questions
What is the Olimpíada Brasileira de Informática (OBI) and who organizes it?
The OBI is Brazil's official national informatics and computer science olympiad, organized jointly by the Sociedade Brasileira de Computação (SBC) and the Instituto de Computação da Universidade Estadual de Campinas (IC-UNICAMP). It serves as the primary academic pathway for Brazilian students to excel in computational thinking and qualify for international tournaments like the IOI.
What are the two main modalities of the OBI competition?
The OBI features two modalities: Modalidade Iniciação (Levels Júnior, 1, and 2), which focuses on discrete logic puzzles, computational thinking, and paper-based problem solving without code; and Modalidade Programação (Levels Júnior, 1, 2, and Sênior), where students write code in C, C++, Java, or Python to solve algorithmic challenges evaluated by an automated judge.
How are phases structured and how do participants advance?
The OBI takes place in three progressive phases: Fase 1 (Local / School level), Fase 2 (Estadual / State level), and Fase 3 (Nacional / National Finals). Students who achieve scores above the designated phase cutoffs determined by the OBI Scientific Committee advance to subsequent rounds. Top national medalists are invited to the UNICAMP training camp (Semana Olímpica).
Which programming languages and compilers are supported in Modalidade Programação?
Modalidade Programação supports C, C++ (C++17/C++20), Java, and Python 3. Submissions run inside a sandboxed Linux environment with strict CPU execution time limits (typically 1.0 second) and memory caps (typically 256 MB), where solutions must execute correctly on all hidden test cases to earn full points (0–100 per problem).
How does the OBI connect to the International Olympiad in Informatics (IOI) and university admissions?
The top-performing high school students in Modalidade Programação Nível 2 are invited to intensive training courses at UNICAMP. From this pool, the four-member Brazilian National Team is selected to represent Brazil at the IOI and CIIC. Furthermore, OBI medalists can gain direct admission to leading Brazilian universities (such as UNICAMP, USP, and UNESP) via Olympic quota admission systems (Vagas Olímpicas) without sitting for traditional entrance exams (Vestibular).
Is there any registration or participation fee for the OBI?
No. The Olimpíada Brasileira de Informática is 100% free of charge (Gratuito) for all participating primary, secondary, and higher-education schools and students across Brazil, supported by public academic institutions and sponsor partnerships.