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.
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.
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
3
RGGBBGGRBRRGGBG
RBGRBGRBGRBGRBG
RRRRGBBBRGGRBBB
GGRGBGGBRRGGGBG
GBGGRRRRRBGGRRR
BBBBBBBBBBBBBBB
BBBBBBBBBBBBBBB
RRRRRRRRRRRRRRR
RRRRRRGGGGRRRRR
GGGGGGGGGGGGGGG RRRRRRRRRRRRRRR
RRRRRRRRRRRRRRR
GGGGGGGGGGGGGGG
GGGGGGGGGGGGGGG
BBBBBBBBBBBBBBB
BBBBBBBBBBBBBBB
RRRRRRRRRRRRRRR
RRRRRRRRRRRRRRR
GGGGGGGGGGGGGGG
GGGGGGGGGGGGGGG RBGRBGRBGRBGRBG
BGRBGRBGRBGRBGR
GRBGRBGRBGRBGRB
RBGRBGRBGRBGRBG
BGRBGRBGRBGRBGR
GRBGRBGRBGRBGRB
RBGRBGRBGRBGRBG
BGRBGRBGRBGRBGR
GRBGRBGRBGRBGRB
RBGRBGRBGRBGRBG
Sample Output
Game 1: Move 1 at (4,1): removed 32 balls of color B, got 900 points.
Move 2 at (2,1): removed 39 balls of color R, got 1369 points.
Move 3 at (1,1): removed 37 balls of color G, got 1225 points.
Move 4 at (3,4): removed 11 balls of color B, got 81 points.
Move 5 at (1,1): removed 8 balls of color R, got 36 points.
Move 6 at (2,1): removed 6 balls of color G, got 16 points.
Move 7 at (1,6): removed 6 balls of color B, got 16 points.
Move 8 at (1,2): removed 5 balls of color R, got 9 points.
Move 9 at (1,2): removed 5 balls of color G, got 9 points.
Final score: 3661, with 1 balls remaining. Game 2: Move 1 at (1,1): removed 30 balls of color G, got 784 points.
Move 2 at (1,1): removed 30 balls of color R, got 784 points.
Move 3 at (1,1): removed 30 balls of color B, got 784 points.
Move 4 at (1,1): removed 30 balls of color G, got 784 points.
Move 5 at (1,1): removed 30 balls of color R, got 784 points.
Final score: 4920, with 0 balls remaining. Game 3: Final score: 0, with 150 balls remaining. 令人恶心的模拟,也许在大神们看来是水题,但我还是WA了很久,回头想想也不是太难,就是各种小错误,各种想不到的情况,最后用了别人的测试数据才找出错误,哎。
#include <iostream>
#include <cstring>
#include <stdio.h> using namespace std; int step[][]={{,},{-,},{,},{,-}}; int board[][],cnt;
bool vis[][],marked[][]; void cnt_ball(int x,int y,int cl)
{
int i;
vis[x][y]=true;
for(i=;i<;i++)
{
int tx=x+step[i][],ty=y+step[i][];
if(tx>=&&tx<&&ty>=&&ty<&&!vis[tx][ty]&&board[tx][ty]==cl)
{
vis[tx][ty]=true;
cnt++;
cnt_ball(tx,ty,cl);
}
}
return;
} void mark(int x,int y,int cl)
{
int i;
marked[x][y]=true;
for(i=;i<;i++)
{
int tx=x+step[i][],ty=y+step[i][];
if(tx>=&&tx<&&ty>=&&ty<&&board[tx][ty]==cl&&!marked[tx][ty])
{
marked[tx][ty]=true;
mark(tx,ty,cl);
}
}
return;
} void eliminate()
{
int i,j,k;
for(i=;i<;i++)
{
for(j=;j<;j++)
{
if(marked[i][j])
{
board[i][j]=;
}
}
}
for(j=;j<;j++)
{
for(i=;i>=;i--)
{
if(board[i][j]==)
{
int t=,ti=i;
while(ti>=&&board[ti][j]==)
{
t++;
ti--;
}
if(ti==-)
break;
for(k=i;k>=t;k--)
{
board[k][j]=board[k-t][j];
}
for(k=;k<t;k++)
{
board[k][j]=;
}
}
}
}
// for(i=0;i<10;i++)
// {
// for(j=0;j<15;j++)
// cout<<board[i][j];
// cout<<endl;
// }
// cout<<endl;
for(j=;j<;j++)
{
if(board[][j]==)
{
int t=,tj=j;
while(tj<&&board[][tj]==)
{
t++;
tj++;
}
if(tj==)
break;
for(k=j;k<-t;k++)
{
for(i=;i<;i++)
{
board[i][k]=board[i][k+t];
}
}
for(k=;k>-t;k--)
{
for(i=;i<;i++)
{
board[i][k]=;
}
}
}
}
// for(i=0;i<10;i++)
// {
// for(j=0;j<15;j++)
// cout<<board[i][j];
// cout<<endl;
// }
} int main()
{
// freopen("in.txt","r",stdin);
int T,cas=;
scanf("%d",&T);
while(T--)
{
cas++;
int i,j;
memset(board,,sizeof(board));
char tmp[];
for(i=;i<;i++)
{
scanf("%s",tmp);
for(j=;j<;j++)
{
if(tmp[j]=='R')
board[i][j]=;
else if(tmp[j]=='G')
board[i][j]=;
else if(tmp[j]=='B')
board[i][j]=;
}
}
printf("Game %d:\n\n",cas);
int mov=,tot=;
while(true)
{
int process[],num=,color=;
memset(vis,false,sizeof(vis));
for(j=;j<;j++)
{
for(i=;i>=;i--)
{
if(board[i][j]!=&&!vis[i][j])
{
cnt=;
cnt_ball(i,j,board[i][j]);
if(cnt>num)
{
memset(marked,false,sizeof(marked));
mark(i,j,board[i][j]);
process[]=-i;
process[]=j+;
num=cnt;
color=board[i][j];
} }
}
}
if(num<=)
break;
else
{
int score=(num-)*(num-);
tot+=score;
mov++;
eliminate();
char c;
if(color==)
c='R';
else if(color==)
c='G';
else if(color==)
c='B';
printf("Move %d at (%d,%d): removed %d balls of color %c, got %d points.\n",mov,process[],process[],num,c,score);
}
}
int rem=;
for(i=;i>=;i--)
{
for(j=;j<;j++)
{
if(board[i][j])
rem++;
}
}
if(rem==)
tot+=;
printf("Final score: %d, with %d balls remaining.\n\n",tot,rem);
}
return ;
}
附上大神的测试数据:
20
BBRRBRGGRBBBRGR
BRBGGGGBGRRGBBB
BGBGGRBRRGBGBGG
BGRBRBBRGGRBGRR
RBBGGRRBRRBGBGR
BGGGBGBGRGBRBBR
GGBRBRBGGBGBRGG
GGBBGBBBRGGBGGG
RGBGBBGRBRBRGRR
RGBRGRBGGBBRBBG
Game 1: Move 1 at (3,1): removed 11 balls of color G, got 81 points.
Move 2 at (5,1): removed 15 balls of color B, got 169 points.
Move 3 at (2,5): removed 7 balls of color B, got 25 points.
Move 4 at (2,13): removed 6 balls of color G, got 16 points.
Move 5 at (1,12): removed 9 balls of color R, got 49 points.
Move 6 at (1,10): removed 10 balls of color B, got 64 points.
Move 7 at (3,10): removed 8 balls of color B, got 36 points.
Move 8 at (2,10): removed 7 balls of color G, got 25 points.
Move 9 at (1,13): removed 6 balls of color G, got 16 points.
Move 10 at (1,10): removed 6 balls of color R, got 16 points.
Move 11 at (4,4): removed 4 balls of color G, got 4 points.
Move 12 at (4,3): removed 4 balls of color R, got 4 points.
Move 13 at (5,6): removed 4 balls of color B, got 4 points.
Move 14 at (4,7): removed 5 balls of color G, got 9 points.
Move 15 at (3,7): removed 8 balls of color R, got 36 points.
Move 16 at (1,8): removed 4 balls of color G, got 4 points.
Move 17 at (1,7): removed 6 balls of color B, got 16 points.
Move 18 at (2,4): removed 3 balls of color G, got 1 points.
Move 19 at (1,7): removed 3 balls of color G, got 1 points.
Move 20 at (1,6): removed 4 balls of color R, got 4 points.
Move 21 at (2,6): removed 3 balls of color R, got 1 points.
Move 22 at (1,6): removed 3 balls of color G, got 1 points.
Move 23 at (1,1): removed 2 balls of color R, got 0 points.
Move 24 at (1,2): removed 2 balls of color G, got 0 points.
Move 25 at (1,2): removed 3 balls of color R, got 1 points.
Move 26 at (1,1): removed 4 balls of color B, got 4 points.
Move 27 at (1,1): removed 2 balls of color R, got 0 points.
Final score: 587, with 1 balls remaining. BRBRGBGBGBRBGBB
GRGBBRBBRGGGGGR
RGBRGBGBRBBRGRB
GGBRRBBBGBBRBRG
BRGBRBGRGGRGRBB
GGGGBBBBBRRGGRR
BBRBBBGRRGBGBGG
BRBBBRGGGBGBGRB
BGRBBBBBGRBGGGG
RRRBRRRGGRBBGBB
Game 2: Move 1 at (3,3): removed 26 balls of color B, got 576 points.
Move 2 at (1,1): removed 15 balls of color R, got 169 points.
Move 3 at (1,7): removed 10 balls of color G, got 64 points.
Move 4 at (9,9): removed 7 balls of color G, got 25 points.
Move 5 at (2,11): removed 6 balls of color G, got 16 points.
Move 6 at (1,10): removed 8 balls of color B, got 36 points.
Move 7 at (1,2): removed 5 balls of color G, got 9 points.
Move 8 at (1,1): removed 10 balls of color B, got 64 points.
Move 9 at (1,6): removed 5 balls of color R, got 9 points.
Move 10 at (3,6): removed 7 balls of color R, got 25 points.
Move 11 at (4,7): removed 7 balls of color B, got 25 points.
Move 12 at (1,5): removed 6 balls of color G, got 16 points.
Move 13 at (1,6): removed 5 balls of color G, got 9 points.
Move 14 at (1,1): removed 3 balls of color G, got 1 points.
Move 15 at (2,1): removed 3 balls of color G, got 1 points.
Move 16 at (2,1): removed 4 balls of color R, got 4 points.
Move 17 at (1,5): removed 3 balls of color R, got 1 points.
Move 18 at (1,1): removed 2 balls of color B, got 0 points.
Move 19 at (1,3): removed 2 balls of color B, got 0 points.
Move 20 at (1,3): removed 2 balls of color G, got 0 points.
Move 21 at (1,2): removed 3 balls of color R, got 1 points.
Move 22 at (1,2): removed 2 balls of color B, got 0 points.
Move 23 at (1,2): removed 2 balls of color R, got 0 points.
Final score: 1051, with 7 balls remaining. BGRGBRBRRBRGRGB
GRRRRRRGRRBGRBR
BRBGGRBRBBBRGRG
BBBBGRRGRRRGBRR
GBRBBBGGGBGBBGR
GRBBBRBGBBRBRBG
GBGBRBBRGBRBBRB
BGBBRBRBGRRRBBG
RGGBGBBRBBBRBBG
BBRRBRBBBRRBBRG
Game 3: Move 1 at (7,1): removed 17 balls of color B, got 225 points.
Move 2 at (2,6): removed 12 balls of color B, got 100 points.
Move 3 at (3,4): removed 14 balls of color R, got 144 points.
Move 4 at (1,11): removed 12 balls of color B, got 100 points.
Move 5 at (1,9): removed 14 balls of color R, got 144 points.
Move 6 at (2,2): removed 9 balls of color G, got 49 points.
Move 7 at (3,2): removed 8 balls of color R, got 36 points.
Move 8 at (2,5): removed 6 balls of color G, got 16 points.
Move 9 at (1,5): removed 8 balls of color B, got 36 points.
Move 10 at (1,5): removed 9 balls of color R, got 49 points.
Move 11 at (1,7): removed 5 balls of color G, got 9 points.
Move 12 at (1,1): removed 4 balls of color B, got 4 points.
Move 13 at (3,1): removed 4 balls of color G, got 4 points.
Move 14 at (2,7): removed 4 balls of color G, got 4 points.
Move 15 at (1,6): removed 4 balls of color B, got 4 points.
Move 16 at (1,6): removed 4 balls of color R, got 4 points.
Move 17 at (2,3): removed 3 balls of color B, got 1 points.
Move 18 at (2,6): removed 3 balls of color G, got 1 points.
Move 19 at (2,1): removed 2 balls of color B, got 0 points.
Move 20 at (1,4): removed 2 balls of color G, got 0 points.
Final score: 930, with 6 balls remaining. BRBRBRRBRGRBRGB
RRGRGRBRBGBRGGG
RRGRGBGRRBRBBRG
BBRRBRRRRBRRGGB
GRGBBRBRBBGRRRR
BBGGRBRRBGBBRRB
GGGGRGRGRRGRRRG
BGGGRGGRGBBRBGG
BBGGRBRRGBBGBRG
RRBBBGBBRBGRBGB
Game 4: Move 1 at (7,11): removed 13 balls of color R, got 121 points.
Move 2 at (4,1): removed 12 balls of color G, got 100 points.
Move 3 at (6,6): removed 12 balls of color R, got 100 points.
Move 4 at (1,10): removed 10 balls of color B, got 64 points.
Move 5 at (5,8): removed 9 balls of color B, got 49 points.
Move 6 at (2,9): removed 9 balls of color G, got 49 points.
Move 7 at (2,7): removed 10 balls of color R, got 64 points.
Move 8 at (3,4): removed 8 balls of color R, got 36 points.
Move 9 at (1,3): removed 7 balls of color B, got 25 points.
Move 10 at (2,3): removed 9 balls of color G, got 49 points.
Move 11 at (1,4): removed 7 balls of color B, got 25 points.
Move 12 at (2,1): removed 6 balls of color B, got 16 points.
Move 13 at (1,1): removed 6 balls of color R, got 16 points.
Move 14 at (3,1): removed 6 balls of color R, got 16 points.
Move 15 at (3,4): removed 6 balls of color G, got 16 points.
Move 16 at (4,5): removed 4 balls of color G, got 4 points.
Move 17 at (1,6): removed 4 balls of color B, got 4 points.
Move 18 at (1,3): removed 3 balls of color G, got 1 points.
Move 19 at (1,2): removed 3 balls of color B, got 1 points.
Move 20 at (1,2): removed 3 balls of color R, got 1 points.
Move 21 at (2,1): removed 2 balls of color B, got 0 points.
Final score: 757, with 1 balls remaining. GRRGGBBBGBRRGRR
GRBBBGRGRBGBGRG
RGBBBRGBGBGRBRB
BBRGRBBBBGRBRGG
RRGGGRGBBBBGRRG
RGRGGBGRRBGBRGB
GBRRBRGGRGGRRRR
GGRBGGBBRGBRRGG
BGBGRBGRGBRGGRB
GGRRBBBBBBGBRBB
Game 5: Move 1 at (7,6): removed 10 balls of color B, got 64 points.
Move 2 at (3,12): removed 10 balls of color R, got 64 points.
Move 3 at (3,10): removed 14 balls of color G, got 144 points.
Move 4 at (1,5): removed 15 balls of color B, got 169 points.
Move 5 at (6,6): removed 10 balls of color G, got 64 points.
Move 6 at (3,7): removed 10 balls of color R, got 64 points.
Move 7 at (3,4): removed 7 balls of color B, got 25 points.
Move 8 at (6,3): removed 8 balls of color G, got 36 points.
Move 9 at (1,3): removed 8 balls of color R, got 36 points.
Move 10 at (1,1): removed 6 balls of color G, got 16 points.
Move 11 at (1,1): removed 8 balls of color B, got 36 points.
Move 12 at (1,1): removed 7 balls of color R, got 25 points.
Move 13 at (1,13): removed 5 balls of color B, got 9 points.
Move 14 at (1,12): removed 6 balls of color R, got 16 points.
Move 15 at (1,4): removed 4 balls of color G, got 4 points.
Move 16 at (3,1): removed 3 balls of color G, got 1 points.
Move 17 at (2,2): removed 3 balls of color B, got 1 points.
Move 18 at (2,1): removed 3 balls of color R, got 1 points.
Move 19 at (1,5): removed 3 balls of color G, got 1 points.
Move 20 at (1,3): removed 2 balls of color R, got 0 points.
Move 21 at (1,4): removed 2 balls of color G, got 0 points.
Final score: 776, with 6 balls remaining. BBGGRBRGRGGRBRR
GGGBBBBBGRGGGGR
BGGRRBBBBGBBRGB
GRGRRGBBGBGRGRR
GBRRGGBBRRGBRRB
BGBBGBBGRBBRGRG
RRRGBRGBRGGRBRR
BGGBGGRGRRGRRGG
BGRBGGRBBGRGBRR
RRBGRBBBGBRGBRG
Game 6: Move 1 at (9,4): removed 16 balls of color B, got 196 points.
Move 2 at (9,1): removed 8 balls of color G, got 36 points.
Move 3 at (6,3): removed 7 balls of color R, got 25 points.
Move 4 at (10,10): removed 7 balls of color G, got 25 points.
Move 5 at (6,13): removed 9 balls of color R, got 49 points.
Move 6 at (3,9): removed 6 balls of color R, got 16 points.
Move 7 at (3,8): removed 7 balls of color G, got 25 points.
Move 8 at (1,6): removed 10 balls of color B, got 64 points.
Move 9 at (2,5): removed 4 balls of color G, got 4 points.
Move 10 at (4,4): removed 6 balls of color G, got 16 points.
Move 11 at (1,5): removed 5 balls of color R, got 9 points.
Move 12 at (1,6): removed 4 balls of color G, got 4 points.
Move 13 at (1,6): removed 4 balls of color R, got 4 points.
Move 14 at (1,6): removed 4 balls of color G, got 4 points.
Move 15 at (1,7): removed 4 balls of color R, got 4 points.
Move 16 at (1,5): removed 7 balls of color B, got 25 points.
Move 17 at (4,1): removed 3 balls of color R, got 1 points.
Move 18 at (2,2): removed 4 balls of color G, got 4 points.
Move 19 at (2,1): removed 5 balls of color B, got 9 points.
Move 20 at (1,1): removed 4 balls of color R, got 4 points.
Move 21 at (1,2): removed 5 balls of color B, got 9 points.
Move 22 at (1,1): removed 3 balls of color G, got 1 points.
Move 23 at (1,4): removed 3 balls of color R, got 1 points.
Move 24 at (1,3): removed 6 balls of color G, got 16 points.
Move 25 at (1,3): removed 3 balls of color B, got 1 points.
Move 26 at (1,2): removed 4 balls of color R, got 4 points.
Move 27 at (1,1): removed 2 balls of color B, got 0 points.
Final score: 1556, with 0 balls remaining. RGRGBGBBGRBGGBR
GGRBBGBBGBRBBGG
RRBRGGRGRGGBGGG
GGGBBBRBRRGRRRR
RBRBGBRGRGRGBRR
GRBRGRRBGBRBGBB
RBGGGRGBGGGRGRG
BGGRGRBGBBRGRGR
BGRBGRGRRGGRGRB
RGRRBGRRGBBBRRR
Game 7: Move 1 at (1,2): removed 11 balls of color G, got 81 points.
Move 2 at (2,6): removed 8 balls of color R, got 36 points.
Move 3 at (2,4): removed 6 balls of color B, got 16 points.
Move 4 at (1,5): removed 8 balls of color G, got 36 points.
Move 5 at (1,5): removed 8 balls of color B, got 36 points.
Move 6 at (2,2): removed 10 balls of color R, got 64 points.
Move 7 at (2,1): removed 8 balls of color B, got 36 points.
Move 8 at (1,5): removed 8 balls of color G, got 36 points.
Move 9 at (7,9): removed 6 balls of color R, got 16 points.
Move 10 at (7,10): removed 5 balls of color G, got 9 points.
Move 11 at (7,9): removed 7 balls of color B, got 25 points.
Move 12 at (6,8): removed 7 balls of color G, got 25 points.
Move 13 at (4,7): removed 5 balls of color R, got 9 points.
Move 14 at (4,6): removed 6 balls of color G, got 16 points.
Move 15 at (1,7): removed 7 balls of color B, got 25 points.
Move 16 at (1,6): removed 10 balls of color R, got 64 points.
Move 17 at (1,1): removed 3 balls of color R, got 1 points.
Move 18 at (1,1): removed 6 balls of color G, got 16 points.
Move 19 at (1,1): removed 4 balls of color R, got 4 points.
Move 20 at (1,2): removed 4 balls of color B, got 4 points.
Move 21 at (2,1): removed 3 balls of color R, got 1 points.
Move 22 at (1,1): removed 4 balls of color G, got 4 points.
Move 23 at (1,1): removed 2 balls of color R, got 0 points.
Final score: 560, with 4 balls remaining. BBGBRGBBBRBBGGR
BGGRBRRRBBRGBBR
GRBGGBGBGGRGRGR
GBGRRBRRGBBGBRR
RBRGRBBGBBGRBGB
GRGGBRRGBRGBBGG
RBGGGGGBBBGRRGG
RGGRBRGBBBRBRGR
GBBRBRGGRGGGBGR
RGGRGRRRRRBGRGG
Game 8: Move 1 at (3,2): removed 13 balls of color G, got 121 points.
Move 2 at (3,7): removed 12 balls of color B, got 100 points.
Move 3 at (1,6): removed 11 balls of color R, got 81 points.
Move 4 at (1,14): removed 9 balls of color G, got 49 points.
Move 5 at (2,5): removed 7 balls of color B, got 25 points.
Move 6 at (3,3): removed 7 balls of color R, got 25 points.
Move 7 at (1,2): removed 6 balls of color G, got 16 points.
Move 8 at (1,7): removed 6 balls of color G, got 16 points.
Move 9 at (2,10): removed 4 balls of color G, got 4 points.
Move 10 at (3,11): removed 6 balls of color G, got 16 points.
Move 11 at (3,10): removed 8 balls of color R, got 36 points.
Move 12 at (2,8): removed 15 balls of color B, got 169 points.
Move 13 at (1,6): removed 14 balls of color R, got 144 points.
Move 14 at (3,1): removed 3 balls of color R, got 1 points.
Move 15 at (1,2): removed 6 balls of color B, got 16 points.
Move 16 at (2,1): removed 6 balls of color G, got 16 points.
Move 17 at (1,1): removed 4 balls of color R, got 4 points.
Move 18 at (1,2): removed 5 balls of color B, got 9 points.
Move 19 at (1,3): removed 3 balls of color G, got 1 points.
Move 20 at (1,1): removed 2 balls of color G, got 0 points.
Move 21 at (1,1): removed 2 balls of color B, got 0 points.
Final score: 849, with 1 balls remaining. GGGGRGBRRGGRRGG
RRBGBGRRBRRBGGR
RBRGGGGGBRGRBGG
BGGGBGGBRBBBRBR
GRGRRBRBGBRBGGB
BGGRRRRRGBGRGGG
GRBGGRGRRBBRBBR
BBRRGRGRRRGGBRG
BBBGGBRBRBBGRBB
BGGGRGGBRRBGBGB
Game 9: Move 1 at (10,1): removed 20 balls of color G, got 324 points.
Move 2 at (4,2): removed 22 balls of color R, got 400 points.
Move 3 at (1,8): removed 14 balls of color B, got 144 points.
Move 4 at (1,1): removed 9 balls of color B, got 49 points.
Move 5 at (1,1): removed 9 balls of color G, got 49 points.
Move 6 at (9,13): removed 6 balls of color G, got 16 points.
Move 7 at (1,11): removed 5 balls of color G, got 9 points.
Move 8 at (1,10): removed 6 balls of color R, got 16 points.
Move 9 at (1,11): removed 9 balls of color B, got 49 points.
Move 10 at (1,2): removed 4 balls of color R, got 4 points.
Move 11 at (1,1): removed 5 balls of color B, got 9 points.
Move 12 at (1,6): removed 4 balls of color G, got 4 points.
Move 13 at (2,4): removed 7 balls of color R, got 25 points.
Move 14 at (1,3): removed 5 balls of color G, got 9 points.
Move 15 at (1,5): removed 4 balls of color G, got 4 points.
Move 16 at (1,5): removed 3 balls of color R, got 1 points.
Move 17 at (1,3): removed 4 balls of color B, got 4 points.
Move 18 at (1,2): removed 3 balls of color R, got 1 points.
Move 19 at (1,1): removed 4 balls of color G, got 4 points.
Move 20 at (1,1): removed 3 balls of color B, got 1 points.
Move 21 at (1,1): removed 4 balls of color R, got 4 points.
Final score: 2126, with 0 balls remaining. GGGRBBBBRBRRGGB
GBGGBBRGGBRGRGG
BBBRRRBBBGGBRBG
BRBRRRRBRBBGBBB
BGRBRBGBBRRGGBG
GRGGRBBGGBBBGRG
RBBRBGRRRGGGRGR
RRRGGRRBGBRRGGB
BRBGGBGBGBGGGBR
BGBRGGBGBBGRBBG
Game 10: Move 1 at (7,4): removed 9 balls of color R, got 49 points.
Move 2 at (6,4): removed 15 balls of color B, got 169 points.
Move 3 at (6,1): removed 7 balls of color B, got 25 points.
Move 4 at (1,11): removed 7 balls of color G, got 25 points.
Move 5 at (2,4): removed 6 balls of color G, got 16 points.
Move 6 at (8,11): removed 6 balls of color G, got 16 points.
Move 7 at (3,1): removed 5 balls of color R, got 9 points.
Move 8 at (3,1): removed 8 balls of color G, got 36 points.
Move 9 at (1,1): removed 6 balls of color B, got 16 points.
Move 10 at (1,2): removed 5 balls of color R, got 9 points.
Move 11 at (1,6): removed 5 balls of color B, got 9 points.
Move 12 at (5,4): removed 4 balls of color G, got 4 points.
Move 13 at (3,4): removed 4 balls of color R, got 4 points.
Move 14 at (3,4): removed 4 balls of color B, got 4 points.
Move 15 at (1,5): removed 4 balls of color G, got 4 points.
Move 16 at (1,7): removed 4 balls of color R, got 4 points.
Move 17 at (4,6): removed 6 balls of color G, got 16 points.
Move 18 at (3,6): removed 10 balls of color B, got 64 points.
Move 19 at (2,6): removed 8 balls of color R, got 36 points.
Move 20 at (1,9): removed 4 balls of color B, got 4 points.
Move 21 at (1,1): removed 3 balls of color G, got 1 points.
Move 22 at (1,6): removed 3 balls of color G, got 1 points.
Move 23 at (1,1): removed 2 balls of color R, got 0 points.
Move 24 at (1,2): removed 2 balls of color B, got 0 points.
Move 25 at (1,1): removed 2 balls of color G, got 0 points.
Move 26 at (3,1): removed 2 balls of color R, got 0 points.
Move 27 at (1,3): removed 2 balls of color R, got 0 points.
Move 28 at (1,3): removed 2 balls of color G, got 0 points.
Move 29 at (1,2): removed 3 balls of color B, got 1 points.
Final score: 522, with 2 balls remaining. GGGBRGGRRBBRGGG
BBRRRBGRGRRGGBR
GRGBRBRGGBGRBRG
RGRGGRBRBRGRGGR
BGBGBGRGGBRRRGR
BGRGGBRRBRBBGGB
BBBGBGGRGGGBBRG
BGBBBRGRBRRRRRG
GBGRRRRRRRGBGBB
GRGGBRBRGGBRBRB
Game 11: Move 1 at (2,4): removed 21 balls of color R, got 361 points.
Move 2 at (3,1): removed 7 balls of color B, got 25 points.
Move 3 at (4,1): removed 13 balls of color G, got 121 points.
Move 4 at (2,4): removed 7 balls of color B, got 25 points.
Move 5 at (4,9): removed 7 balls of color B, got 25 points.
Move 6 at (5,11): removed 11 balls of color G, got 81 points.
Move 7 at (3,10): removed 10 balls of color R, got 64 points.
Move 8 at (1,8): removed 8 balls of color G, got 36 points.
Move 9 at (1,9): removed 10 balls of color B, got 64 points.
Move 10 at (1,6): removed 7 balls of color G, got 25 points.
Move 11 at (2,4): removed 5 balls of color R, got 9 points.
Move 12 at (2,4): removed 5 balls of color B, got 9 points.
Move 13 at (1,9): removed 5 balls of color R, got 9 points.
Move 14 at (1,3): removed 4 balls of color G, got 4 points.
Move 15 at (1,2): removed 6 balls of color R, got 16 points.
Move 16 at (1,4): removed 4 balls of color G, got 4 points.
Move 17 at (1,2): removed 5 balls of color B, got 9 points.
Move 18 at (1,2): removed 4 balls of color R, got 4 points.
Move 19 at (1,1): removed 3 balls of color G, got 1 points.
Move 20 at (1,3): removed 3 balls of color G, got 1 points.
Final score: 893, with 5 balls remaining. RRBBBRGGGRGBBRR
GBRBBRGGRGBRGBB
RRRRBBBBBGBBRBB
GGGGRGRGGBBBBBB
RRRRRRGRGBGGRRR
BBRBRGGGBBRBGRR
BBGRRGRRGRBRBRB
BRRGRGRBRRRGGBR
RGGBBBBRBBGRRGR
GGGGRBBRGGGRBRR
Game 12: Move 1 at (5,9): removed 16 balls of color B, got 196 points.
Move 2 at (3,6): removed 14 balls of color G, got 144 points.
Move 3 at (6,1): removed 26 balls of color R, got 576 points.
Move 4 at (2,4): removed 16 balls of color B, got 196 points.
Move 5 at (6,12): removed 10 balls of color R, got 64 points.
Move 6 at (1,1): removed 8 balls of color G, got 36 points.
Move 7 at (1,1): removed 5 balls of color R, got 9 points.
Move 8 at (1,1): removed 5 balls of color B, got 9 points.
Move 9 at (1,8): removed 5 balls of color G, got 9 points.
Move 10 at (1,1): removed 4 balls of color G, got 4 points.
Move 11 at (1,1): removed 4 balls of color R, got 4 points.
Move 12 at (1,2): removed 4 balls of color B, got 4 points.
Move 13 at (1,9): removed 4 balls of color R, got 4 points.
Move 14 at (1,3): removed 3 balls of color G, got 1 points.
Move 15 at (1,2): removed 3 balls of color R, got 1 points.
Move 16 at (1,4): removed 3 balls of color R, got 1 points.
Move 17 at (3,4): removed 3 balls of color B, got 1 points.
Move 18 at (2,5): removed 3 balls of color G, got 1 points.
Move 19 at (1,5): removed 3 balls of color B, got 1 points.
Move 20 at (1,1): removed 2 balls of color G, got 0 points.
Move 21 at (1,2): removed 2 balls of color B, got 0 points.
Move 22 at (1,2): removed 4 balls of color G, got 4 points.
Move 23 at (1,1): removed 2 balls of color R, got 0 points.
Final score: 1265, with 1 balls remaining. GGBRGBGGGGRBGRR
GRGRBRRGRBGRGGG
BRGRBGRGGGRRRBB
GGBBGGRRBGBBBBG
RBGBBBRBRBRRRRR
RRGBRGGBBBBBGRG
BGRRBBRRBBRBRBG
RGRGRBRGRRBGGBB
BBRRBGBGBBBBGBR
GBGGRBBBBGRBGBG
Game 13: Move 1 at (1,6): removed 11 balls of color B, got 81 points.
Move 2 at (4,8): removed 13 balls of color B, got 121 points.
Move 3 at (1,9): removed 11 balls of color R, got 81 points.
Move 4 at (1,8): removed 13 balls of color G, got 121 points.
Move 5 at (2,13): removed 6 balls of color B, got 16 points.
Move 6 at (2,3): removed 5 balls of color R, got 9 points.
Move 7 at (3,2): removed 7 balls of color G, got 25 points.
Move 8 at (2,1): removed 10 balls of color B, got 64 points.
Move 9 at (1,4): removed 5 balls of color R, got 9 points.
Move 10 at (6,5): removed 5 balls of color R, got 9 points.
Move 11 at (4,4): removed 8 balls of color G, got 36 points.
Move 12 at (3,3): removed 6 balls of color B, got 16 points.
Move 13 at (1,6): removed 5 balls of color R, got 9 points.
Move 14 at (1,9): removed 5 balls of color R, got 9 points.
Move 15 at (4,1): removed 4 balls of color R, got 4 points.
Move 16 at (3,10): removed 4 balls of color G, got 4 points.
Move 17 at (4,1): removed 3 balls of color G, got 1 points.
Move 18 at (1,5): removed 3 balls of color G, got 1 points.
Move 19 at (3,1): removed 2 balls of color B, got 0 points.
Move 20 at (3,1): removed 2 balls of color G, got 0 points.
Move 21 at (1,3): removed 2 balls of color G, got 0 points.
Move 22 at (1,3): removed 2 balls of color B, got 0 points.
Move 23 at (1,2): removed 3 balls of color R, got 1 points.
Move 24 at (1,5): removed 2 balls of color G, got 0 points.
Move 25 at (1,4): removed 3 balls of color B, got 1 points.
Move 26 at (1,4): removed 2 balls of color R, got 0 points.
Move 27 at (1,3): removed 2 balls of color G, got 0 points.
Move 28 at (1,2): removed 2 balls of color B, got 0 points.
Move 29 at (1,1): removed 2 balls of color G, got 0 points.
Move 30 at (1,1): removed 2 balls of color R, got 0 points.
Final score: 1618, with 0 balls remaining. GGBBGRBGBBRBBBR
RGGRRRBRBBBBBRR
RBGRBRGGRGRRGGB
GGBGRGGGRBGGGRG
RGRBRRBGBBGGRGR
GBBBGRGRGRGRGGG
GGBGGGGRBRGGGBG
RGBBRBRRGGGGRRR
GGGBRGRGRGRBGRG
GBGGRBBRBBRRBBB
Game 14: Move 1 at (3,9): removed 21 balls of color G, got 361 points.
Move 2 at (2,9): removed 15 balls of color R, got 169 points.
Move 3 at (1,9): removed 15 balls of color B, got 169 points.
Move 4 at (1,1): removed 10 balls of color G, got 64 points.
Move 5 at (1,2): removed 7 balls of color B, got 25 points.
Move 6 at (4,2): removed 10 balls of color G, got 64 points.
Move 7 at (4,4): removed 9 balls of color R, got 49 points.
Move 8 at (2,7): removed 7 balls of color R, got 25 points.
Move 9 at (4,6): removed 7 balls of color G, got 25 points.
Move 10 at (1,5): removed 7 balls of color B, got 25 points.
Move 11 at (3,2): removed 6 balls of color B, got 16 points.
Move 12 at (2,6): removed 5 balls of color R, got 9 points.
Move 13 at (2,8): removed 5 balls of color B, got 9 points.
Move 14 at (1,6): removed 4 balls of color G, got 4 points.
Move 15 at (1,1): removed 2 balls of color R, got 0 points.
Move 16 at (1,1): removed 3 balls of color G, got 1 points.
Move 17 at (1,1): removed 3 balls of color R, got 1 points.
Move 18 at (1,1): removed 2 balls of color G, got 0 points.
Move 19 at (1,1): removed 2 balls of color R, got 0 points.
Move 20 at (1,1): removed 2 balls of color G, got 0 points.
Move 21 at (1,1): removed 2 balls of color R, got 0 points.
Move 22 at (1,2): removed 2 balls of color G, got 0 points.
Move 23 at (1,1): removed 2 balls of color B, got 0 points.
Move 24 at (1,1): removed 2 balls of color R, got 0 points.
Final score: 2016, with 0 balls remaining. GRBGBBRGBRBGGBG
BBGGGBBBRGRRGGR
BGRRRRBGBGRGBBB
RBGRBGBGBRBRGRR
RRGGGGGGRBBBBGB
RBRBRRRGRRGRRBG
RBBGRGBGGRRBBBR
RGRGGBBBGGRBGRG
GRGBGBRBGBRGRRR
BBRGBGGGBGGGGRB
Game 15: Move 1 at (6,3): removed 16 balls of color G, got 196 points.
Move 2 at (3,1): removed 11 balls of color R, got 81 points.
Move 3 at (2,6): removed 10 balls of color B, got 64 points.
Move 4 at (3,4): removed 9 balls of color G, got 49 points.
Move 5 at (2,5): removed 15 balls of color R, got 169 points.
Move 6 at (2,4): removed 12 balls of color B, got 100 points.
Move 7 at (1,7): removed 8 balls of color G, got 36 points.
Move 8 at (3,1): removed 7 balls of color B, got 25 points.
Move 9 at (2,1): removed 5 balls of color G, got 9 points.
Move 10 at (2,3): removed 5 balls of color G, got 9 points.
Move 11 at (1,9): removed 5 balls of color R, got 9 points.
Move 12 at (1,7): removed 8 balls of color B, got 36 points.
Move 13 at (1,5): removed 5 balls of color R, got 9 points.
Move 14 at (2,6): removed 4 balls of color R, got 4 points.
Move 15 at (1,7): removed 4 balls of color G, got 4 points.
Move 16 at (1,4): removed 6 balls of color B, got 16 points.
Move 17 at (2,2): removed 4 balls of color R, got 4 points.
Move 18 at (1,3): removed 4 balls of color G, got 4 points.
Move 19 at (1,1): removed 5 balls of color B, got 9 points.
Move 20 at (1,2): removed 2 balls of color G, got 0 points.
Move 21 at (1,1): removed 2 balls of color R, got 0 points.
Final score: 833, with 3 balls remaining. GRRRGRGBBGBBRGB
RGBRRRBRBGBBBGR
RGRBGBBGRBBGBRB
RGGGGBBRGBGBBRB
RBGBRBGBBRBGBRG
RGBRBRGBRGBGGGG
RGRRRGGGRRRGBGB
GRRRBRBGGBRBBBR
RGRGRGRBGRGGGRB
BBRRRRGGGRRBBBB
Game 16: Move 1 at (3,2): removed 13 balls of color R, got 121 points.
Move 2 at (7,10): removed 12 balls of color B, got 100 points.
Move 3 at (7,9): removed 13 balls of color G, got 121 points.
Move 4 at (1,6): removed 11 balls of color G, got 81 points.
Move 5 at (4,6): removed 12 balls of color B, got 100 points.
Move 6 at (1,6): removed 13 balls of color R, got 121 points.
Move 7 at (3,1): removed 7 balls of color G, got 25 points.
Move 8 at (2,1): removed 8 balls of color R, got 36 points.
Move 9 at (2,11): removed 6 balls of color B, got 16 points.
Move 10 at (3,13): removed 6 balls of color R, got 16 points.
Move 11 at (1,12): removed 8 balls of color B, got 36 points.
Move 12 at (1,10): removed 6 balls of color G, got 16 points.
Move 13 at (3,3): removed 5 balls of color B, got 9 points.
Move 14 at (1,1): removed 4 balls of color B, got 4 points.
Move 15 at (1,1): removed 4 balls of color G, got 4 points.
Move 16 at (1,1): removed 4 balls of color R, got 4 points.
Move 17 at (4,2): removed 4 balls of color R, got 4 points.
Move 18 at (2,2): removed 3 balls of color G, got 1 points.
Move 19 at (1,3): removed 3 balls of color G, got 1 points.
Move 20 at (1,3): removed 3 balls of color B, got 1 points.
Move 21 at (1,2): removed 3 balls of color R, got 1 points.
Final score: 818, with 2 balls remaining. RRGGGBBGBGBGBRG
RBRGRRGRBGGBGBG
GBBBBRBBGRRRGBB
GBBBGGRRGRGRBGR
BBBGGBRGRRBRGRB
GRRBRGGBGBRBRBB
GRGGGGGGGRBRGRR
BBBGBGBRRGRBRGR
RGRBRRGBGRRGGBG
BRRBRRRRGRGRGGB
Game 17: Move 1 at (4,3): removed 12 balls of color G, got 100 points.
Move 2 at (6,1): removed 10 balls of color B, got 64 points.
Move 3 at (3,1): removed 9 balls of color B, got 49 points.
Move 4 at (1,2): removed 8 balls of color R, got 36 points.
Move 5 at (4,6): removed 8 balls of color R, got 36 points.
Move 6 at (1,5): removed 7 balls of color R, got 25 points.
Move 7 at (1,2): removed 9 balls of color G, got 49 points.
Move 8 at (1,1): removed 6 balls of color B, got 16 points.
Move 9 at (1,3): removed 7 balls of color G, got 25 points.
Move 10 at (2,1): removed 5 balls of color G, got 9 points.
Move 11 at (1,1): removed 4 balls of color R, got 4 points.
Move 12 at (1,4): removed 4 balls of color R, got 4 points.
Move 13 at (2,2): removed 4 balls of color B, got 4 points.
Move 14 at (1,2): removed 6 balls of color R, got 16 points.
Move 15 at (1,2): removed 4 balls of color G, got 4 points.
Move 16 at (2,3): removed 4 balls of color G, got 4 points.
Move 17 at (3,3): removed 5 balls of color R, got 9 points.
Move 18 at (1,1): removed 5 balls of color B, got 9 points.
Move 19 at (2,1): removed 6 balls of color R, got 16 points.
Move 20 at (1,1): removed 7 balls of color G, got 25 points.
Move 21 at (1,1): removed 8 balls of color B, got 36 points.
Move 22 at (1,1): removed 3 balls of color G, got 1 points.
Move 23 at (2,2): removed 3 balls of color B, got 1 points.
Move 24 at (1,2): removed 3 balls of color R, got 1 points.
Move 25 at (1,2): removed 2 balls of color G, got 0 points.
Final score: 543, with 1 balls remaining. RRRBBGBRRRGGBBG
RBRGBRGRRGRBGBG
BBRGGBRGGRGGRBG
RRRGBRRRBBGRGGR
BGRBRRBBRRGBRRB
RGGBRRBBBBGRGBR
GRRBGRRRRBBRRBB
RBRGBGBRGRBGBBG
GRGRBBRRGBGRRRB
BGGRRGGBGRBRBRG
Game 18: Move 1 at (5,5): removed 15 balls of color R, got 169 points.
Move 2 at (7,1): removed 10 balls of color R, got 64 points.
Move 3 at (2,5): removed 10 balls of color B, got 64 points.
Move 4 at (2,5): removed 9 balls of color G, got 49 points.
Move 5 at (4,4): removed 5 balls of color B, got 9 points.
Move 6 at (5,2): removed 8 balls of color G, got 36 points.
Move 7 at (5,11): removed 5 balls of color G, got 9 points.
Move 8 at (1,12): removed 5 balls of color R, got 9 points.
Move 9 at (1,13): removed 6 balls of color B, got 16 points.
Move 10 at (4,10): removed 5 balls of color B, got 9 points.
Move 11 at (3,10): removed 7 balls of color R, got 25 points.
Move 12 at (2,11): removed 8 balls of color G, got 36 points.
Move 13 at (4,13): removed 5 balls of color B, got 9 points.
Move 14 at (6,1): removed 4 balls of color B, got 4 points.
Move 15 at (1,4): removed 4 balls of color R, got 4 points.
Move 16 at (1,2): removed 3 balls of color G, got 1 points.
Move 17 at (1,2): removed 3 balls of color R, got 1 points.
Move 18 at (1,1): removed 4 balls of color B, got 4 points.
Move 19 at (1,5): removed 3 balls of color R, got 1 points.
Move 20 at (1,4): removed 5 balls of color B, got 9 points.
Move 21 at (2,4): removed 4 balls of color R, got 4 points.
Move 22 at (1,3): removed 3 balls of color G, got 1 points.
Move 23 at (1,6): removed 3 balls of color R, got 1 points.
Move 24 at (4,7): removed 3 balls of color G, got 1 points.
Move 25 at (1,2): removed 2 balls of color R, got 0 points.
Move 26 at (1,3): removed 2 balls of color G, got 0 points.
Move 27 at (1,2): removed 3 balls of color B, got 1 points.
Move 28 at (2,1): removed 3 balls of color R, got 1 points.
Move 29 at (1,1): removed 2 balls of color G, got 0 points.
Final score: 537, with 1 balls remaining. BGRGBGGGGRBRRRG
RBBGBRBGBRBGBBR
GGBBBBRRGGBRRRR
GGBGBGRRRBRGBGR
BGRGRGRBBGBGRGG
RBRRGRGRRBRGRGR
GRBBRBBBRGGRGRR
BRGBBBBGGGRBGRG
GGRBBGRRRRGBGGG
BBGGRBGBGGRRBBR
Game 19: Move 1 at (4,3): removed 11 balls of color B, got 81 points.
Move 2 at (4,7): removed 9 balls of color R, got 49 points.
Move 3 at (5,4): removed 6 balls of color B, got 16 points.
Move 4 at (3,3): removed 6 balls of color G, got 16 points.
Move 5 at (3,2): removed 10 balls of color R, got 64 points.
Move 6 at (2,5): removed 9 balls of color G, got 49 points.
Move 7 at (8,11): removed 6 balls of color R, got 16 points.
Move 8 at (2,12): removed 6 balls of color G, got 16 points.
Move 9 at (2,12): removed 7 balls of color R, got 25 points.
Move 10 at (2,11): removed 6 balls of color B, got 16 points.
Move 11 at (3,1): removed 5 balls of color B, got 9 points.
Move 12 at (2,1): removed 6 balls of color G, got 16 points.
Move 13 at (2,5): removed 5 balls of color R, got 9 points.
Move 14 at (2,6): removed 5 balls of color B, got 9 points.
Move 15 at (2,5): removed 10 balls of color G, got 64 points.
Move 16 at (3,7): removed 8 balls of color R, got 36 points.
Move 17 at (1,9): removed 9 balls of color G, got 49 points.
Move 18 at (1,5): removed 4 balls of color B, got 4 points.
Move 19 at (1,3): removed 4 balls of color G, got 4 points.
Move 20 at (1,1): removed 3 balls of color B, got 1 points.
Move 21 at (1,3): removed 3 balls of color R, got 1 points.
Move 22 at (1,3): removed 4 balls of color B, got 4 points.
Move 23 at (3,1): removed 2 balls of color G, got 0 points.
Final score: 554, with 6 balls remaining. GGBGGBBRBBGBBBR
GRBRGGRBGGRGRRG
BGBRBRRBBBGBRRR
RBBRGBBGGRBBGRG
RGBRBGBRGBBRRGB
BGRRGRGGGGRGGRR
BRGBBBRBRGGGRBB
GGBRRBBGGRGRBBG
BGGGBRRBBBRBGGG
BBBRGBBGBRGGBGB
Game 20: Move 1 at (5,7): removed 13 balls of color G, got 121 points.
Move 2 at (3,10): removed 9 balls of color R, got 49 points.
Move 3 at (2,8): removed 15 balls of color B, got 169 points.
Move 4 at (1,11): removed 12 balls of color G, got 100 points.
Move 5 at (4,4): removed 8 balls of color B, got 36 points.
Move 6 at (5,3): removed 13 balls of color R, got 121 points.
Move 7 at (1,6): removed 9 balls of color B, got 49 points.
Move 8 at (3,1): removed 8 balls of color G, got 36 points.
Move 9 at (1,1): removed 7 balls of color B, got 25 points.
Move 10 at (4,2): removed 6 balls of color B, got 16 points.
Move 11 at (2,13): removed 6 balls of color R, got 16 points.
Move 12 at (4,1): removed 5 balls of color G, got 9 points.
Move 13 at (1,12): removed 5 balls of color B, got 9 points.
Move 14 at (1,1): removed 4 balls of color R, got 4 points.
Move 15 at (2,5): removed 4 balls of color B, got 4 points.
Move 16 at (2,9): removed 4 balls of color R, got 4 points.
Move 17 at (1,8): removed 7 balls of color G, got 25 points.
Move 18 at (2,6): removed 5 balls of color R, got 9 points.
Move 19 at (1,5): removed 3 balls of color G, got 1 points.
Move 20 at (1,2): removed 2 balls of color G, got 0 points.
Move 21 at (2,3): removed 2 balls of color G, got 0 points.
Final score: 803, with 3 balls remaining.