The Same Game
Time Limit: 1000MS   Memory Limit: 10000K
Total Submissions: 4585   Accepted: 1699

Description

The game named "Same" is a single person game played on a 10 \Theta 15 board. Each square contains a ball colored red (R), green (G), or blue (B). Two balls belong to the same cluster if they have the same color, and one can be reached from another by following balls of the same color in the four directions up, down, left, and right. At each step of the game, the player chooses a ball whose cluster has at least two balls and removes all balls in the cluster from the board. Then, the board is "compressed" in two steps: 
1. Shift the remaining balls in each column down to fill the empty spaces. The order of the balls in each column is preserved. 
2. If a column becomes empty, shift the remaining columns to the left as far as possible. The order of the columns is preserved. 
For example, choosing the ball at the bottom left corner in the sub-board below causes: 
 
The objective of the game is to remove every ball from the board, and the game is over when every ball is removed or when every cluster has only one ball. The scoring of each game is as follows. The player starts with a score of 0. When a cluster of m balls is removed, the player's score increases by (m-2)^2 . A bonus of 1000 is given if every ball is removed at the end of the game. 
You suspect that a good strategy might be to choose the ball that gives the largest possible cluster at each step, and you want to test this strategy by writing a program to simulate games played using this strategy. If there are two or more balls to choose from, the program should choose the leftmost ball giving the largest cluster. If there is still a tie, it should choose the bottommost ball of these leftmost balls.

Input

You will be given a number of games in the input. The first line of input contains a positive integer giving the number of games to follow. The initial arrangement of the balls of each game is given one row at a time, from top to bottom. Each row contains 15 characters, each of which is one of "R", "G", or "B", specifying the colors of the balls in the row from left to right. A blank line precedes each game.

Output

For each game, print the game number, followed by a new line, followed by information about each move, followed by the final score. Each move should be printed in the format: 
Move x at (r,c): removed b balls of color C, got s points. 
where x is the move number, r and c are the row number and column number of the chosen ball, respectively. The rows are numbered from 1 to 10 from the bottom, and columns are numbered from 1 to 15 from the left. b is the number of balls in the cluster removed. C is one of "R", "G", or "B", indicating the color of the balls removed. s is the score for this move. The score does not include the 1000 point bonus if all the balls are removed after the move. 
The final score should be reported as follows: 
Final score: s, with b balls remaining. 
Insert a blank line between the output of each game. Use the plural forms "balls" and "points" even if the corresponding value is 1.

Sample Input

  1. 3
  2. RGGBBGGRBRRGGBG
  3. RBGRBGRBGRBGRBG
  4. RRRRGBBBRGGRBBB
  5. GGRGBGGBRRGGGBG
  6. GBGGRRRRRBGGRRR
  7. BBBBBBBBBBBBBBB
  8. BBBBBBBBBBBBBBB
  9. RRRRRRRRRRRRRRR
  10. RRRRRRGGGGRRRRR
  11. GGGGGGGGGGGGGGG
  12.  
  13. RRRRRRRRRRRRRRR
  14. RRRRRRRRRRRRRRR
  15. GGGGGGGGGGGGGGG
  16. GGGGGGGGGGGGGGG
  17. BBBBBBBBBBBBBBB
  18. BBBBBBBBBBBBBBB
  19. RRRRRRRRRRRRRRR
  20. RRRRRRRRRRRRRRR
  21. GGGGGGGGGGGGGGG
  22. GGGGGGGGGGGGGGG
  23.  
  24. RBGRBGRBGRBGRBG
  25. BGRBGRBGRBGRBGR
  26. GRBGRBGRBGRBGRB
  27. RBGRBGRBGRBGRBG
  28. BGRBGRBGRBGRBGR
  29. GRBGRBGRBGRBGRB
  30. RBGRBGRBGRBGRBG
  31. BGRBGRBGRBGRBGR
  32. GRBGRBGRBGRBGRB
  33. RBGRBGRBGRBGRBG

