HBC213430细胞游戏XTL'sChessboard(评测)题解

把回忆走一遍 算法基础篇 31 0
挑战自我,勇攀编程高峰!全网最全C++题库,助您成为编程达人。
Xutianli is a perfectionist, who only owns "Good Chessboard". A well-known definition to the Good Chessboard is that there exists two integers u,v which satisfies ux+vy=1+u+v, with the given leng

Xutianli is a perfectionist, who only owns "Good Chessboard". A well-known definition to the Good Chessboard is that there exists two integers u,v which satisfies ux+vy=1+u+v, with the given length x and width y. Once Zjx came to XTL's home and brought a small ball. This ball was originally used to hit XTL, because he always touches fish under the pan pond every day(touch fish means dereliction of duty). However, seeing that XTL had really worked conscientiously and enthusiastically, Zjx felt very guilty and gave the ball to XTL as a gift. After that is a boring time of two boys. XTL design a game based on his "Good Chessboard" Prescribed procedure is as follows. On the rectangular chessboard composed of squares of X * Y, select a left or bottom grid as the starting grid, and then place a ball in the center of the grid. The diameter of the ball is the length of the side of a grid on the chessboard. Push the ball up 45 degrees to make it roll on the chessboard. When the ball touches the edge of the board, it will bounce back. The rebound rule is: the rebounding route is perpendicular to the original route, just as the reflection of light on a plane mirror. If the ball attaches the corner, it will roll back according to the original route. The ball moves on the chessboard from the starting grid (if the starting grid is in the upper left or lower right corner, it will rebound immediately at the beginning) until it returns to the starting grid. XTL will take a piece of his cherished chessboard from his storeroom, place the ball, and kick it obliquely up 45 degrees to let Zjx count the number of grids the ball has passed through for odd number of times and tell XTL the answer after the ball stops moving. Zjx dislikes the game as boring. He wants to do some homework about the Lie Algebroid connection, to discuss some properties about commutative group, to find out some new Mathematical technique in order to improve the effectiveness and robustness of traditional algorithms, and finally send several SCI articles randomly for the sake of postgraduate recommendation. Smart as you, can you tell him the solution OF this extremely depressing Question?

HBC213430细胞游戏XTL'sChessboard(评测)题解
-第1张图片-东莞河马信息技术
(图片来源网络,侵删)
不断学习,不断挑战,才能在编程领域中脱颖而出!全网最全C++题库,助您成为编程高手!

标签: HBC213430细胞游戏XTL'sChessboard(评测)题解