Finals - National Informatics Olympiad 2025
Welcome to the final of the National Informatics Olympiad (May 5th, 2025).
- The competition will last 4 hours
- 3 problems will be provided (each with several subtasks)
- The top 8 finalists will advance to the next phase and will then have access to a short training camp (online), at the end of which another test will be given. Together with the final, this competition will determine the 4 students who will represent us at the International Olympiad in Informatics (IOI). From these top 8 the students who will represent us at the Ibero-American Olympiad (OII) and the Western European Olympiad (WEOI) will also emerge (the selection criteria for the OII and WEOI, as well as the dates of the training camp and selection test, will be announced later and agreed upon with the top 8 finalists)
- During the test, you will have access to detailed feedback. This means that you will be able to know exactly the number of points for each submission in the official tests. Additionally, if you click on the submission result, you can see the types of errors you had.
- The score for a problem will be equal to the maximum score obtained by one of your submissions for that same problem
- During the final, you will only be able to see your own score. You will not be able to view the scores of other contestants.
- There are no restrictions on the number of submissions other than a limitation on the time interval between two submissions for the same problem (to ensure that Mooshak can evaluate in a timely manner):
- Between 0:00 and 2:30, you can only make a submission 5 minutes after the last one
- Between 2:30 and 3:30, you can only make a submission 3 minutes after the last one
- Between 3:30 and 4:00, you can only make a submission 1 minute after the last one (during this period, you may not receive the result of your submission before the end of the test: you should continue working and never remain idle waiting for the result of a submission)
- You cannot use any directive in your code that modifies compiler options (e.g., #pragma).
-
If you are Java users, note that the
Scanner
class (for reading input) is inefficient.
Therefore, we provide the
FastScanner
class, whose code is available
here. You can
use this class as you would use the Scanner
class and
you do not need to include its code in your submission, as our
Java compiler already includes that class.
If you have any questions, please use the Mooshak question system. Do not include any code or
any solution suggestion, your question will be
seen by all contestants. Failure to comply with this rule
may result in disqualification.
Technical Information
Programming Languages
Language |
Compiler |
Version |
Compilation Command |
Extension |
C |
gcc |
8.5.0 |
gcc -Wall -lm |
.c |
C++ |
gcc |
8.5.0 |
g++ -Wall -std=c++2a |
.cpp |
Java |
Java (TM) SE Runtime Environment |
1.8 |
javac |
.java |
Python |
CPython |
3.6.8 |
python3 prog.py |
.py |
Time and Memory Limits
- Global memory limit: 256MB
- Stack memory limit: 256MB
- Source code size limit: 32KB
Problem A |
Problem B |
Problem C |
2 seconds |
2 seconds |
2 seconds |
National Finals of ONI'2025
Computer Science Department
Faculty of Sciences, University of Porto
(May 5th, 2025)