There are ten players in a single game, and each player has two chances of pitching. If you fail to complete the first pitching, you need to make a second shot.
Possible situations of each grid:
1. fail
After two rounds, 10 bottles were not knocked down. The score in this case is the number of hits. If one hit is not hit, a "-" mark will be used.
2. Makeup
After the second round of replenishment, 10 bottles were knocked down, and the score for this case was 10 plus the number of bottles for the next round.
3. quanzhong
One-time knock down of 10, the score is 10 plus the number of bottles for the next two shots.
The tenth special case:
(1) If the second pitching is not completed, the score is the number of bottles knocked down twice.
(2) If the second match is completed, a pitching opportunity is added, and the score is the number of bottles that have been hit three times.
(3) If the first ball is in the middle, the second pitching opportunity is added, and the score is the number of three knocked-down bottles.
My Program:
# Include
# Include
# Include
Int first = 1; // The first output.
// Change the batching condition to the number of knocked-down bottles
Void turnint (char game [], int N, int num [])
{
For (INT I = 0; I
Next article:Puzzle game analysis