Sample Output

  1. Game 1:
  2.  
  3. Move 1 at (4,1): removed 32 balls of color B, got 900 points.
  4. Move 2 at (2,1): removed 39 balls of color R, got 1369 points.
  5. Move 3 at (1,1): removed 37 balls of color G, got 1225 points.
  6. Move 4 at (3,4): removed 11 balls of color B, got 81 points.
  7. Move 5 at (1,1): removed 8 balls of color R, got 36 points.
  8. Move 6 at (2,1): removed 6 balls of color G, got 16 points.
  9. Move 7 at (1,6): removed 6 balls of color B, got 16 points.
  10. Move 8 at (1,2): removed 5 balls of color R, got 9 points.
  11. Move 9 at (1,2): removed 5 balls of color G, got 9 points.
  12. Final score: 3661, with 1 balls remaining.
  13.  
  14. Game 2:
  15.  
  16. Move 1 at (1,1): removed 30 balls of color G, got 784 points.
  17. Move 2 at (1,1): removed 30 balls of color R, got 784 points.
  18. Move 3 at (1,1): removed 30 balls of color B, got 784 points.
  19. Move 4 at (1,1): removed 30 balls of color G, got 784 points.
  20. Move 5 at (1,1): removed 30 balls of color R, got 784 points.
  21. Final score: 4920, with 0 balls remaining.
  22.  
  23. Game 3:
  24.  
  25. Final score: 0, with 150 balls remaining.
  26.  
  27. 令人恶心的模拟,也许在大神们看来是水题,但我还是WA了很久,回头想想也不是太难,就是各种小错误,各种想不到的情况,最后用了别人的测试数据才找出错误,哎。
  1. #include <iostream>
  2. #include <cstring>
  3. #include <stdio.h>
  4.  
  5. using namespace std;
  6.  
  7. int step[][]={{,},{-,},{,},{,-}};
  8.  
  9. int board[][],cnt;
  10. bool vis[][],marked[][];
  11.  
  12. void cnt_ball(int x,int y,int cl)
  13. {
  14. int i;
  15. vis[x][y]=true;
  16. for(i=;i<;i++)
  17. {
  18. int tx=x+step[i][],ty=y+step[i][];
  19. if(tx>=&&tx<&&ty>=&&ty<&&!vis[tx][ty]&&board[tx][ty]==cl)
  20. {
  21. vis[tx][ty]=true;
  22. cnt++;
  23. cnt_ball(tx,ty,cl);
  24. }
  25. }
  26. return;
  27. }
  28.  
  29. void mark(int x,int y,int cl)
  30. {
  31. int i;
  32. marked[x][y]=true;
  33. for(i=;i<;i++)
  34. {
  35. int tx=x+step[i][],ty=y+step[i][];
  36. if(tx>=&&tx<&&ty>=&&ty<&&board[tx][ty]==cl&&!marked[tx][ty])
  37. {
  38. marked[tx][ty]=true;
  39. mark(tx,ty,cl);
  40. }
  41. }
  42. return;
  43. }
  44.  
  45. void eliminate()
  46. {
  47. int i,j,k;
  48. for(i=;i<;i++)
  49. {
  50. for(j=;j<;j++)
  51. {
  52. if(marked[i][j])
  53. {
  54. board[i][j]=;
  55. }
  56. }
  57. }
  58. for(j=;j<;j++)
  59. {
  60. for(i=;i>=;i--)
  61. {
  62. if(board[i][j]==)
  63. {
  64. int t=,ti=i;
  65. while(ti>=&&board[ti][j]==)
  66. {
  67. t++;
  68. ti--;
  69. }
  70. if(ti==-)
  71. break;
  72. for(k=i;k>=t;k--)
  73. {
  74. board[k][j]=board[k-t][j];
  75. }
  76. for(k=;k<t;k++)
  77. {
  78. board[k][j]=;
  79. }
  80. }
  81. }
  82. }
  83. // for(i=0;i<10;i++)
  84. // {
  85. // for(j=0;j<15;j++)
  86. // cout<<board[i][j];
  87. // cout<<endl;
  88. // }
  89. // cout<<endl;
  90. for(j=;j<;j++)
  91. {
  92. if(board[][j]==)
  93. {
  94. int t=,tj=j;
  95. while(tj<&&board[][tj]==)
  96. {
  97. t++;
  98. tj++;
  99. }
  100. if(tj==)
  101. break;
  102. for(k=j;k<-t;k++)
  103. {
  104. for(i=;i<;i++)
  105. {
  106. board[i][k]=board[i][k+t];
  107. }
  108. }
  109. for(k=;k>-t;k--)
  110. {
  111. for(i=;i<;i++)
  112. {
  113. board[i][k]=;
  114. }
  115. }
  116. }
  117. }
  118. // for(i=0;i<10;i++)
  119. // {
  120. // for(j=0;j<15;j++)
  121. // cout<<board[i][j];
  122. // cout<<endl;
  123. // }
  124. }
  125.  
  126. int main()
  127. {
  128. // freopen("in.txt","r",stdin);
  129. int T,cas=;
  130. scanf("%d",&T);
  131. while(T--)
  132. {
  133. cas++;
  134. int i,j;
  135. memset(board,,sizeof(board));
  136. char tmp[];
  137. for(i=;i<;i++)
  138. {
  139. scanf("%s",tmp);
  140. for(j=;j<;j++)
  141. {
  142. if(tmp[j]=='R')
  143. board[i][j]=;
  144. else if(tmp[j]=='G')
  145. board[i][j]=;
  146. else if(tmp[j]=='B')
  147. board[i][j]=;
  148. }
  149. }
  150. printf("Game %d:\n\n",cas);
  151. int mov=,tot=;
  152. while(true)
  153. {
  154. int process[],num=,color=;
  155. memset(vis,false,sizeof(vis));
  156. for(j=;j<;j++)
  157. {
  158. for(i=;i>=;i--)
  159. {
  160. if(board[i][j]!=&&!vis[i][j])
  161. {
  162. cnt=;
  163. cnt_ball(i,j,board[i][j]);
  164. if(cnt>num)
  165. {
  166. memset(marked,false,sizeof(marked));
  167. mark(i,j,board[i][j]);
  168. process[]=-i;
  169. process[]=j+;
  170. num=cnt;
  171. color=board[i][j];
  172. }
  173.  
  174. }
  175. }
  176. }
  177. if(num<=)
  178. break;
  179. else
  180. {
  181. int score=(num-)*(num-);
  182. tot+=score;
  183. mov++;
  184. eliminate();
  185. char c;
  186. if(color==)
  187. c='R';
  188. else if(color==)
  189. c='G';
  190. else if(color==)
  191. c='B';
  192. printf("Move %d at (%d,%d): removed %d balls of color %c, got %d points.\n",mov,process[],process[],num,c,score);
  193. }
  194. }
  195. int rem=;
  196. for(i=;i>=;i--)
  197. {
  198. for(j=;j<;j++)
  199. {
  200. if(board[i][j])
  201. rem++;
  202. }
  203. }
  204. if(rem==)
  205. tot+=;
  206. printf("Final score: %d, with %d balls remaining.\n\n",tot,rem);
  207. }
  208. return ;
  209. }
  1.  附上大神的测试数据:
  1. 20
  2. BBRRBRGGRBBBRGR
  3. BRBGGGGBGRRGBBB
  4. BGBGGRBRRGBGBGG
  5. BGRBRBBRGGRBGRR
  6. RBBGGRRBRRBGBGR
  7. BGGGBGBGRGBRBBR
  8. GGBRBRBGGBGBRGG
  9. GGBBGBBBRGGBGGG
  10. RGBGBBGRBRBRGRR
  11. RGBRGRBGGBBRBBG
  12. Game 1:
  13.  
  14. Move 1 at (3,1): removed 11 balls of color G, got 81 points.
  15. Move 2 at (5,1): removed 15 balls of color B, got 169 points.
  16. Move 3 at (2,5): removed 7 balls of color B, got 25 points.
  17. Move 4 at (2,13): removed 6 balls of color G, got 16 points.
  18. Move 5 at (1,12): removed 9 balls of color R, got 49 points.
  19. Move 6 at (1,10): removed 10 balls of color B, got 64 points.
  20. Move 7 at (3,10): removed 8 balls of color B, got 36 points.
  21. Move 8 at (2,10): removed 7 balls of color G, got 25 points.
  22. Move 9 at (1,13): removed 6 balls of color G, got 16 points.
  23. Move 10 at (1,10): removed 6 balls of color R, got 16 points.
  24. Move 11 at (4,4): removed 4 balls of color G, got 4 points.
  25. Move 12 at (4,3): removed 4 balls of color R, got 4 points.
  26. Move 13 at (5,6): removed 4 balls of color B, got 4 points.
  27. Move 14 at (4,7): removed 5 balls of color G, got 9 points.
  28. Move 15 at (3,7): removed 8 balls of color R, got 36 points.
  29. Move 16 at (1,8): removed 4 balls of color G, got 4 points.
  30. Move 17 at (1,7): removed 6 balls of color B, got 16 points.
  31. Move 18 at (2,4): removed 3 balls of color G, got 1 points.
  32. Move 19 at (1,7): removed 3 balls of color G, got 1 points.
  33. Move 20 at (1,6): removed 4 balls of color R, got 4 points.
  34. Move 21 at (2,6): removed 3 balls of color R, got 1 points.
  35. Move 22 at (1,6): removed 3 balls of color G, got 1 points.
  36. Move 23 at (1,1): removed 2 balls of color R, got 0 points.
  37. Move 24 at (1,2): removed 2 balls of color G, got 0 points.
  38. Move 25 at (1,2): removed 3 balls of color R, got 1 points.
  39. Move 26 at (1,1): removed 4 balls of color B, got 4 points.
  40. Move 27 at (1,1): removed 2 balls of color R, got 0 points.
  41. Final score: 587, with 1 balls remaining.
  42.  
  43. BRBRGBGBGBRBGBB
  44. GRGBBRBBRGGGGGR
  45. RGBRGBGBRBBRGRB
  46. GGBRRBBBGBBRBRG
  47. BRGBRBGRGGRGRBB
  48. GGGGBBBBBRRGGRR
  49. BBRBBBGRRGBGBGG
  50. BRBBBRGGGBGBGRB
  51. BGRBBBBBGRBGGGG
  52. RRRBRRRGGRBBGBB
  53. Game 2:
  54.  
  55. Move 1 at (3,3): removed 26 balls of color B, got 576 points.
  56. Move 2 at (1,1): removed 15 balls of color R, got 169 points.
  57. Move 3 at (1,7): removed 10 balls of color G, got 64 points.
  58. Move 4 at (9,9): removed 7 balls of color G, got 25 points.
  59. Move 5 at (2,11): removed 6 balls of color G, got 16 points.
  60. Move 6 at (1,10): removed 8 balls of color B, got 36 points.
  61. Move 7 at (1,2): removed 5 balls of color G, got 9 points.
  62. Move 8 at (1,1): removed 10 balls of color B, got 64 points.
  63. Move 9 at (1,6): removed 5 balls of color R, got 9 points.
  64. Move 10 at (3,6): removed 7 balls of color R, got 25 points.
  65. Move 11 at (4,7): removed 7 balls of color B, got 25 points.
  66. Move 12 at (1,5): removed 6 balls of color G, got 16 points.
  67. Move 13 at (1,6): removed 5 balls of color G, got 9 points.
  68. Move 14 at (1,1): removed 3 balls of color G, got 1 points.
  69. Move 15 at (2,1): removed 3 balls of color G, got 1 points.
  70. Move 16 at (2,1): removed 4 balls of color R, got 4 points.
  71. Move 17 at (1,5): removed 3 balls of color R, got 1 points.
  72. Move 18 at (1,1): removed 2 balls of color B, got 0 points.
  73. Move 19 at (1,3): removed 2 balls of color B, got 0 points.
  74. Move 20 at (1,3): removed 2 balls of color G, got 0 points.
  75. Move 21 at (1,2): removed 3 balls of color R, got 1 points.
  76. Move 22 at (1,2): removed 2 balls of color B, got 0 points.
  77. Move 23 at (1,2): removed 2 balls of color R, got 0 points.
  78. Final score: 1051, with 7 balls remaining.
  79.  
  80. BGRGBRBRRBRGRGB
  81. GRRRRRRGRRBGRBR
  82. BRBGGRBRBBBRGRG
  83. BBBBGRRGRRRGBRR
  84. GBRBBBGGGBGBBGR
  85. GRBBBRBGBBRBRBG
  86. GBGBRBBRGBRBBRB
  87. BGBBRBRBGRRRBBG
  88. RGGBGBBRBBBRBBG
  89. BBRRBRBBBRRBBRG
  90. Game 3:
  91.  
  92. Move 1 at (7,1): removed 17 balls of color B, got 225 points.
  93. Move 2 at (2,6): removed 12 balls of color B, got 100 points.
  94. Move 3 at (3,4): removed 14 balls of color R, got 144 points.
  95. Move 4 at (1,11): removed 12 balls of color B, got 100 points.
  96. Move 5 at (1,9): removed 14 balls of color R, got 144 points.
  97. Move 6 at (2,2): removed 9 balls of color G, got 49 points.
  98. Move 7 at (3,2): removed 8 balls of color R, got 36 points.
  99. Move 8 at (2,5): removed 6 balls of color G, got 16 points.
  100. Move 9 at (1,5): removed 8 balls of color B, got 36 points.
  101. Move 10 at (1,5): removed 9 balls of color R, got 49 points.
  102. Move 11 at (1,7): removed 5 balls of color G, got 9 points.
  103. Move 12 at (1,1): removed 4 balls of color B, got 4 points.
  104. Move 13 at (3,1): removed 4 balls of color G, got 4 points.
  105. Move 14 at (2,7): removed 4 balls of color G, got 4 points.
  106. Move 15 at (1,6): removed 4 balls of color B, got 4 points.
  107. Move 16 at (1,6): removed 4 balls of color R, got 4 points.
  108. Move 17 at (2,3): removed 3 balls of color B, got 1 points.
  109. Move 18 at (2,6): removed 3 balls of color G, got 1 points.
  110. Move 19 at (2,1): removed 2 balls of color B, got 0 points.
  111. Move 20 at (1,4): removed 2 balls of color G, got 0 points.
  112. Final score: 930, with 6 balls remaining.
  113.  
  114. BRBRBRRBRGRBRGB
  115. RRGRGRBRBGBRGGG
  116. RRGRGBGRRBRBBRG
  117. BBRRBRRRRBRRGGB
  118. GRGBBRBRBBGRRRR
  119. BBGGRBRRBGBBRRB
  120. GGGGRGRGRRGRRRG
  121. BGGGRGGRGBBRBGG
  122. BBGGRBRRGBBGBRG
  123. RRBBBGBBRBGRBGB
  124. Game 4:
  125.  
  126. Move 1 at (7,11): removed 13 balls of color R, got 121 points.
  127. Move 2 at (4,1): removed 12 balls of color G, got 100 points.
  128. Move 3 at (6,6): removed 12 balls of color R, got 100 points.
  129. Move 4 at (1,10): removed 10 balls of color B, got 64 points.
  130. Move 5 at (5,8): removed 9 balls of color B, got 49 points.
  131. Move 6 at (2,9): removed 9 balls of color G, got 49 points.
  132. Move 7 at (2,7): removed 10 balls of color R, got 64 points.
  133. Move 8 at (3,4): removed 8 balls of color R, got 36 points.
  134. Move 9 at (1,3): removed 7 balls of color B, got 25 points.
  135. Move 10 at (2,3): removed 9 balls of color G, got 49 points.
  136. Move 11 at (1,4): removed 7 balls of color B, got 25 points.
  137. Move 12 at (2,1): removed 6 balls of color B, got 16 points.
  138. Move 13 at (1,1): removed 6 balls of color R, got 16 points.
  139. Move 14 at (3,1): removed 6 balls of color R, got 16 points.
  140. Move 15 at (3,4): removed 6 balls of color G, got 16 points.
  141. Move 16 at (4,5): removed 4 balls of color G, got 4 points.
  142. Move 17 at (1,6): removed 4 balls of color B, got 4 points.
  143. Move 18 at (1,3): removed 3 balls of color G, got 1 points.
  144. Move 19 at (1,2): removed 3 balls of color B, got 1 points.
  145. Move 20 at (1,2): removed 3 balls of color R, got 1 points.
  146. Move 21 at (2,1): removed 2 balls of color B, got 0 points.
  147. Final score: 757, with 1 balls remaining.
  148.  
  149. GRRGGBBBGBRRGRR
  150. GRBBBGRGRBGBGRG
  151. RGBBBRGBGBGRBRB
  152. BBRGRBBBBGRBRGG
  153. RRGGGRGBBBBGRRG
  154. RGRGGBGRRBGBRGB
  155. GBRRBRGGRGGRRRR
  156. GGRBGGBBRGBRRGG
  157. BGBGRBGRGBRGGRB
  158. GGRRBBBBBBGBRBB
  159. Game 5:
  160.  
  161. Move 1 at (7,6): removed 10 balls of color B, got 64 points.
  162. Move 2 at (3,12): removed 10 balls of color R, got 64 points.
  163. Move 3 at (3,10): removed 14 balls of color G, got 144 points.
  164. Move 4 at (1,5): removed 15 balls of color B, got 169 points.
  165. Move 5 at (6,6): removed 10 balls of color G, got 64 points.
  166. Move 6 at (3,7): removed 10 balls of color R, got 64 points.
  167. Move 7 at (3,4): removed 7 balls of color B, got 25 points.
  168. Move 8 at (6,3): removed 8 balls of color G, got 36 points.
  169. Move 9 at (1,3): removed 8 balls of color R, got 36 points.
  170. Move 10 at (1,1): removed 6 balls of color G, got 16 points.
  171. Move 11 at (1,1): removed 8 balls of color B, got 36 points.
  172. Move 12 at (1,1): removed 7 balls of color R, got 25 points.
  173. Move 13 at (1,13): removed 5 balls of color B, got 9 points.
  174. Move 14 at (1,12): removed 6 balls of color R, got 16 points.
  175. Move 15 at (1,4): removed 4 balls of color G, got 4 points.
  176. Move 16 at (3,1): removed 3 balls of color G, got 1 points.
  177. Move 17 at (2,2): removed 3 balls of color B, got 1 points.
  178. Move 18 at (2,1): removed 3 balls of color R, got 1 points.
  179. Move 19 at (1,5): removed 3 balls of color G, got 1 points.
  180. Move 20 at (1,3): removed 2 balls of color R, got 0 points.
  181. Move 21 at (1,4): removed 2 balls of color G, got 0 points.
  182. Final score: 776, with 6 balls remaining.
  183.  
  184. BBGGRBRGRGGRBRR
  185. GGGBBBBBGRGGGGR
  186. BGGRRBBBBGBBRGB
  187. GRGRRGBBGBGRGRR
  188. GBRRGGBBRRGBRRB
  189. BGBBGBBGRBBRGRG
  190. RRRGBRGBRGGRBRR
  191. BGGBGGRGRRGRRGG
  192. BGRBGGRBBGRGBRR
  193. RRBGRBBBGBRGBRG
  194. Game 6:
  195.  
  196. Move 1 at (9,4): removed 16 balls of color B, got 196 points.
  197. Move 2 at (9,1): removed 8 balls of color G, got 36 points.
  198. Move 3 at (6,3): removed 7 balls of color R, got 25 points.
  199. Move 4 at (10,10): removed 7 balls of color G, got 25 points.
  200. Move 5 at (6,13): removed 9 balls of color R, got 49 points.
  201. Move 6 at (3,9): removed 6 balls of color R, got 16 points.
  202. Move 7 at (3,8): removed 7 balls of color G, got 25 points.
  203. Move 8 at (1,6): removed 10 balls of color B, got 64 points.
  204. Move 9 at (2,5): removed 4 balls of color G, got 4 points.
  205. Move 10 at (4,4): removed 6 balls of color G, got 16 points.
  206. Move 11 at (1,5): removed 5 balls of color R, got 9 points.
  207. Move 12 at (1,6): removed 4 balls of color G, got 4 points.
  208. Move 13 at (1,6): removed 4 balls of color R, got 4 points.
  209. Move 14 at (1,6): removed 4 balls of color G, got 4 points.
  210. Move 15 at (1,7): removed 4 balls of color R, got 4 points.
  211. Move 16 at (1,5): removed 7 balls of color B, got 25 points.
  212. Move 17 at (4,1): removed 3 balls of color R, got 1 points.
  213. Move 18 at (2,2): removed 4 balls of color G, got 4 points.
  214. Move 19 at (2,1): removed 5 balls of color B, got 9 points.
  215. Move 20 at (1,1): removed 4 balls of color R, got 4 points.
  216. Move 21 at (1,2): removed 5 balls of color B, got 9 points.
  217. Move 22 at (1,1): removed 3 balls of color G, got 1 points.
  218. Move 23 at (1,4): removed 3 balls of color R, got 1 points.
  219. Move 24 at (1,3): removed 6 balls of color G, got 16 points.
  220. Move 25 at (1,3): removed 3 balls of color B, got 1 points.
  221. Move 26 at (1,2): removed 4 balls of color R, got 4 points.
  222. Move 27 at (1,1): removed 2 balls of color B, got 0 points.
  223. Final score: 1556, with 0 balls remaining.
  224.  
  225. RGRGBGBBGRBGGBR
  226. GGRBBGBBGBRBBGG
  227. RRBRGGRGRGGBGGG
  228. GGGBBBRBRRGRRRR
  229. RBRBGBRGRGRGBRR
  230. GRBRGRRBGBRBGBB
  231. RBGGGRGBGGGRGRG
  232. BGGRGRBGBBRGRGR
  233. BGRBGRGRRGGRGRB
  234. RGRRBGRRGBBBRRR
  235. Game 7:
  236.  
  237. Move 1 at (1,2): removed 11 balls of color G, got 81 points.
  238. Move 2 at (2,6): removed 8 balls of color R, got 36 points.
  239. Move 3 at (2,4): removed 6 balls of color B, got 16 points.
  240. Move 4 at (1,5): removed 8 balls of color G, got 36 points.
  241. Move 5 at (1,5): removed 8 balls of color B, got 36 points.
  242. Move 6 at (2,2): removed 10 balls of color R, got 64 points.
  243. Move 7 at (2,1): removed 8 balls of color B, got 36 points.
  244. Move 8 at (1,5): removed 8 balls of color G, got 36 points.
  245. Move 9 at (7,9): removed 6 balls of color R, got 16 points.
  246. Move 10 at (7,10): removed 5 balls of color G, got 9 points.
  247. Move 11 at (7,9): removed 7 balls of color B, got 25 points.
  248. Move 12 at (6,8): removed 7 balls of color G, got 25 points.
  249. Move 13 at (4,7): removed 5 balls of color R, got 9 points.
  250. Move 14 at (4,6): removed 6 balls of color G, got 16 points.
  251. Move 15 at (1,7): removed 7 balls of color B, got 25 points.
  252. Move 16 at (1,6): removed 10 balls of color R, got 64 points.
  253. Move 17 at (1,1): removed 3 balls of color R, got 1 points.
  254. Move 18 at (1,1): removed 6 balls of color G, got 16 points.
  255. Move 19 at (1,1): removed 4 balls of color R, got 4 points.
  256. Move 20 at (1,2): removed 4 balls of color B, got 4 points.
  257. Move 21 at (2,1): removed 3 balls of color R, got 1 points.
  258. Move 22 at (1,1): removed 4 balls of color G, got 4 points.
  259. Move 23 at (1,1): removed 2 balls of color R, got 0 points.
  260. Final score: 560, with 4 balls remaining.
  261.  
  262. BBGBRGBBBRBBGGR
  263. BGGRBRRRBBRGBBR
  264. GRBGGBGBGGRGRGR
  265. GBGRRBRRGBBGBRR
  266. RBRGRBBGBBGRBGB
  267. GRGGBRRGBRGBBGG
  268. RBGGGGGBBBGRRGG
  269. RGGRBRGBBBRBRGR
  270. GBBRBRGGRGGGBGR
  271. RGGRGRRRRRBGRGG
  272. Game 8:
  273.  
  274. Move 1 at (3,2): removed 13 balls of color G, got 121 points.
  275. Move 2 at (3,7): removed 12 balls of color B, got 100 points.
  276. Move 3 at (1,6): removed 11 balls of color R, got 81 points.
  277. Move 4 at (1,14): removed 9 balls of color G, got 49 points.
  278. Move 5 at (2,5): removed 7 balls of color B, got 25 points.
  279. Move 6 at (3,3): removed 7 balls of color R, got 25 points.
  280. Move 7 at (1,2): removed 6 balls of color G, got 16 points.
  281. Move 8 at (1,7): removed 6 balls of color G, got 16 points.
  282. Move 9 at (2,10): removed 4 balls of color G, got 4 points.
  283. Move 10 at (3,11): removed 6 balls of color G, got 16 points.
  284. Move 11 at (3,10): removed 8 balls of color R, got 36 points.
  285. Move 12 at (2,8): removed 15 balls of color B, got 169 points.
  286. Move 13 at (1,6): removed 14 balls of color R, got 144 points.
  287. Move 14 at (3,1): removed 3 balls of color R, got 1 points.
  288. Move 15 at (1,2): removed 6 balls of color B, got 16 points.
  289. Move 16 at (2,1): removed 6 balls of color G, got 16 points.
  290. Move 17 at (1,1): removed 4 balls of color R, got 4 points.
  291. Move 18 at (1,2): removed 5 balls of color B, got 9 points.
  292. Move 19 at (1,3): removed 3 balls of color G, got 1 points.
  293. Move 20 at (1,1): removed 2 balls of color G, got 0 points.
  294. Move 21 at (1,1): removed 2 balls of color B, got 0 points.
  295. Final score: 849, with 1 balls remaining.
  296.  
  297. GGGGRGBRRGGRRGG
  298. RRBGBGRRBRRBGGR
  299. RBRGGGGGBRGRBGG
  300. BGGGBGGBRBBBRBR
  301. GRGRRBRBGBRBGGB
  302. BGGRRRRRGBGRGGG
  303. GRBGGRGRRBBRBBR
  304. BBRRGRGRRRGGBRG
  305. BBBGGBRBRBBGRBB
  306. BGGGRGGBRRBGBGB
  307. Game 9:
  308.  
  309. Move 1 at (10,1): removed 20 balls of color G, got 324 points.
  310. Move 2 at (4,2): removed 22 balls of color R, got 400 points.
  311. Move 3 at (1,8): removed 14 balls of color B, got 144 points.
  312. Move 4 at (1,1): removed 9 balls of color B, got 49 points.
  313. Move 5 at (1,1): removed 9 balls of color G, got 49 points.
  314. Move 6 at (9,13): removed 6 balls of color G, got 16 points.
  315. Move 7 at (1,11): removed 5 balls of color G, got 9 points.
  316. Move 8 at (1,10): removed 6 balls of color R, got 16 points.
  317. Move 9 at (1,11): removed 9 balls of color B, got 49 points.
  318. Move 10 at (1,2): removed 4 balls of color R, got 4 points.
  319. Move 11 at (1,1): removed 5 balls of color B, got 9 points.
  320. Move 12 at (1,6): removed 4 balls of color G, got 4 points.
  321. Move 13 at (2,4): removed 7 balls of color R, got 25 points.
  322. Move 14 at (1,3): removed 5 balls of color G, got 9 points.
  323. Move 15 at (1,5): removed 4 balls of color G, got 4 points.
  324. Move 16 at (1,5): removed 3 balls of color R, got 1 points.
  325. Move 17 at (1,3): removed 4 balls of color B, got 4 points.
  326. Move 18 at (1,2): removed 3 balls of color R, got 1 points.
  327. Move 19 at (1,1): removed 4 balls of color G, got 4 points.
  328. Move 20 at (1,1): removed 3 balls of color B, got 1 points.
  329. Move 21 at (1,1): removed 4 balls of color R, got 4 points.
  330. Final score: 2126, with 0 balls remaining.
  331.  
  332. GGGRBBBBRBRRGGB
  333. GBGGBBRGGBRGRGG
  334. BBBRRRBBBGGBRBG
  335. BRBRRRRBRBBGBBB
  336. BGRBRBGBBRRGGBG
  337. GRGGRBBGGBBBGRG
  338. RBBRBGRRRGGGRGR
  339. RRRGGRRBGBRRGGB
  340. BRBGGBGBGBGGGBR
  341. BGBRGGBGBBGRBBG
  342. Game 10:
  343.  
  344. Move 1 at (7,4): removed 9 balls of color R, got 49 points.
  345. Move 2 at (6,4): removed 15 balls of color B, got 169 points.
  346. Move 3 at (6,1): removed 7 balls of color B, got 25 points.
  347. Move 4 at (1,11): removed 7 balls of color G, got 25 points.
  348. Move 5 at (2,4): removed 6 balls of color G, got 16 points.
  349. Move 6 at (8,11): removed 6 balls of color G, got 16 points.
  350. Move 7 at (3,1): removed 5 balls of color R, got 9 points.
  351. Move 8 at (3,1): removed 8 balls of color G, got 36 points.
  352. Move 9 at (1,1): removed 6 balls of color B, got 16 points.
  353. Move 10 at (1,2): removed 5 balls of color R, got 9 points.
  354. Move 11 at (1,6): removed 5 balls of color B, got 9 points.
  355. Move 12 at (5,4): removed 4 balls of color G, got 4 points.
  356. Move 13 at (3,4): removed 4 balls of color R, got 4 points.
  357. Move 14 at (3,4): removed 4 balls of color B, got 4 points.
  358. Move 15 at (1,5): removed 4 balls of color G, got 4 points.
  359. Move 16 at (1,7): removed 4 balls of color R, got 4 points.
  360. Move 17 at (4,6): removed 6 balls of color G, got 16 points.
  361. Move 18 at (3,6): removed 10 balls of color B, got 64 points.
  362. Move 19 at (2,6): removed 8 balls of color R, got 36 points.
  363. Move 20 at (1,9): removed 4 balls of color B, got 4 points.
  364. Move 21 at (1,1): removed 3 balls of color G, got 1 points.
  365. Move 22 at (1,6): removed 3 balls of color G, got 1 points.
  366. Move 23 at (1,1): removed 2 balls of color R, got 0 points.
  367. Move 24 at (1,2): removed 2 balls of color B, got 0 points.
  368. Move 25 at (1,1): removed 2 balls of color G, got 0 points.
  369. Move 26 at (3,1): removed 2 balls of color R, got 0 points.
  370. Move 27 at (1,3): removed 2 balls of color R, got 0 points.
  371. Move 28 at (1,3): removed 2 balls of color G, got 0 points.
  372. Move 29 at (1,2): removed 3 balls of color B, got 1 points.
  373. Final score: 522, with 2 balls remaining.
  374.  
  375. GGGBRGGRRBBRGGG
  376. BBRRRBGRGRRGGBR
  377. GRGBRBRGGBGRBRG
  378. RGRGGRBRBRGRGGR
  379. BGBGBGRGGBRRRGR
  380. BGRGGBRRBRBBGGB
  381. BBBGBGGRGGGBBRG
  382. BGBBBRGRBRRRRRG
  383. GBGRRRRRRRGBGBB
  384. GRGGBRBRGGBRBRB
  385. Game 11:
  386.  
  387. Move 1 at (2,4): removed 21 balls of color R, got 361 points.
  388. Move 2 at (3,1): removed 7 balls of color B, got 25 points.
  389. Move 3 at (4,1): removed 13 balls of color G, got 121 points.
  390. Move 4 at (2,4): removed 7 balls of color B, got 25 points.
  391. Move 5 at (4,9): removed 7 balls of color B, got 25 points.
  392. Move 6 at (5,11): removed 11 balls of color G, got 81 points.
  393. Move 7 at (3,10): removed 10 balls of color R, got 64 points.
  394. Move 8 at (1,8): removed 8 balls of color G, got 36 points.
  395. Move 9 at (1,9): removed 10 balls of color B, got 64 points.
  396. Move 10 at (1,6): removed 7 balls of color G, got 25 points.
  397. Move 11 at (2,4): removed 5 balls of color R, got 9 points.
  398. Move 12 at (2,4): removed 5 balls of color B, got 9 points.
  399. Move 13 at (1,9): removed 5 balls of color R, got 9 points.
  400. Move 14 at (1,3): removed 4 balls of color G, got 4 points.
  401. Move 15 at (1,2): removed 6 balls of color R, got 16 points.
  402. Move 16 at (1,4): removed 4 balls of color G, got 4 points.
  403. Move 17 at (1,2): removed 5 balls of color B, got 9 points.
  404. Move 18 at (1,2): removed 4 balls of color R, got 4 points.
  405. Move 19 at (1,1): removed 3 balls of color G, got 1 points.
  406. Move 20 at (1,3): removed 3 balls of color G, got 1 points.
  407. Final score: 893, with 5 balls remaining.
  408.  
  409. RRBBBRGGGRGBBRR
  410. GBRBBRGGRGBRGBB
  411. RRRRBBBBBGBBRBB
  412. GGGGRGRGGBBBBBB
  413. RRRRRRGRGBGGRRR
  414. BBRBRGGGBBRBGRR
  415. BBGRRGRRGRBRBRB
  416. BRRGRGRBRRRGGBR
  417. RGGBBBBRBBGRRGR
  418. GGGGRBBRGGGRBRR
  419. Game 12:
  420.  
  421. Move 1 at (5,9): removed 16 balls of color B, got 196 points.
  422. Move 2 at (3,6): removed 14 balls of color G, got 144 points.
  423. Move 3 at (6,1): removed 26 balls of color R, got 576 points.
  424. Move 4 at (2,4): removed 16 balls of color B, got 196 points.
  425. Move 5 at (6,12): removed 10 balls of color R, got 64 points.
  426. Move 6 at (1,1): removed 8 balls of color G, got 36 points.
  427. Move 7 at (1,1): removed 5 balls of color R, got 9 points.
  428. Move 8 at (1,1): removed 5 balls of color B, got 9 points.
  429. Move 9 at (1,8): removed 5 balls of color G, got 9 points.
  430. Move 10 at (1,1): removed 4 balls of color G, got 4 points.
  431. Move 11 at (1,1): removed 4 balls of color R, got 4 points.
  432. Move 12 at (1,2): removed 4 balls of color B, got 4 points.
  433. Move 13 at (1,9): removed 4 balls of color R, got 4 points.
  434. Move 14 at (1,3): removed 3 balls of color G, got 1 points.
  435. Move 15 at (1,2): removed 3 balls of color R, got 1 points.
  436. Move 16 at (1,4): removed 3 balls of color R, got 1 points.
  437. Move 17 at (3,4): removed 3 balls of color B, got 1 points.
  438. Move 18 at (2,5): removed 3 balls of color G, got 1 points.
  439. Move 19 at (1,5): removed 3 balls of color B, got 1 points.
  440. Move 20 at (1,1): removed 2 balls of color G, got 0 points.
  441. Move 21 at (1,2): removed 2 balls of color B, got 0 points.
  442. Move 22 at (1,2): removed 4 balls of color G, got 4 points.
  443. Move 23 at (1,1): removed 2 balls of color R, got 0 points.
  444. Final score: 1265, with 1 balls remaining.
  445.  
  446. GGBRGBGGGGRBGRR
  447. GRGRBRRGRBGRGGG
  448. BRGRBGRGGGRRRBB
  449. GGBBGGRRBGBBBBG
  450. RBGBBBRBRBRRRRR
  451. RRGBRGGBBBBBGRG
  452. BGRRBBRRBBRBRBG
  453. RGRGRBRGRRBGGBB
  454. BBRRBGBGBBBBGBR
  455. GBGGRBBBBGRBGBG
  456. Game 13:
  457.  
  458. Move 1 at (1,6): removed 11 balls of color B, got 81 points.
  459. Move 2 at (4,8): removed 13 balls of color B, got 121 points.
  460. Move 3 at (1,9): removed 11 balls of color R, got 81 points.
  461. Move 4 at (1,8): removed 13 balls of color G, got 121 points.
  462. Move 5 at (2,13): removed 6 balls of color B, got 16 points.
  463. Move 6 at (2,3): removed 5 balls of color R, got 9 points.
  464. Move 7 at (3,2): removed 7 balls of color G, got 25 points.
  465. Move 8 at (2,1): removed 10 balls of color B, got 64 points.
  466. Move 9 at (1,4): removed 5 balls of color R, got 9 points.
  467. Move 10 at (6,5): removed 5 balls of color R, got 9 points.
  468. Move 11 at (4,4): removed 8 balls of color G, got 36 points.
  469. Move 12 at (3,3): removed 6 balls of color B, got 16 points.
  470. Move 13 at (1,6): removed 5 balls of color R, got 9 points.
  471. Move 14 at (1,9): removed 5 balls of color R, got 9 points.
  472. Move 15 at (4,1): removed 4 balls of color R, got 4 points.
  473. Move 16 at (3,10): removed 4 balls of color G, got 4 points.
  474. Move 17 at (4,1): removed 3 balls of color G, got 1 points.
  475. Move 18 at (1,5): removed 3 balls of color G, got 1 points.
  476. Move 19 at (3,1): removed 2 balls of color B, got 0 points.
  477. Move 20 at (3,1): removed 2 balls of color G, got 0 points.
  478. Move 21 at (1,3): removed 2 balls of color G, got 0 points.
  479. Move 22 at (1,3): removed 2 balls of color B, got 0 points.
  480. Move 23 at (1,2): removed 3 balls of color R, got 1 points.
  481. Move 24 at (1,5): removed 2 balls of color G, got 0 points.
  482. Move 25 at (1,4): removed 3 balls of color B, got 1 points.
  483. Move 26 at (1,4): removed 2 balls of color R, got 0 points.
  484. Move 27 at (1,3): removed 2 balls of color G, got 0 points.
  485. Move 28 at (1,2): removed 2 balls of color B, got 0 points.
  486. Move 29 at (1,1): removed 2 balls of color G, got 0 points.
  487. Move 30 at (1,1): removed 2 balls of color R, got 0 points.
  488. Final score: 1618, with 0 balls remaining.
  489.  
  490. GGBBGRBGBBRBBBR
  491. RGGRRRBRBBBBBRR
  492. RBGRBRGGRGRRGGB
  493. GGBGRGGGRBGGGRG
  494. RGRBRRBGBBGGRGR
  495. GBBBGRGRGRGRGGG
  496. GGBGGGGRBRGGGBG
  497. RGBBRBRRGGGGRRR
  498. GGGBRGRGRGRBGRG
  499. GBGGRBBRBBRRBBB
  500. Game 14:
  501.  
  502. Move 1 at (3,9): removed 21 balls of color G, got 361 points.
  503. Move 2 at (2,9): removed 15 balls of color R, got 169 points.
  504. Move 3 at (1,9): removed 15 balls of color B, got 169 points.
  505. Move 4 at (1,1): removed 10 balls of color G, got 64 points.
  506. Move 5 at (1,2): removed 7 balls of color B, got 25 points.
  507. Move 6 at (4,2): removed 10 balls of color G, got 64 points.
  508. Move 7 at (4,4): removed 9 balls of color R, got 49 points.
  509. Move 8 at (2,7): removed 7 balls of color R, got 25 points.
  510. Move 9 at (4,6): removed 7 balls of color G, got 25 points.
  511. Move 10 at (1,5): removed 7 balls of color B, got 25 points.
  512. Move 11 at (3,2): removed 6 balls of color B, got 16 points.
  513. Move 12 at (2,6): removed 5 balls of color R, got 9 points.
  514. Move 13 at (2,8): removed 5 balls of color B, got 9 points.
  515. Move 14 at (1,6): removed 4 balls of color G, got 4 points.
  516. Move 15 at (1,1): removed 2 balls of color R, got 0 points.
  517. Move 16 at (1,1): removed 3 balls of color G, got 1 points.
  518. Move 17 at (1,1): removed 3 balls of color R, got 1 points.
  519. Move 18 at (1,1): removed 2 balls of color G, got 0 points.
  520. Move 19 at (1,1): removed 2 balls of color R, got 0 points.
  521. Move 20 at (1,1): removed 2 balls of color G, got 0 points.
  522. Move 21 at (1,1): removed 2 balls of color R, got 0 points.
  523. Move 22 at (1,2): removed 2 balls of color G, got 0 points.
  524. Move 23 at (1,1): removed 2 balls of color B, got 0 points.
  525. Move 24 at (1,1): removed 2 balls of color R, got 0 points.
  526. Final score: 2016, with 0 balls remaining.
  527.  
  528. GRBGBBRGBRBGGBG
  529. BBGGGBBBRGRRGGR
  530. BGRRRRBGBGRGBBB
  531. RBGRBGBGBRBRGRR
  532. RRGGGGGGRBBBBGB
  533. RBRBRRRGRRGRRBG
  534. RBBGRGBGGRRBBBR
  535. RGRGGBBBGGRBGRG
  536. GRGBGBRBGBRGRRR
  537. BBRGBGGGBGGGGRB
  538. Game 15:
  539.  
  540. Move 1 at (6,3): removed 16 balls of color G, got 196 points.
  541. Move 2 at (3,1): removed 11 balls of color R, got 81 points.
  542. Move 3 at (2,6): removed 10 balls of color B, got 64 points.
  543. Move 4 at (3,4): removed 9 balls of color G, got 49 points.
  544. Move 5 at (2,5): removed 15 balls of color R, got 169 points.
  545. Move 6 at (2,4): removed 12 balls of color B, got 100 points.
  546. Move 7 at (1,7): removed 8 balls of color G, got 36 points.
  547. Move 8 at (3,1): removed 7 balls of color B, got 25 points.
  548. Move 9 at (2,1): removed 5 balls of color G, got 9 points.
  549. Move 10 at (2,3): removed 5 balls of color G, got 9 points.
  550. Move 11 at (1,9): removed 5 balls of color R, got 9 points.
  551. Move 12 at (1,7): removed 8 balls of color B, got 36 points.
  552. Move 13 at (1,5): removed 5 balls of color R, got 9 points.
  553. Move 14 at (2,6): removed 4 balls of color R, got 4 points.
  554. Move 15 at (1,7): removed 4 balls of color G, got 4 points.
  555. Move 16 at (1,4): removed 6 balls of color B, got 16 points.
  556. Move 17 at (2,2): removed 4 balls of color R, got 4 points.
  557. Move 18 at (1,3): removed 4 balls of color G, got 4 points.
  558. Move 19 at (1,1): removed 5 balls of color B, got 9 points.
  559. Move 20 at (1,2): removed 2 balls of color G, got 0 points.
  560. Move 21 at (1,1): removed 2 balls of color R, got 0 points.
  561. Final score: 833, with 3 balls remaining.
  562.  
  563. GRRRGRGBBGBBRGB
  564. RGBRRRBRBGBBBGR
  565. RGRBGBBGRBBGBRB
  566. RGGGGBBRGBGBBRB
  567. RBGBRBGBBRBGBRG
  568. RGBRBRGBRGBGGGG
  569. RGRRRGGGRRRGBGB
  570. GRRRBRBGGBRBBBR
  571. RGRGRGRBGRGGGRB
  572. BBRRRRGGGRRBBBB
  573. Game 16:
  574.  
  575. Move 1 at (3,2): removed 13 balls of color R, got 121 points.
  576. Move 2 at (7,10): removed 12 balls of color B, got 100 points.
  577. Move 3 at (7,9): removed 13 balls of color G, got 121 points.
  578. Move 4 at (1,6): removed 11 balls of color G, got 81 points.
  579. Move 5 at (4,6): removed 12 balls of color B, got 100 points.
  580. Move 6 at (1,6): removed 13 balls of color R, got 121 points.
  581. Move 7 at (3,1): removed 7 balls of color G, got 25 points.
  582. Move 8 at (2,1): removed 8 balls of color R, got 36 points.
  583. Move 9 at (2,11): removed 6 balls of color B, got 16 points.
  584. Move 10 at (3,13): removed 6 balls of color R, got 16 points.
  585. Move 11 at (1,12): removed 8 balls of color B, got 36 points.
  586. Move 12 at (1,10): removed 6 balls of color G, got 16 points.
  587. Move 13 at (3,3): removed 5 balls of color B, got 9 points.
  588. Move 14 at (1,1): removed 4 balls of color B, got 4 points.
  589. Move 15 at (1,1): removed 4 balls of color G, got 4 points.
  590. Move 16 at (1,1): removed 4 balls of color R, got 4 points.
  591. Move 17 at (4,2): removed 4 balls of color R, got 4 points.
  592. Move 18 at (2,2): removed 3 balls of color G, got 1 points.
  593. Move 19 at (1,3): removed 3 balls of color G, got 1 points.
  594. Move 20 at (1,3): removed 3 balls of color B, got 1 points.
  595. Move 21 at (1,2): removed 3 balls of color R, got 1 points.
  596. Final score: 818, with 2 balls remaining.
  597.  
  598. RRGGGBBGBGBGBRG
  599. RBRGRRGRBGGBGBG
  600. GBBBBRBBGRRRGBB
  601. GBBBGGRRGRGRBGR
  602. BBBGGBRGRRBRGRB
  603. GRRBRGGBGBRBRBB
  604. GRGGGGGGGRBRGRR
  605. BBBGBGBRRGRBRGR
  606. RGRBRRGBGRRGGBG
  607. BRRBRRRRGRGRGGB
  608. Game 17:
  609.  
  610. Move 1 at (4,3): removed 12 balls of color G, got 100 points.
  611. Move 2 at (6,1): removed 10 balls of color B, got 64 points.
  612. Move 3 at (3,1): removed 9 balls of color B, got 49 points.
  613. Move 4 at (1,2): removed 8 balls of color R, got 36 points.
  614. Move 5 at (4,6): removed 8 balls of color R, got 36 points.
  615. Move 6 at (1,5): removed 7 balls of color R, got 25 points.
  616. Move 7 at (1,2): removed 9 balls of color G, got 49 points.
  617. Move 8 at (1,1): removed 6 balls of color B, got 16 points.
  618. Move 9 at (1,3): removed 7 balls of color G, got 25 points.
  619. Move 10 at (2,1): removed 5 balls of color G, got 9 points.
  620. Move 11 at (1,1): removed 4 balls of color R, got 4 points.
  621. Move 12 at (1,4): removed 4 balls of color R, got 4 points.
  622. Move 13 at (2,2): removed 4 balls of color B, got 4 points.
  623. Move 14 at (1,2): removed 6 balls of color R, got 16 points.
  624. Move 15 at (1,2): removed 4 balls of color G, got 4 points.
  625. Move 16 at (2,3): removed 4 balls of color G, got 4 points.
  626. Move 17 at (3,3): removed 5 balls of color R, got 9 points.
  627. Move 18 at (1,1): removed 5 balls of color B, got 9 points.
  628. Move 19 at (2,1): removed 6 balls of color R, got 16 points.
  629. Move 20 at (1,1): removed 7 balls of color G, got 25 points.
  630. Move 21 at (1,1): removed 8 balls of color B, got 36 points.
  631. Move 22 at (1,1): removed 3 balls of color G, got 1 points.
  632. Move 23 at (2,2): removed 3 balls of color B, got 1 points.
  633. Move 24 at (1,2): removed 3 balls of color R, got 1 points.
  634. Move 25 at (1,2): removed 2 balls of color G, got 0 points.
  635. Final score: 543, with 1 balls remaining.
  636.  
  637. RRRBBGBRRRGGBBG
  638. RBRGBRGRRGRBGBG
  639. BBRGGBRGGRGGRBG
  640. RRRGBRRRBBGRGGR
  641. BGRBRRBBRRGBRRB
  642. RGGBRRBBBBGRGBR
  643. GRRBGRRRRBBRRBB
  644. RBRGBGBRGRBGBBG
  645. GRGRBBRRGBGRRRB
  646. BGGRRGGBGRBRBRG
  647. Game 18:
  648.  
  649. Move 1 at (5,5): removed 15 balls of color R, got 169 points.
  650. Move 2 at (7,1): removed 10 balls of color R, got 64 points.
  651. Move 3 at (2,5): removed 10 balls of color B, got 64 points.
  652. Move 4 at (2,5): removed 9 balls of color G, got 49 points.
  653. Move 5 at (4,4): removed 5 balls of color B, got 9 points.
  654. Move 6 at (5,2): removed 8 balls of color G, got 36 points.
  655. Move 7 at (5,11): removed 5 balls of color G, got 9 points.
  656. Move 8 at (1,12): removed 5 balls of color R, got 9 points.
  657. Move 9 at (1,13): removed 6 balls of color B, got 16 points.
  658. Move 10 at (4,10): removed 5 balls of color B, got 9 points.
  659. Move 11 at (3,10): removed 7 balls of color R, got 25 points.
  660. Move 12 at (2,11): removed 8 balls of color G, got 36 points.
  661. Move 13 at (4,13): removed 5 balls of color B, got 9 points.
  662. Move 14 at (6,1): removed 4 balls of color B, got 4 points.
  663. Move 15 at (1,4): removed 4 balls of color R, got 4 points.
  664. Move 16 at (1,2): removed 3 balls of color G, got 1 points.
  665. Move 17 at (1,2): removed 3 balls of color R, got 1 points.
  666. Move 18 at (1,1): removed 4 balls of color B, got 4 points.
  667. Move 19 at (1,5): removed 3 balls of color R, got 1 points.
  668. Move 20 at (1,4): removed 5 balls of color B, got 9 points.
  669. Move 21 at (2,4): removed 4 balls of color R, got 4 points.
  670. Move 22 at (1,3): removed 3 balls of color G, got 1 points.
  671. Move 23 at (1,6): removed 3 balls of color R, got 1 points.
  672. Move 24 at (4,7): removed 3 balls of color G, got 1 points.
  673. Move 25 at (1,2): removed 2 balls of color R, got 0 points.
  674. Move 26 at (1,3): removed 2 balls of color G, got 0 points.
  675. Move 27 at (1,2): removed 3 balls of color B, got 1 points.
  676. Move 28 at (2,1): removed 3 balls of color R, got 1 points.
  677. Move 29 at (1,1): removed 2 balls of color G, got 0 points.
  678. Final score: 537, with 1 balls remaining.
  679.  
  680. BGRGBGGGGRBRRRG
  681. RBBGBRBGBRBGBBR
  682. GGBBBBRRGGBRRRR
  683. GGBGBGRRRBRGBGR
  684. BGRGRGRBBGBGRGG
  685. RBRRGRGRRBRGRGR
  686. GRBBRBBBRGGRGRR
  687. BRGBBBBGGGRBGRG
  688. GGRBBGRRRRGBGGG
  689. BBGGRBGBGGRRBBR
  690. Game 19:
  691.  
  692. Move 1 at (4,3): removed 11 balls of color B, got 81 points.
  693. Move 2 at (4,7): removed 9 balls of color R, got 49 points.
  694. Move 3 at (5,4): removed 6 balls of color B, got 16 points.
  695. Move 4 at (3,3): removed 6 balls of color G, got 16 points.
  696. Move 5 at (3,2): removed 10 balls of color R, got 64 points.
  697. Move 6 at (2,5): removed 9 balls of color G, got 49 points.
  698. Move 7 at (8,11): removed 6 balls of color R, got 16 points.
  699. Move 8 at (2,12): removed 6 balls of color G, got 16 points.
  700. Move 9 at (2,12): removed 7 balls of color R, got 25 points.
  701. Move 10 at (2,11): removed 6 balls of color B, got 16 points.
  702. Move 11 at (3,1): removed 5 balls of color B, got 9 points.
  703. Move 12 at (2,1): removed 6 balls of color G, got 16 points.
  704. Move 13 at (2,5): removed 5 balls of color R, got 9 points.
  705. Move 14 at (2,6): removed 5 balls of color B, got 9 points.
  706. Move 15 at (2,5): removed 10 balls of color G, got 64 points.
  707. Move 16 at (3,7): removed 8 balls of color R, got 36 points.
  708. Move 17 at (1,9): removed 9 balls of color G, got 49 points.
  709. Move 18 at (1,5): removed 4 balls of color B, got 4 points.
  710. Move 19 at (1,3): removed 4 balls of color G, got 4 points.
  711. Move 20 at (1,1): removed 3 balls of color B, got 1 points.
  712. Move 21 at (1,3): removed 3 balls of color R, got 1 points.
  713. Move 22 at (1,3): removed 4 balls of color B, got 4 points.
  714. Move 23 at (3,1): removed 2 balls of color G, got 0 points.
  715. Final score: 554, with 6 balls remaining.
  716.  
  717. GGBGGBBRBBGBBBR
  718. GRBRGGRBGGRGRRG
  719. BGBRBRRBBBGBRRR
  720. RBBRGBBGGRBBGRG
  721. RGBRBGBRGBBRRGB
  722. BGRRGRGGGGRGGRR
  723. BRGBBBRBRGGGRBB
  724. GGBRRBBGGRGRBBG
  725. BGGGBRRBBBRBGGG
  726. BBBRGBBGBRGGBGB
  727. Game 20:
  728.  
  729. Move 1 at (5,7): removed 13 balls of color G, got 121 points.
  730. Move 2 at (3,10): removed 9 balls of color R, got 49 points.
  731. Move 3 at (2,8): removed 15 balls of color B, got 169 points.
  732. Move 4 at (1,11): removed 12 balls of color G, got 100 points.
  733. Move 5 at (4,4): removed 8 balls of color B, got 36 points.
  734. Move 6 at (5,3): removed 13 balls of color R, got 121 points.
  735. Move 7 at (1,6): removed 9 balls of color B, got 49 points.
  736. Move 8 at (3,1): removed 8 balls of color G, got 36 points.
  737. Move 9 at (1,1): removed 7 balls of color B, got 25 points.
  738. Move 10 at (4,2): removed 6 balls of color B, got 16 points.
  739. Move 11 at (2,13): removed 6 balls of color R, got 16 points.
  740. Move 12 at (4,1): removed 5 balls of color G, got 9 points.
  741. Move 13 at (1,12): removed 5 balls of color B, got 9 points.
  742. Move 14 at (1,1): removed 4 balls of color R, got 4 points.
  743. Move 15 at (2,5): removed 4 balls of color B, got 4 points.
  744. Move 16 at (2,9): removed 4 balls of color R, got 4 points.
  745. Move 17 at (1,8): removed 7 balls of color G, got 25 points.
  746. Move 18 at (2,6): removed 5 balls of color R, got 9 points.
  747. Move 19 at (1,5): removed 3 balls of color G, got 1 points.
  748. Move 20 at (1,2): removed 2 balls of color G, got 0 points.
  749. Move 21 at (2,3): removed 2 balls of color G, got 0 points.
  750. Final score: 803, with 3 balls remaining.
 

