Code Jam 2019 Round 1C

Code Jam 2019 Round 1C Originally published in Chinese on 2019-05-07; this English edition preserves the original scope and technical context. Robot Programming Strategy (10pts, 18pts) Knowing the order of everyone’s Rock, Paper, Scissors moves, you can compete with everyone at the same time in each round to find a winning strategy. Solution: Eliminiating Each round traverses the moves of everyone in the current round. If there are three situations (R, P, S) at the same time, there is no winning strategy, and IMPOSSIBLE is directly output; otherwise, the winning or tied strategy is returned. ...

May 7, 2019 · 3 min · Zhengyu Chen

Code Jam 2019 Round 1A

Code Jam 2019 Round 1A Originally published in Chinese on 2019-04-13; this English edition preserves the original scope and technical context. Pylons (8pts, 23pts) When moving in an m*n grid, the position after each move cannot be on the same row/column/diagonal as the previous position. Solution: BackTracking It is similar to the Eight Queens problem, but each restriction is only related to the previous position and can be solved by backtracking. ...

April 13, 2019 · 4 min · Zhengyu Chen

Code Jam 2019 Qualification Round

Code Jam 2019 Qualification Round Originally published in Chinese on 2019-04-06; this English edition preserves the original scope and technical context. Foregone Solution (6pts, 10pts, 1pts) Split a number with the digit 4 into two numbers without the digit 4. Solution: Construction The entered number must contain the number 4. For the number 4 on each digit, we can split it into two numbers 2+2 (or 1+3). The maximum input data is 10 to the power of 100, so we can process it as a string. ...

April 6, 2019 · 4 min · Zhengyu Chen