CONTEST

4° Maratona UFFS

Instructions

ATTENTION!

When at one hour to the end of the contest, the scoreboard shall be FROZEN, but for a while you are still going to receive the results of your submissions.

When at half an hour to the end of the contest, the contest shall enter in BLIND MODE, which means that the judge is going to be shut down, the submissions are going to remain in queue and to be judged only after the end of the contest.

INPUT

1. The input must be read from standard input.
2. The input contains only one test case, but multiple inputs are used for judging the submissions. However, a test case can ask for more than one queries. Each test case is described using a number of lines that depends on the problem.
3. When a line of data contains several values, they are separated by single spaces. No other spaces appear in the input. There are no empty lines.
4. Every line, including the last one, has the usual end-of-line mark.
5. The end of input is indicated by the end of the input stream. There is no extra data after the test cases in the input.

OUTPUT

1. The output must be written to standard output.
2. The result of each test case must appear in the output using a number of lines that depends on the problem.
3. When a line of results contains several values, they must be separated by single spaces. No other spaces should appear in the output. There should be no empty lines.
4. Every line, including the last one, must have the usual end-of-line mark.
5. After the output of all test cases, no extra data must be written to the output.

Register to start solving the problems in this contest.