三部曲二(基本算法、动态规划、搜索)-1006-The Same Game的更多相关文章

  1. LeetCode初级算法--动态规划01:爬楼梯

    LeetCode初级算法--动态规划01:爬楼梯 搜索微信公众号:'AI-ming3526'或者'计算机视觉这件小事' 获取更多算法.机器学习干货 csdn:https://blog.csdn.net ...

  2. 算法-动态规划 Dynamic Programming--从菜鸟到老鸟

    算法-动态规划 Dynamic Programming--从菜鸟到老鸟      版权声明:本文为博主原创文章,转载请标明出处. https://blog.csdn.net/u013309870/ar ...

  3. LeetCode探索初级算法 - 动态规划

    LeetCode探索初级算法 - 动态规划 今天在LeetCode上做了几个简单的动态规划的题目,也算是对动态规划有个基本的了解了.现在对动态规划这个算法做一个简单的总结. 什么是动态规划 动态规划英 ...

  4. ASP.NET Core中使用IOC三部曲(二.采用Autofac来替换IOC容器,并实现属性注入)

    前言 本文主要是详解一下在ASP.NET Core中,自带的IOC容器相关的使用方式和注入类型的生命周期. 这里就不详细的赘述IOC是什么 以及DI是什么了.. emm..不懂的可以自行百度. 目录 ...

  5. 算法-动态规划DP小记

    算法-动态规划DP小记 动态规划算法是一种比较灵活的算法,针对具体的问题要具体分析,其宗旨就是要找出要解决问题的状态,然后逆向转化为求解子问题,最终回到已知的初始态,然后再顺序累计各个子问题的解从而得 ...

  6. python基础(9)--递归、二叉算法、多维数组、正则表达式

    1.递归 在函数内部,可以调其他函数,如果一个函数在内部调用它本身,这个函数就是递归函数.递归算法对解决一大类问题是十分有效的,它往往使算法的描述简洁而且易于裂解 递归算法解决问题的特点: 1)递归是 ...

  7. hihocoder#1098 : 最小生成树二·Kruscal算法

    #1098 : 最小生成树二·Kruscal算法 时间限制:10000ms 单点时限:1000ms 内存限制:256MB 描述 随着小Hi拥有城市数目的增加,在之间所使用的Prim算法已经无法继续使用 ...

  8. Hihocoder #1098 : 最小生成树二·Kruskal算法 ( *【模板】 )

    #1098 : 最小生成树二·Kruscal算法 时间限制:10000ms 单点时限:1000ms 内存限制:256MB 描述 随着小Hi拥有城市数目的增加,在之间所使用的Prim算法已经无法继续使用 ...

  9. 垃圾回收GC:.Net自己主动内存管理 上(二)内存算法

    垃圾回收GC:.Net自己主动内存管理 上(二)内存算法 垃圾回收GC:.Net自己主动内存管理 上(一)内存分配 垃圾回收GC:.Net自己主动内存管理 上(二)内存算法 垃圾回收GC:.Net自己 ...

  10. 分布式共识算法 (二) Paxos算法

    系列目录 分布式共识算法 (一) 背景 分布式共识算法 (二) Paxos算法 分布式共识算法 (三) Raft算法 分布式共识算法 (四) BTF算法 一.背景 1.1 命名 Paxos,最早是Le ...

