Problem C
Þarasöfnun
Languages
en
is
Yet again certain unnamed individuals within KFFÍ are trying to make easy cash and they heard from their engineer friends that anything with sustainable or futuristic in the title gets plenty of grants these days. With this in mind one of them had the idea of building a kelp harvesting robot. Of course they later realized that this was not such an easy task, especially when they had to herd some engineers to actually build the robot itself. This herding went so badly that they completely forgot to finish programming the robot.
Sensors have been placed in the sea where the kelp grows, so
the only thing that needs to be done is to get the bot to the
right location to harvest the kelp when the sensors send a
message. The growing plot can be modeled as a
Input
The first line of the input contains two positive integers
Output
Print the time of harvest and location in the same format as the input each time a batch of kelp is harvested, in the order they get harvested.
Scoring
Group |
Points |
Constraints |
1 |
20 |
|
2 |
20 |
|
3 |
20 |
|
4 |
40 |
|
Sample Input 1 | Sample Output 1 |
---|---|
5 10 1 1 3 6 |
7 3 6 |
Sample Input 2 | Sample Output 2 |
---|---|
10 10 4 1 2 6 2 7 7 3 8 8 4 0 8 |
7 2 6 12 7 7 13 8 8 21 0 8 |
Sample Input 3 | Sample Output 3 |
---|---|
9 9 4 2 0 6 4 0 5 10 0 8 11 4 4 |
7 0 5 8 0 6 12 0 8 16 4 4 |
Sample Input 4 | Sample Output 4 |
---|---|
5 5 3 0 3 4 0 3 3 0 4 3 |
3 3 3 4 3 4 5 4 3 |