其他分享
首页 > 其他分享> > Codeforces Round #597 (Div. 2) E. Hyakugoku and Ladders 概率dp

Codeforces Round #597 (Div. 2) E. Hyakugoku and Ladders 概率dp

作者:互联网

E. Hyakugoku and Ladders

Hyakugoku has just retired from being the resident deity of the South Black Snail Temple in order to pursue her dream of becoming a cartoonist. She spent six months in that temple just playing "Cat's Cradle" so now she wants to try a different game — "Snakes and Ladders". Unfortunately, she already killed all the snakes, so there are only ladders left now.

The game is played on a 10×10 board as follows:

At the beginning of the game, the player is at the bottom left square.
The objective of the game is for the player to reach the Goal (the top left square) by following the path and climbing vertical ladders. Once the player reaches the Goal, the game ends.
The path is as follows: if a square is not the end of its row, it leads to the square next to it along the direction of its row; if a square is the end of its row, it leads to the square above it. The direction of a row is determined as follows: the direction of the bottom row is to the right; the direction of any other row is opposite the direction of the row below it. See Notes section for visualization of path.
During each turn, the player rolls a standard six-sided dice. Suppose that the number shown on the dice is

标签:Hyakugoku,square,597,ladder,Codeforces,ladders,player,tile,row
来源: https://www.cnblogs.com/qscqesze/p/11788232.html