随机推荐

  1. Java菜鸟培训第二天

    HTML——超文本标记语言…………… 静态网页:不需要访问数据库. 动态网页:在网上发布的好的,我们能通过网络浏览到的都是动态的,需要访问数据库. <html>--开始标签 <hea ...

  2. HDU 4947 GCD Array 容斥原理+树状数组

    GCD Array Time Limit: 11000/5500 MS (Java/Others)    Memory Limit: 65536/65536 K (Java/Others)Total ...

  3. elasticsearch之python备份

    一:elasticsearch原理 Elasticsearch是一个基于Apache Lucene(TM)的开源搜索引擎.无论在开源还是专有领域,Lucene可以被认为是迄今为止最先进.性能最好的.功 ...

  4. Hadoop集群环境搭建

    ----------------------------------------------------------- 自学记录,交流学习请发送邮件至gxz1984@gmail.com ------- ...

  5. 利用win7系统自带的dos命令把笔记本无线网卡当无线路由器(无线AP发射器)

    利用win7系统自带的dos命令把笔记本无线网卡当无线路由器(无线AP发射器). 1.打开win7开始菜单,找到命令提示符选项,以管理员身份运行cmd.2.在命令行上输入:netsh wlan set ...

  6. Cheatsheet: 2015 06.01 ~ 06.30

    Web The Front-End Optimization Checklist [ASP.NET 5] Production Ready Web Server on Linux. Kestrel + ...

  7. nodejs的express使用介绍

    Express框架 来自<JavaScript 标准参考教程(alpha)>,by 阮一峰 目录 概述 运行原理 底层:http模块 什么是中间件 use方法 Express的方法 all ...

  8. Http 状态码对照表

    1xx 消息 1. 100 Continue       2. 101 Switching Protocol       3. 102 Processing 2xx 成功 1. 200 OK      ...

  9. phonegap开发经验谈之一命令行建立项目和准备工作

    一安装与配置 安装命令行配置,这个可以参见网上的.3.0的最好用命令行配置. 大家在安装android sdk的时候,会发现里面自带了一个eclipse,并且继承了adt,直接用这个就好了.当然你已经 ...

  10. SPI总线(同步)

    一.SPI总线简介 串行外围设备接口SPI(serial peripheral interface)总线技术是Motorola公司推出的一种同步串行接口.SPI 用 于CPU与各种外围器件进行全双工. ...