Your solution will be tested on several test cases. Each subtask will be graded separately, and you will get the points for the subtask if your solution passes all tests. You can send multiple solutions for a task, and your final score is the highest score among them.
When you submit a solution for grading, the result for each test case is one of the following:
- WRONG ANSWER
- TIME LIMIT EXCEEDED
- OUTPUT LIMIT EXCEEDED
- RUNTIME ERROR (for example, memory limit exceeded or unhandled exception)
The largest allowed size of a source code is 128 kB.
The C++ compiler is g++ 7.3.0 with flags
-std=c++11 -O2 -Wall.
The Java compiler is OpenJDK 10.0.2.
The Pascal compiler is Free Pascal Compiler 3.0.4.
The Python interpreters are Python 2.7.15 and Python 3.6.6.