Bigger Sokoban 40k
Time limit1sMemory limit1024 MB
Build a Bigger Sokoban grid with one 2x2 box and one 2x2 storage area that takes at least 40,000 moves to solve.
- Level
Hard9 of 10
- Topics
- Implementation, Simulation
- Solved
- No attempts yet
Problem
Sokoban is a famous puzzle game. The player moves around in an grid and pushes boxes onto storage locations.
Bigger Sokoban is a variation of Sokoban where the boxes and storage locations are larger than . This problem uses for both.
The rules of Bigger Sokoban are the same as Sokoban. Each square in the grid is either empty or a wall. Some areas of empty squares each contain one box, and some areas of empty squares are each marked as a storage location.
The player moves up, down, left, or right to adjacent empty squares. The player cannot pass through walls, boxes, or the outside of the grid. If the player tries to move into a box, the box is pushed one square in that direction. A box cannot be pushed into another box, a wall, or outside the grid, and boxes cannot be pulled. The number of boxes equals the number of storage locations. The puzzle is solved when every box is on a storage location.
Your task is to build a Bigger Sokoban grid that requires at least 40,000 moves to solve. The grid must satisfy these constraints:
- .
- The grid contains exactly one box and one storage location.
- The player, the box, and the storage location do not overlap.
Input
There is no input for this problem.
Output
Print two space-separated integers and on the first line. They give the size of the grid.
On each of the following lines, print a string of length that describes one row of the grid. Each string consists of ., #, P, B, and S, which mean an empty square, a wall, the player, a box, and a storage location, respectively.
The grid must contain exactly one P, exactly four B, and exactly four S. The B characters must form one square, and the S characters must form one square. The grid must be solvable.