#P67. [Extended Problem] Boxes+
[Extended Problem] Boxes+
Source
This problem is adapted from Long Long OJ. All rights reserved.
Attention
This problem has an easier version:
Problem Description
It is believed that everyone is familiar with the rules of Sokoban:
- The map contains several walls (the area outside the map boundary is also regarded as a wall), several boxes, an equal number of targets, and one player;
- If an adjacent cell is an empty space, the player can move into it;
- If an adjacent cell is a box and the next cell in that direction is an empty space, the player can move one step in that direction and push the box one step forward;
- Both movement and box pushing are in four directions (up, down, left, right);
- The player wins when all boxes are on the targets.
Now, please construct a Sokoban puzzle with a size limit of , with exactly one box, and make the number of steps in the optimal solution as large as possible (but not unsolvable).
If the minimum number of steps to complete your puzzle is , your solution is considered correct.
Scoring Method
You will get 0 points if:
- The number of occurrences of either
Oor*in your answer is not 1; - The Sokoban puzzle is unsolvable;
- The minimum number of steps to complete your puzzle is within steps (excluding steps).
Otherwise, you will get 100 points.
Answer Format
This is an output-only problem.
You need to submit a text file named map.txt.
Your output should be a matrix, where:
#represents a wall;.represents an empty space;Prepresents the player's initial position;*represents the box's initial position;Orepresents the target.
(The player's initial position and the target's initial position cannot overlap.)
An incorrect output example:
###..............###
##................##
#..................#
....................
...P................
....................
....................
.......*............
....................
....................
................O...
....................
....................
....................
....................
....................
....................
#..................#
##................##
###..............###