Satan Game
Time limit2sMemory limit512 MB
Output a board with N up to 100, M up to 20, and snakes and ladders so the expected number of dice rolls to finish is at least 5e18.
- Level
Hard8 of 10
- Topics
- Probability, Math, Implementation
- Solved
- No attempts yet
Problem
A snakes and ladders game is a well-known dice game. At the start, the piece is off the board. At the start of each turn, roll an -sided die. Each natural number from 1 to comes up with probability . Move the piece forward by the number rolled. If the piece is off the board, it moves to the cell matching the rolled number. If the cell has a snake or ladder, the piece moves to the cell it points to. The game ends when the piece reaches cell . Reaching past cell also counts as finishing.
This problem invites a natural question. "What is the expected number of dice rolls needed to finish?" But we are not solving that problem. We need to build a test case for it.
Create a test case whose answer is 50,000,000,000,000,000,000 or greater.
Input
There is no input.
Output
On the first line, print three natural numbers , , and . is at most 100, is at most 20, and is at most .
On each of the next lines, print the start and end points of one snake or ladder. If the end point is less than the start point, it is a snake. If it is greater, it is a ladder. The start point must be between 1 and , and the end point must be between 1 and . No point may repeat among all start and end points.
The game must be finishable no matter which cell the piece is placed on. This includes placing the piece on a cell that cannot be reached at all, or starting on the start of a snake or ladder without taking it. The condition is hard to make sense of, but this is the Gudegi Cup, so go with it.