注册一亩三分地论坛,查看更多干货!
您需要 登录 才可以下载或查看附件。没有帐号?注册账号 
x
面了有一段时间了, 发个面经,回馈地里, 顺便也求一发大米。
背景: (太长了,当时读题就读了好几分钟)
The 2-player game of Drawdown is played with a board made up of N groups of stones. The stones at index 0 belong to player 1, the stones at index N - 1 belong to player 2, and the stones at indices [1..N-2] have no owner. At the start of each game a board and a list of k moves are provided. Each move is a list of N integers, which represent the number of stones the move adds/removes from the board at each index. All m now over and player 1 is the winner.
题目;
1. 给定一个board, 判断是不是player one win.
2. 给定board 和List<int[]> moves, enumerate all the possible board moves and then print out the number of times Player 1 wins and Player 2 wins
|