ENIGMA-0x03 (2025) - S2 Put the Robot on the Track

View as PDF

Submit solution

Points: 100 (partial)
Time limit: 1.0s
Memory limit: 64M

Author:
Problem types
Allowed languages
Blockly, C, C++, Java, Pascal, Python

Put the Robot on the Track

The RoboCup, the largest global robotics competition, has started to become known in Greece, and this couldn't leave Totos unaffected.

Out of all the events, Rescue Maze is definitely his favorite, and that's why he has thrown himself into the work so he can have his robot ready by the qualifiers!

However, there is one problem—something completely obvious to anyone who has been involved in the competition: you must never mix up the coordinates of the track.

No more words are needed, the coach is strict, and Totos's only hope to succeed is for us to help him with a computer program that converts the coach's instructions about the track dimensions and the robot's initial position R into a clear ASCII representation :-)

Example
1st

Input (STDIN)

2 2
1 2

Output (STDOUT)

+---+---+
|   | R |
+---+---+
|   |   |
+---+---+
2nd

Input (STDIN)

3 4
2 1

Output (STDOUT)

+---+---+---+
|   |   |   |
+---+---+---+
| R |   |   |
+---+---+---+
|   |   |   |
+---+---+---+
|   |   |   |
+---+---+---+

Comments

There are no comments at the moment.