Input:
Code: Select all
3
1 2 1
2 1 2
1 2 1
2 1 2
1 2 1
2 1 2
Code: Select all
1
The only way I can see that A will win two is if we group them this way (Basically pick two corners as two of the districts, and the third district is the diagonal)
Code: Select all
X X Y
X Y Z
Y Z Z
Any insights would be appreciated. Thanks.The zones of a district are adjacent, that is, we can reach all the zones of a same district by moving to the left, right, up or down.