- All fires are extinguished
This puzzle can be solved using the following concepts. Practice using these concepts and improve your skills.
A forest fire has broken out! The nearby Fire Station Service asked your help to manage the dispatch of units on the scene.
The Fire Chief sent you the coordinates where the fires are located, you must decide which unit is best to send using the least amount of water possible.
The available units are:
On each turn you'll have to output the unit that should be called in and on which coordinates
The top-left corner has position (0,0). x goes to the right, y increases downwards
To attack an area you must give the top-left coordinate of the 3x3 or 2x2 area you want to attack
- Sending a Canadair to (0;0): C 0 0 will extinguish:
0;0 0;1 0;2
1;0 1;1 1;2
2;0 2;1 2;2
- Sending a Fire Helicopter to (0;0): H 0 0 will extinguish:
- Sending a Smoke Jumpers Squad to (0;0): J 0 0 will extinguish:
The attacking area MUST be inside the forest area, you can't exceed it or you would damage the nearby areas!
All maps are square shaped (L x L)
Huge thanks to eulerscheZahl for helping me with the graphics!
- Your water supplies goes to 0 and you still have fires to put out.
- You do not have enough water to send a specific unit
- You attack an area outside the forest zone
- You do not respond in time or output an unrecognized command.
At the beginning of the game:
Line 1: an int L, the size of one side of the map
Line 2: an int water, the total amount of water availableOn each turn
Line 1: an int N, the amount of fires on the mapNext N lines: The coordinates of each fire in the format fireX fireY
The unit codes are:
JSmoke Jumpers Squad;
0 ≤ fireX < L
0 ≤ fireY < L
N ≤ L*L
A higher resolution is required to access the IDE