Statistics

Problem Statement for "RectangleAvoidingColoring"

Problem Statement

There is an N x M board divided into 1 x 1 cells. The rows of the board are numbered from 0 to N-1, and the columns are numbered from 0 to M-1. The cell located in row r and column c has coordinates (r, c).

In a coloring of the board, each cell on the board is colored white or black. A coloring is called rectangle-avoiding if it is impossible to choose 4 distinct cells of the same color so that their centers form a rectangle whose sides are parallel to the sides of the board. In other words, a coloring is rectangle-avoiding if, for each a, b, c, and d with 0 <= a < b < N, 0 <= c < d < M, there is at least one white cell and at least one black cell among the cells (a, c), (a, d), (b, c) and (b, d).

You are given a String[] board representing a board. The j-th character of the i-th element of board represents cell (i, j), and it can be 'W', 'B' or '?'. Here, 'W' indicates a white cell, 'B' indicates a black cell and '?' indicates an uncolored cell. For each uncolored cell, you may choose to color it either white or black. Return the number of different rectangle-avoiding colorings that can be achieved. If it is impossible to achieve a rectangle-avoiding coloring, return 0.

Definition

Class:
RectangleAvoidingColoring
Method:
count
Parameters:
String[]
Returns:
long
Method signature:
long count(String[] board)
(be sure your method is public)

Notes

  • Two colorings are different if there is a cell on the board that is colored white in one coloring and black in the other coloring.
  • The answer will always fit into a 64-bit signed integer data type.

Constraints

  • board will contain between 1 and 50 elements, inclusive.
  • Each element of board will contain between 1 and 50 characters, inclusive.
  • All elements of board will contain the same number of characters.
  • Each character in each element of board will be 'W', 'B' or '?'.

Examples

  1. {"??", "??"}

    Returns: 14

    Since each cell can be black or white, there are 2^4 = 16 ways to color this board. Of them, only 2 monochromatic colorings are not rectangle-avoiding, so the answer is 16 - 2 = 14.

  2. {"B?", "?B"}

    Returns: 3

    It is the same board as in previous example, but colors for some cells are already predefined. There are 4 ways to color the remaining cells and in one of them the board becomes completely black. Therefore the answer is 4 - 1 = 3.

  3. {"WW", "WW"}

    Returns: 0

    This board is already colored and the coloring is not rectangle-avoiding.

  4. {"??B??", "W???W", "??B??"}

    Returns: 12

  5. {"??", "W?", "W?", "?W", "W?"}

    Returns: 16

  6. {"?"}

    Returns: 2

  7. {"W"}

    Returns: 1

  8. {"B"}

    Returns: 1

  9. {"??"}

    Returns: 4

  10. {"BB"}

    Returns: 1

  11. {"W?"}

    Returns: 2

  12. {"?","?"}

    Returns: 4

  13. {"B","B"}

    Returns: 1

  14. {"W","W"}

    Returns: 1

  15. {"???????????????????"}

    Returns: 524288

  16. {"????????"}

    Returns: 256

  17. {"?WBBBBBWWB?BBBBW?WBBW"}

    Returns: 8

  18. {"?","?","?","?","?","?","?"}

    Returns: 128

  19. {"B","B","?","?","?","?","B","B","?","?","?","?"}

    Returns: 256

  20. {"W","W","W","W","W","B","W","B","?","?","B","B","B","B","W","B"}

    Returns: 4

  21. {"??????????????????????????????????????????????????"}

    Returns: 1125899906842624

  22. {"BBBBBBBBBBBWBBBBBWBBBBB?BBBBBB?BBBBBBBBBBBBBBBBBBB"}

    Returns: 4

  23. {"WWWWB?WBWBBW???BBW?BWBWWBWWWBBWW?BWWBBWWBBWWWWB?WW"}

    Returns: 128

  24. {"?","?","?","?","?","?","?","?","?","?","?","?","?","?","?","?","?","?","?","?","?","?","?","?","?","?","?","?","?","?","?","?","?","?","?","?","?","?","?","?","?","?","?","?","?","?","?","?","?","?"}

    Returns: 1125899906842624

  25. {"?","W","W","?","W","?","?","W","?","W","?","W","W","B","B","?","B","?","W","W","W","?","?","?","?","W","?","?","?","W","W","W","?","?","?","?","?","W","?","?","?","W","W","?","W","?","?","?","?","W"}

    Returns: 268435456

  26. {"B","B","W","B","W","?","?","W","W","B","?","W","B","B","W","B","W","W","?","W","W","?","?","?","W","W","?","W","?","?","B","?","B","B","B","?","W","?","?","B","W","B","B","?","?","B","?","W","?","?"}

    Returns: 524288

  27. {"??","??"}

    Returns: 14

  28. {"W?","W?"}

    Returns: 3

  29. {"W?","??"}

    Returns: 7

  30. {"?????????????????????????????","?????????????????????????????"}

    Returns: 125090922496

  31. {"BBWWW?BBWBBWWWBWBBBWWWWWWWWB?B","BWBBWBWBB?WB?WBWWWWBWBWWBWWWBB"}

    Returns: 0

  32. {"??B??W?W???B????????W?W?WWB?B???WWW","?W????B??B??WB??W????BB?BBW?W????BW"}

    Returns: 475136

  33. {"??","??","??","??","??","??","??","??","??","??","??","??","??","??","??","??","??","??","??","??","??","??","??","??","??","??","??","??","??","??","??","??","??","??","??","??","??","??","??"}

    Returns: 225674761601024

  34. {"WB","BW","WW","WB","WB","WW","WB","BW","BW"}

    Returns: 0

  35. {"?W","??","?W","?W","W?","?W","??","?W","B?","?B","??","??","?W","??","??","?B","?B","?W","B?","W?","?B","W?","?W","??","BW","??","?W","WW","??","B?","BW","??","??","W?","BW","??"}

    Returns: 57344

  36. {"????????????????","????????????????"}

    Returns: 5046272

  37. {"BB??????????BBBB??BBBW???B????BB?BB???WB??W???","?W??BBB?B?B???B??BB?W???WBBB??B??BBB?W?BB??B??"}

    Returns: 0

  38. {"???B?B????W?BB???WB???WW?????BW?B????????","BBB???W?B?B???B?W???????B?B?????B???BB??B"}

    Returns: 2031616

  39. {"??","??","??","??","??","??","??","??","??","??","??","??","??","??","??"}

    Returns: 2244608

  40. {"WW","?W","WW","BB","WW","?B","BW","W?","?B","BB","WB","WW","?W","BW","BB","?B","?W","BW","W?","WW","BW","BW","WB","?W","?B","BW","?W"}

    Returns: 0

  41. {"BW","?B","WB","?W","?W","BB","WB","W?"}

    Returns: 4

  42. {"??????????????????????????????????????????????????","??????????????????????????????????????????????????"}

    Returns: 747034588190081024

  43. {"WW?W????B?W?WB??W???WWWW?BWWWWBWW??W?WWWBW??BWW??W","?B???BW?B?W?W??BW???WWW?B?W??W??BW?W??WWW??WW?W??W"}

    Returns: 0

  44. {"???????????W??????????????W????W?W??W??W???W???W??","????????W???W?????WW???????W??????????W??????W????"}

    Returns: 20993800142848

  45. {"??","??","??","??","??","??","??","??","??","??","??","??","??","??","??","??","??","??","??","??","??","??","??","??","??","??","??","??","??","??","??","??","??","??","??","??","??","??","??","??","??","??","??","??","??","??","??","??","??","??"}

    Returns: 747034588190081024

  46. {"W?","B?","??","B?","W?","W?","?W","??","??","B?","?W","?W","?W","B?","??","BB","??","W?","W?","BW","?B","?B","?W","?W","?W","WB","??","??","W?","??","W?","BW","??","B?","??","BW","BB","??","W?","??","W?","??","??","WW","??","?W","WW","??","B?","BW"}

    Returns: 0

  47. {"W?","?W","?W","?W","B?","?B","WB","B?","??","??","??","??","?W","?B","B?","??","??","??","?W","?W","?W","??","?W","??","W?","B?","?W","?W","??","??","??","??","??","??","?W","??","W?","WW","??","??","?B","??","?W","WB","??","B?","?B","??","BW","??"}

    Returns: 88080384

  48. {"??????????????????????????????????????????????????","??????????????????????????????????????????????????"}

    Returns: 747034588190081024

  49. {"BBWB?B?BBBB?BW?BB?WBBBBB??BB?BBBB?B??BBBWBBBBBWB?B","BWBBBWBBBBB???B??B?BBBW?WB?BBBBB?BB?WBBB?BB?BBB?BB"}

    Returns: 0

  50. {"?W?B??BWBWBWW???W??WW??????W??B?W?W??B???????W?W??","BBW?????BW?BBWW??B???BWW?W?B?????W??W?BWWB????W???"}

    Returns: 32768

  51. {"??","??","??","??","??","??","??","??","??","??","??","??","??","??","??","??","??","??","??","??","??","??","??","??","??","??","??","??","??","??","??","??","??","??","??","??","??","??","??","??","??","??","??","??","??","??","??","??","??","??"}

    Returns: 747034588190081024

  52. {"BB","?W","??","??","??","?B","?B","??","??","??","B?","?B","??","??","??","BB","?B","?B","??","??","??","BB","B?","??","B?","B?","??","B?","??","??","??","B?","?B","??","??","?B","??","??","B?","??","B?","B?","??","??","??","B?","?W","?B","B?","??"}

    Returns: 0

  53. {"??","??","??","??","??","??","B?","?B","?B","??","B?","??","?B","??","??","??","??","??","??","??","?B","??","??","??","??","?B","?W","??","??","?B","B?","B?","??","?W","B?","??","??","??","??","??","??","??","??","??","??","?B","??","B?","??","??"}

    Returns: 21887153340416

  54. {"???","???","???"}

    Returns: 156

  55. {"WWW","WWB","WWW"}

    Returns: 0

  56. {"B?B","W??","BB?"}

    Returns: 4

  57. {"????","????","????"}

    Returns: 408

  58. {"??B?","B??B","?WB?"}

    Returns: 12

  59. {"????","W?WW","BWWB"}

    Returns: 4

  60. {"???","???","???","???"}

    Returns: 408

  61. {"???","???","BBB","?BB"}

    Returns: 0

  62. {"WB?","WWB","B??","WBB"}

    Returns: 3

  63. {"?????","?????","?????"}

    Returns: 720

  64. {"??BB?","?W?BB","???B?"}

    Returns: 0

  65. {"??W??","?????","?????"}

    Returns: 360

  66. {"???","???","???","???","???"}

    Returns: 720

  67. {"?W?","???","B??","WW?","W??"}

    Returns: 16

  68. {"?W?","W??","??W","?WW","B??"}

    Returns: 6

  69. {"??????","??????","??????"}

    Returns: 720

  70. {"BWBW?B","BWBW?B","?B??WW"}

    Returns: 0

  71. {"?BBWW?","BBWW??","???BB?"}

    Returns: 2

  72. {"???","???","???","???","???","???"}

    Returns: 720

  73. {"B?W","WBB","BWB","BWW","WBW","WWW"}

    Returns: 0

  74. {"???","???","B?B","???","??B","B??"}

    Returns: 24

  75. {"???????","???????","???????"}

    Returns: 0

  76. {"B?W??W?","?WWWWWB","W?WBWW?"}

    Returns: 0

  77. {"???","???","???","???","???","???","???"}

    Returns: 0

  78. {"???","??W","B?W","B?B","B?B","W?B","??B"}

    Returns: 0

  79. {"?????????????????????????????????????????????","?????????????????????????????????????????????","?????????????????????????????????????????????"}

    Returns: 0

  80. {"?BBWWB?WW??BWWB?WWWWW?B","W?W?W?B??BB?BWB?WWBW?B?","?WWWBWWW????BB?WWBWBW?W"}

    Returns: 0

  81. {"???","???","???","???","???","???","???","???","???","???","???","???","???","???","???","???","???","???","???","???","???","???","???","???","???","???","???","???","???","???","???","???","???","???","???"}

    Returns: 0

  82. {"W?B","BBB","BBB","???","BBB","?WW","???","?WB","?BW","??B","BW?","BBW","B??","W?W","?BW","W??","?B?","?BW","?BB"}

    Returns: 0

  83. {"??????????????????????????????????????????????????","??????????????????????????????????????????????????","??????????????????????????????????????????????????"}

    Returns: 0

  84. {"BW?B???W???W?WW?W??WW?WW??W?W???WBB???WWWWBW?????W","W????WW?W???WWBW?BW?WWW??WB??W?WW??WW??WW?BWWWBWWW","??WWWWBBWWW?WBBW?WW?WWWBW?WB?WWWWWW?B??WB?W?BWWB??"}

    Returns: 0

  85. {"???","???","???","???","???","???","???","???","???","???","???","???","???","???","???","???","???","???","???","???","???","???","???","???","???","???","???","???","???","???","???","???","???","???","???","???","???","???","???","???","???","???","???","???","???","???","???","???","???","???"}

    Returns: 0

  86. {"WWW","BBW","WWB","?WB","?WW","?WB","?BW","W?B","W??","WWW","W?W","WW?","WWW","WWB","BBB","W?B","W?B","BWW","WWB","WWW","WBB","W?W","WBW","?BW","BWB","?WB","BWB","?BB","BWW","BBB","WW?","WW?","BBW","W?W","?W?","BBB","BBW","WWW","B?W","BBB","BWB","?WB","BWB","BBW","WBW","WWW","BWB","?WB","WB?","BWW"}

    Returns: 0

  87. {"????","????","????","????"}

    Returns: 840

  88. {"WBBB","WB??","???B","BBB?"}

    Returns: 0

  89. {"?BBW","BW??","WW??","??W?"}

    Returns: 15

  90. {"?????","?????","?????","?????"}

    Returns: 720

  91. {"?BB?B","??WW?","WWWB?","B?WBB"}

    Returns: 0

  92. {"??WBB","?W??W","W?BWB","B??B?"}

    Returns: 1

  93. {"????","????","????","????","????"}

    Returns: 720

  94. {"BBWW","?BWB","BWBB","B?BW","WW?B"}

    Returns: 0

  95. {"BB??","??WB","???W","B?B?","?W??"}

    Returns: 3

  96. {"??????","??????","??????","??????"}

    Returns: 720

  97. {"?WBWBW","WWBBW?","?WWBBB","BBBBW?"}

    Returns: 0

  98. {"?WB?W?","??????","??WW?W","???B?W"}

    Returns: 2

  99. {"????","????","????","????","????","????"}

    Returns: 720

  100. {"???W","W??B","?W??","W???","??WW","W?WW"}

    Returns: 0

  101. {"??BB","?B??","????","B?B?","????","B???"}

    Returns: 10

  102. {"???????","???????","???????","???????"}

    Returns: 0

  103. {"?BB??B?","B?BBB?B","?BBBBB?","?WWWB??"}

    Returns: 0

  104. {"????","????","????","????","????","????","????"}

    Returns: 0

  105. {"BWWB","BW?W","WBWW","WWBW","B??W","WBWB","WB??"}

    Returns: 0

  106. {"????????????????????????????????????????","????????????????????????????????????????","????????????????????????????????????????","????????????????????????????????????????"}

    Returns: 0

  107. {"?WW??WBW?WBWBBW?BWWBWB?B?W","WWWWB??B?WWB???WW??WWWB?W?","?WBW??WWBWW?BWWWWWWW?BWWW?","WWWBBWW?W?BBB????B?WWWBWW?"}

    Returns: 0

  108. {"????","????","????","????","????","????","????","????","????","????","????","????","????","????","????","????","????","????","????","????","????","????","????","????","????","????","????","????","????","????","????","????","????","????","????","????","????","????","????","????","????","????","????","????","????","????","????","????","????"}

    Returns: 0

  109. {"????","BBWB","B?BW","??B?","?B??","BBWB","?WBB","B?BB","WWB?","?B??","?B??","B?BW","W??B","W???","W???","WW?B","W?B?","BBB?","WW?B","WB?B","BW??","WBB?","?B?W","?WW?","?B?B","WB?B","BWBB","B?WW","B?BW","WWB?"}

    Returns: 0

  110. {"??????????????????????????????????????????????????","??????????????????????????????????????????????????","??????????????????????????????????????????????????","??????????????????????????????????????????????????"}

    Returns: 0

  111. {"BBB?W?W??BW?BB??WB?WBWBBWBBW?WB?BW?WBB??W?W?WBW?BW","?BB?W??WBWBBBBB?WBW?WBW??B?BB?WWBBBBW?????W?BW??BW","WBW??BWBB?BWW?BWWWWWBWBB??????BBWWB??WWB??WWB?WBBB","W?WWWWWW?BWWW?BWWB??WBW?WW?WBB?WW???WBBWBW?WW?B?WB"}

    Returns: 0

  112. {"????","????","????","????","????","????","????","????","????","????","????","????","????","????","????","????","????","????","????","????","????","????","????","????","????","????","????","????","????","????","????","????","????","????","????","????","????","????","????","????","????","????","????","????","????","????","????","????","????","????"}

    Returns: 0

  113. {"W?WW","W?W?","W?W?","W?WW","???W","?WWW","?WWW","WWWW","?W?W","WW?W","WWB?","WW?W","?WWW","??BW","WW??","?WW?","???W","W???","?WBW","WBW?","W?W?","W?WW","BWWW","?W?W","WWWW","WWWW","??W?","?WWW","????","?WW?","W???","W?WW","W?WW","?W??","?WBW","WWW?","WWWW","WW??","?W?W","??WW","WW?W","B?WW","WWWW","??W?","?WBW","?WW?","W??W","????","?B??","W??W"}

    Returns: 0

  114. {"?????","?????","?????","?????","?????"}

    Returns: 0

  115. {"BW?W?","BWWWB","WWWW?","?WW?B","B?BW?"}

    Returns: 0

  116. {"??????","??????","??????","??????","??????","??????"}

    Returns: 0

  117. {"B???BB","B?B?BW","?BB?WW","W?B??B","BWW?W?","BBBBBB"}

    Returns: 0

  118. {"???????","???????","???????","???????","???????","???????","???????"}

    Returns: 0

  119. {"BWBBBWB","WWBBBWB","WWWWBBB","WWBWBBB","WWWBBBW","BWBWBBW","WBWWBWW"}

    Returns: 0

  120. {"??????","??????","??????","??????","??????"}

    Returns: 0

  121. {"?B??BB","BB??WB","BB?BWB","WWW?WB","BB?B?B"}

    Returns: 0

  122. {"?????","?????","?????","?????","?????","?????"}

    Returns: 0

  123. {"???BW","BWW?W","W?BWB","B?BBB","WWBB?","WBBB?"}

    Returns: 0

  124. {"???????","???????","???????","???????","???????"}

    Returns: 0

  125. {"WBWBWWB","BBWBWBB","WBBWBBW","WWWWWBW","WWBWWBB"}

    Returns: 0

  126. {"?????","?????","?????","?????","?????","?????","?????"}

    Returns: 0

  127. {"BWWWW","WBBW?","?W???","BWBBW","B?BBB","??BWB","WWBB?"}

    Returns: 0

  128. {"???????","???????","???????","???????","???????","???????"}

    Returns: 0

  129. {"???WW??","B???WWW","?W??W??","?W?WW??","W??????","??W?W??"}

    Returns: 0

  130. {"??????","??????","??????","??????","??????","??????","??????"}

    Returns: 0

  131. {"WB??B?","?BBW?B","BW?WWB","?BBBW?","B?B?B?","BB?WBB","?WBBB?"}

    Returns: 0

  132. {"??????????????????????????????????????????????????","??????????????????????????????????????????????????","??????????????????????????????????????????????????","??????????????????????????????????????????????????","??????????????????????????????????????????????????"}

    Returns: 0

  133. {"WW?BW???B?B???WB??WBWB??B??WBWWB?B?BB?WBBW????WWBW","W????BWWW??WWWB?W?BWWWWW?WWW?WWW??WBWBB?B?WWBWB??W","B?B?????WBW??WBWBBBBBWWWB?B??W?WW?BWW?WWWWWB??W?WW","BW??WWW?????W??WBBW??BBBBBWWWW??B?BBWWWW?BWWBBBBWW","W?WWW????WWWB?WWW??W?W??WBWB?BBWBWB???BBBWW?WB??WB"}

    Returns: 0

  134. {"?????","?????","?????","?????","?????","?????","?????","?????","?????","?????","?????","?????","?????","?????","?????","?????","?????","?????","?????","?????","?????","?????","?????","?????","?????","?????","?????","?????","?????","?????","?????","?????","?????","?????","?????","?????","?????","?????","?????","?????","?????","?????","?????","?????","?????","?????","?????","?????","?????","?????"}

    Returns: 0

  135. {"BB?B?","WWBBB","BWBBW","WWW?W","BW???","BBWBB","BBWBW","BB??W","BBBWB","BBBBW","?BBB?","BWBBW","?BB??","BBBB?","BBWB?","BWWBB","WBBWB","BWBWB","?W?B?","B?WBW","BBBBB","BWWWB","BWWW?","BB?WB","??BWB","BB?W?","BBBBW","B?BB?","BBBWB","WB?WB","BW?W?","BBB?B","?W?BB","??B?B","BB??B","BBWBB","BWWB?","?WBWW","B?WWB","BWBB?","?BBBB","BBBBW","WWWWB","BWB??","B?WBB","?WWWW","WB?B?","BBB?B","?BWB?","BB?B?"}

    Returns: 0

  136. {"???????????????????????","???????????????????????","???????????????????????","???????????????????????","???????????????????????"}

    Returns: 0

  137. {"BBW??WWBBW?","?BBB??BWBWB","WBWB?B?W?BB","W?WB?WB?BW?","WBW?B???BBB"}

    Returns: 0

  138. {"?????","?????","?????","?????","?????","?????","?????","?????","?????","?????","?????","?????","?????","?????","?????","?????","?????","?????","?????","?????","?????","?????","?????","?????","?????","?????","?????","?????","?????","?????","?????","?????","?????","?????","?????","?????","?????","?????","?????","?????","?????","?????","?????","?????","?????","?????","?????","?????"}

    Returns: 0

  139. {"WBWWW","WB?B?","WB?WW","WB?BW","WBB?W","??WWB","BWWWW","WBBWW","BBBWB","WWW?W","B?WWW","BBWBB","WW?WB","B?BWW","?WB??","??WWW","WWBBW","BB?WW","BW?WW","BWBWB","W??WW","??W?B","BWWWW","BB???","W?WW?","B?B?W","BB?WB","?BW?W","W??BB","?BBWB","BBW?B","???BW","WBWWW","??WWW","?WWWW","BWB??","W?B?B","?BBWB","BWBWB","?B?BW","BBBBW","WWW?B"}

    Returns: 0

  140. {"???????????????????????????????????????????????","???????????????????????????????????????????????","???????????????????????????????????????????????","???????????????????????????????????????????????","???????????????????????????????????????????????","???????????????????????????????????????????????","???????????????????????????????????????????????","???????????????????????????????????????????????","???????????????????????????????????????????????","???????????????????????????????????????????????","???????????????????????????????????????????????","???????????????????????????????????????????????","???????????????????????????????????????????????","???????????????????????????????????????????????","???????????????????????????????????????????????","???????????????????????????????????????????????","???????????????????????????????????????????????","???????????????????????????????????????????????","???????????????????????????????????????????????","???????????????????????????????????????????????","???????????????????????????????????????????????","???????????????????????????????????????????????","???????????????????????????????????????????????","???????????????????????????????????????????????","???????????????????????????????????????????????","???????????????????????????????????????????????","???????????????????????????????????????????????","???????????????????????????????????????????????","???????????????????????????????????????????????","???????????????????????????????????????????????","???????????????????????????????????????????????","???????????????????????????????????????????????","???????????????????????????????????????????????","???????????????????????????????????????????????","???????????????????????????????????????????????","???????????????????????????????????????????????","???????????????????????????????????????????????","???????????????????????????????????????????????"}

    Returns: 0

  141. {"W??B????????","?B??????W???","?W??W????W?B","WWB???WB??W?","??????WBBWB?","W??WW???????","??WW?B??????","?W??????W???","W??W??W??W??","?BB?W?WWWW?W","WW?BW???W?W?","??B????W????","?WW?B????WW?","?W??????W???","??W?B??W?W??","???W?B???WW?","???W?????W??","????????????","??W????W?W??","W?B?W???WB??","?BBW????????","?WW??BB?????"}

    Returns: 0

  142. {"????????????????????????????????????????","????????????????????????????????????????","????????????????????????????????????????","????????????????????????????????????????","????????????????????????????????????????","????????????????????????????????????????","????????????????????????????????????????","????????????????????????????????????????","????????????????????????????????????????","????????????????????????????????????????","????????????????????????????????????????","????????????????????????????????????????","????????????????????????????????????????","????????????????????????????????????????","????????????????????????????????????????","????????????????????????????????????????","????????????????????????????????????????","????????????????????????????????????????","????????????????????????????????????????"}

    Returns: 0

  143. {"B?W?W?W","BBBWWW?","??WW?BW","?WBW?W?","?BWWWWB","W?BWWWW","BBW?BB?","WB?B??W","??WBB??","WBWWWBW","BBBB?WB","B?WWWBB","BWWBBBW","WWBB?W?","WBW?BWW","?BW?W?W","WBW??W?","WWBBBBB","?WWWB?W","?BWB?BW","WB?W???","WWWBBBW","W??WB?W","B?W?WW?","W?WBWBW","BB??W??","?BBWBWB","WW?WBWB","WBW?WW?"}

    Returns: 0

  144. {"??????????????????????????????????????????????????","??????????????????????????????????????????????????","??????????????????????????????????????????????????","??????????????????????????????????????????????????","??????????????????????????????????????????????????","??????????????????????????????????????????????????","??????????????????????????????????????????????????"}

    Returns: 0

  145. {"B?BWB??BBB??BB??W??B??B?BWB??WBB?BB?????WW??WBBB?W","BBBB?B??BB?W?W?BB?WBWBW?W?B????WW?B??W?W??WB??BBB?","B??WB?W?W?BBB?????WB??WBBBBBB???BB?WBWW?B???????W?","BW?B???WWBB?B?????BB??BWB?B???WBBW??B??B?????WWBW?","WBW??B?W??BBBBB????B??WBBBBBB?WW??BW??BB?BBWB???BB","BB?WWWBBBBBBW??BBWW?BBBW?BBB???WWB?BB????W???BB??W","W??WW??BB?W??WWWWB????W????WW??BB?BWB?W?BB?W??B??B","BB?W?W?W???B?W??B?BW???WW???B?BBB??WBBWWBW?BB??W??","B?????BBBBB??BWW?WB?W??B???B?BWBB?B??B?BBB?WBB?WWW","WB?BBBB?B???BBW??B??BB??????B?B?WBW?B??BBBB????B?W","B???W???B?B?WB??B???WWB?W?BW???B?W??WB?BBWB?B?WWWB","??W?B??BBBB??W??BW????WBB?W?W?BBB??B??WW???BB??BBB","BB??B??WB??BWB?B?BB?BWBW???WB??WWWBBWB?B???????WW?","B?WWB??BB?W?B???BW??BB??B?????WB?WBWBBBB?W?WB?WBBB"}

    Returns: 0

  146. {"???????????????????????????????","???????????????????????????????","???????????????????????????????","???????????????????????????????","???????????????????????????????","???????????????????????????????","???????????????????????????????","???????????????????????????????","???????????????????????????????","???????????????????????????????","???????????????????????????????","???????????????????????????????","???????????????????????????????","???????????????????????????????","???????????????????????????????","???????????????????????????????","???????????????????????????????","???????????????????????????????","???????????????????????????????","???????????????????????????????","???????????????????????????????","???????????????????????????????","???????????????????????????????","???????????????????????????????","???????????????????????????????","???????????????????????????????","???????????????????????????????","???????????????????????????????","???????????????????????????????","???????????????????????????????","???????????????????????????????","???????????????????????????????","???????????????????????????????","???????????????????????????????","???????????????????????????????","???????????????????????????????","???????????????????????????????","???????????????????????????????","???????????????????????????????","???????????????????????????????","???????????????????????????????","???????????????????????????????","???????????????????????????????","???????????????????????????????","???????????????????????????????","???????????????????????????????","???????????????????????????????","???????????????????????????????","???????????????????????????????","???????????????????????????????"}

    Returns: 0

  147. {"WWWW?W???WW?W??WWW?W?WWW","WWBWWB?W?BWWWWWWWWWBWWWW","WBW?WBW?W?WWWW?WBWWWW?WW","WWWWW?WWWBW??W?WWWWWWW?W","WWW???WWWW?WW?WBWB??BWWW","BW?W???WWWBW??WWWWWWWWB?","BWWWWW?W??W?WW?WWWWWB?WW","WWWW?WWWWWW?WW??WWB?WWW?","WWWWWWBWWWWWWWW?WWWWWWW?","WWWWWBW?WWWW?WW?WW??W?WW","WWWBWWWWWW??WB?W?WWWWWBW","WWW?WWWWWWWWWWW?WW??W?WW","WWWWW??W?W?WWWWWWWWWWWWW","WWWWW??WWWWWW?WWWWBWWWWW","WWBWWWW?WWWW?WWW???W?W??","?WW?WW?W??WB?WWWWW?WWWWB","WWW?BBW??W?W?WWB?W??WW?W","WWWWWWW?W?W??WWBW?WWWW?W","???W?WWWW?WWWW?WWBWWWWW?","W?WWWWW????WW?WBB?WWWWWW","W?W???WWW?WWWWWW??WWW??W","W?BB?B???WW?WWW?WWW?WWWW","WWW??W?W??B?WWB??WWWWWW?","WWW??WW??BW?WW?W?W?WW?WW","WWWWWW?W?WWWWWWWWW?WBWBW","WWWWWW??WWWW??W?WWWB??WW","WWW?WWWWW??WW?WWWWWW?WWW","W?WWBW?W?WW??WWWWWWWW??W","BWWWWW?WWWW?WW??WW?WWWWW","WBW?WW?WW?WW??WWBWWWWWB?","WW??B??WWWWW?WW?WWWWWW?W","???WWWWW?WWWWWWWWWB?WW??","WWWWWWB?W??BWWWW?BWWWWWW","?WWWW?WW?WWW?WWW?WWW?WWW","WWWW?WWW?WWW?WBWBWW??WWW","WW?W?W?WWWWWWWWWW?WWW?WB","W?WW?WW?WWW?W?W??WW?WWWW","WWWW?WWWWWWWWWWWWWW??WWW","W??WW?WWBW?WWWWWWWWW??W?","WBWWWWBWW?BWWWWW?W??BBW?","?W?WWWWWBBWWWWW??W?WWWWW","WWWWWW?W???B??W?W??WWWWW","W?WWWWWWWWW??WB?WW??WWWW","W?WWBWWBWWWWWW???WW?BWWW","WWWW???W?WWW?WW?WWWW?WWW","WWWW?W?WWWWWWWWWW?BBWWW?","WWWW?W?W??W?WW???WWWW?BW","WWWBWW?W?WW?WWWWW??WW?WW","W?BWWWWW?WW??WWWWW??WWWW","???WWW??W?WW?WB?W?W?W?W?"}

    Returns: 0

  148. {"??????????????????????????????????????????????????","??????????????????????????????????????????????????","??????????????????????????????????????????????????","??????????????????????????????????????????????????","??????????????????????????????????????????????????","??????????????????????????????????????????????????","??????????????????????????????????????????????????","??????????????????????????????????????????????????","??????????????????????????????????????????????????","??????????????????????????????????????????????????","??????????????????????????????????????????????????","??????????????????????????????????????????????????","??????????????????????????????????????????????????","??????????????????????????????????????????????????","??????????????????????????????????????????????????","??????????????????????????????????????????????????","??????????????????????????????????????????????????","??????????????????????????????????????????????????","??????????????????????????????????????????????????","??????????????????????????????????????????????????","??????????????????????????????????????????????????","??????????????????????????????????????????????????","??????????????????????????????????????????????????","??????????????????????????????????????????????????","??????????????????????????????????????????????????","??????????????????????????????????????????????????","??????????????????????????????????????????????????","??????????????????????????????????????????????????","??????????????????????????????????????????????????","??????????????????????????????????????????????????","??????????????????????????????????????????????????","??????????????????????????????????????????????????","??????????????????????????????????????????????????","??????????????????????????????????????????????????","??????????????????????????????????????????????????","??????????????????????????????????????????????????","??????????????????????????????????????????????????","??????????????????????????????????????????????????","??????????????????????????????????????????????????","??????????????????????????????????????????????????","??????????????????????????????????????????????????","??????????????????????????????????????????????????","??????????????????????????????????????????????????","??????????????????????????????????????????????????","??????????????????????????????????????????????????","??????????????????????????????????????????????????","??????????????????????????????????????????????????","??????????????????????????????????????????????????","??????????????????????????????????????????????????","??????????????????????????????????????????????????"}

    Returns: 0

  149. {"BB?BBBB?B?W?B??B?B??WWBBB?BWBBBWB??BBW??WW??WBB?B?","?BWBW??B?W?BB?BBB?BB?BB??W????BW??B?WB?WB?BBB?BWB?","BBBB?W?BW?W??B?BBBB?BBBBB?W?W??BBWBWBB??B?BB?B?BW?","BWB???BBBW???BBBWB?B???B?BW??BWBBBB???BBBB?????BWB","?W?BB?BBB?WBB??W?B?BB?W?BWB?BWB?BBW??W?W?W??WB?BB?","BBW?WBBBW?W?BWBBB??WB??WW?W?BW?BB?W??BBWB?BWBBBB?B","B?BW?BWBB????WBW?BBWW?B??BBBBWW??BB?BB??WB?BW???WW","B?B?BW?BB?W???WWBBB?WWBBBBB???BWB?WWB?WBWWB?BB?BBB","BWB??W?WWW?WB?BWW?WB?BWB?WWB??B??WBBB??W?????BWBBB","BBBBBBBB??BWBBBWWBBBB??B?WBBBWW?WBWBB?BBB?BBB??BB?","BBWWWBB???BW???WW??W?BB?W?W?WBWWBBWBBW?BB?B?????BW","BWBB?BWB?WB??WBW?BBWBBBW???B??BWBB??BB?B?WWW?B?BBW","BBBWBWW??B???BB??BWB?WBB?W?W??BB?WBWWWWBB??B?BW??W","??WWB?BB?WB?BBB??WBBB?B?B?W?B?BBB???WB??W???WB?WW?","??BBBW??BB?B?BBW??BB?BBB?BBW?WWBB??WBBWBBW?WWB?WBW","BBBBWBB?B?BBW???BWB????BWBB??B?B?B?BB?WBBB?BBWB?WB","?WBWWB?WWBBB?BB?BBBWWB?WBW?B???BW?BBB?BW?W?BBW?BB?","?B?B?B?BB?BB?B??WB?W??WB??B?BB?W?BBB??W?BBBBWBBBB?","?BBBB??B?WBWBB?BBWWBBB?B?BWBBB??B??BWW?B??WBB?BW?B","?WWBWB??BB?B?W??W??B?BWWBBBB??WWB?BBB?B?WWW???BWB?","??B?BB?B????B??BWBB??BB??B??W???BBWBBW?BBBWWB?BB?W","??BW?W?B?BBBB?WBBWWB??BBW?WB??W?WBBBBBWWBWBBBB?W?B","?BB???BW?BWBW?W?BB?BB?B?B??B??BWBW?BWBBB??WW?BBBBB","BW?????B?BB?W??B?WBW?BBB?BBWWW?BBBW?B??W?WBB?W?WB?","?WBBB????WWBBBBBBBBB??B??WBB???B?W???B???BBWW???WB","B?B?BBB?B?B?BB??WWB?BWB??WBWB?BBB?BW?B?B??WB?BB?WW","W????BBB?W??B?BB?BB?WWBB??B???W?BBBWWWBWB?B???BW?B","W??BB??W?B??BBB??WWWW?BWB?BBB???W?W?BWB?BBWBBBB?BB","BBBBWB?B?WW?BB?BW?B?BBB?BBW?B?WB?BW?BW?B????BWW???","B??BB??BWBW?WBB???B?BB??B?WBW?B?WWB??B???BW?BW?BWB","?WBWB??BBW???BW?BB?BBB?BB?????B???W??WWBBBWB??B?BB","?????BBBW?B?B?WWB???BBBBB?BBBBB?WBWWBB?W?BWW?WWBBB","WW??BW?B?W??WW?BBWWW???BWWBB??WBW?WWWWBB??BB?WWB??","BBB?WWBW?WB?W??BWBW?WWBBWWW?W?BB???W?BB?BB?BBW??WW","W?B?W?B?BBWBBBBWBBB?BBBB?BBB?B?BWB?????B?WWB?W?WBB","W?BBBBWW?BWWWB?B?B???W?WB?BBBBBBBW?WWBB??B?BWWW???","B?BBBBB?B??W?WBW??B??B?W???W?????WB?BWWBB?BBBB?W?W","?WWWBWBBW??BBB???WBBB??BWWBBWB??BB???B?WB??WB?W???","BW?BWB?BBB?BBB?BWWBBWBBBBB??BB?B?B?WB??WW???BBB??B","???BWW???B?WBB?WB?BB??BB??WBBW?BBBBBBBBB??W???WBB?","WB?WBBB?BW???W?BBW?BB?WBB?BBW?WBBB??WWW??B?W?BBWB?","WB???BWBW?B????B???B??BBB?BB?B?W??B?BBWBBW??B?W?W?","BB?WBWBWBBBBWW?WB?WBBBBW?W?B?BBBW?BW??W??B?BB??BBB","??B?BBBB?W?W??W?BBBBBBWWBB?WB??W??BBBBBW??B?WB?WBB","B??BBWBW?WWWBWWB?B?WBB?B????WBW?B??WB????B??W??B?W","B??W?WW?BWB??WWB??W??BB?BBBBBWWBBWW?WBB??B?BBWB??W","B?BWWBW?BWWB?WB?B?BBB??B??BBBBB?WBB?B?BBB?W?BB?BB?","?BBWBBB?BBBBW?WB???BW?BBW?B?BBBWB?BW??B?BWB??BWBBB","BBB?WBBBW?WWWW?W??BBW?????B?BWW?B??BWB????BWBBBBWB","BBBBWWWBW?BBW?BW???W??B?BBWW?BBBBWBBB?BWWW?WBW??W?"}

    Returns: 0

  150. {"??????????????W???????????????????????????????????"}

    Returns: 562949953421312

  151. {"???????????B????????????????????????B?????????????"}

    Returns: 281474976710656

  152. {"??????????????????????????B??????????????B????????"}

    Returns: 281474976710656

  153. {"?","W","?","?","?","?","?","?","?","?","?","?","?","?","?","?","?","?","?","?","?","?","?","?","?","?","?","?","?","?","?","?","?","?","?","?","?","?","?","?","?","?","?","?","?","?","?","?","?","?"}

    Returns: 562949953421312

  154. {"?","?","?","?","?","?","?","?","B","?","?","?","?","?","?","?","?","?","?","?","?","?","?","?","?","?","?","?","?","?","?","?","?","?","?","?","?","?","?","?","W","?","?","?","?","?","?","?","?","?"}

    Returns: 281474976710656

  155. {"?","?","?","?","?","?","?","?","?","?","?","?","?","?","?","?","?","?","?","?","?","?","?","?","?","?","?","?","?","?","?","?","?","?","?","?","?","?","W","?","?","?","?","?","?","?","?","?","?","?"}

    Returns: 562949953421312

  156. {"??????????????????????????????????????????????????","?W????????????????????B???????????????????????????"}

    Returns: 186899384535875584

  157. {"??????????????????????????????????????????????????","????????????????????????B?????????????????????????"}

    Returns: 373517294095040512

  158. {"????????????????????????????????W?????????????????","?????????????????????????????????????????B????????"}

    Returns: 186899384535875584

  159. {"??","??","??","??","??","??","??","??","??","??","??","??","??","??","??","??","??","??","??","??","??","??","??","??","?W","??","??","??","??","??","??","??","??","??","??","??","??","??","??","??","??","?B","??","??","??","??","??","??","??","??"}

    Returns: 186899384535875584

  160. {"??","??","??","??","??","??","??","??","??","??","??","??","??","??","??","??","??","??","??","??","??","??","??","??","??","??","??","??","??","??","??","??","??","??","??","??","??","??","??","??","??","??","??","?W","??","??","??","??","??","??"}

    Returns: 373517294095040512

  161. {"??","??","??","??","??","??","??","??","??","??","??","??","??","??","??","??","??","??","??","??","??","??","??","??","??","??","??","??","??","??","??","??","??","??","??","??","B?","??","??","??","??","??","??","??","??","??","??","??","??","??"}

    Returns: 373517294095040512

  162. {"??????","??????","???BW?"}

    Returns: 216

  163. {"????B?","B?????","??????"}

    Returns: 192

  164. {"????W?","??????","?????B"}

    Returns: 168

  165. {"???","?B?","???","???","???","???"}

    Returns: 360

  166. {"?B?","???","???","???","?B?","???"}

    Returns: 144

  167. {"???","???","???","???","??B","???"}

    Returns: 360

  168. {"??????","??B???","??????","???W??"}

    Returns: 168

  169. {"??????","??????","??????","????B?"}

    Returns: 360

  170. {"?W????","??????","??????","??????"}

    Returns: 360

  171. {"????","????","????","????","B???","????"}

    Returns: 360

  172. {"????","????","????","????","????","???B"}

    Returns: 360

  173. {"????","????","??W?","????","????","????"}

    Returns: 360

  174. {"??????????????????????????????????????????????????","??????????????????????????????????????????????????","??????????????????????????????????????????????????","??????????????????????????????????????????????????","???????????????????????????????W??????????????????","??????????????????????????????????????????????????","??????????????????????????????????????????????????","??????????????????????????????????????????????????","??????????????????????????????????????????????????","??????????????????????????????????????????????????","??????????????????????????????????????????????????","??????????????????????????????????????????????????","??????????????????????????????????????????????????","??????????????????????????????????????????????????","??????????????????????????????????????????????????","??????????????????????????????????????????????????","??????????????????????????????????????????????????","??????????????????????????????????????????????????","??????????????????????????????????????????????????","??????????????????????????????????????????????????","??????????????????????????????????????????????????","??????????????????????????????????????????????????","??????????????????????????????????????????????????","??????????????????????????????????????????????????","??????????????????????????????????????????????????","??????????????????????????????????????????????????","??????????????????????????????????????????????????","??????????????????????????????????????????????????","??????????????????????????????????????????????????","??????????????????????????????????????????????????","??????????????????????????????????????????????????","??????????????????????????????????????????????????","??????????????????????????????????????????????????","??????????????????????????????????????????????????","??????????????????????????????????????????????????","??????????????????????????????????????????????????","??????????????????????????????????????????????????","??????????????????????????????????????????????????","??????????????????????????????????????????????????","??????????????????????????????????????????????????","??????????????????????????????????????????????????","??????????????????????????????????????????????????","??????????????????????????????????????????????????","??????????????????????????????????????????????????","??????????????????????????????????????????????????","??????????????????????????????????????????????????","??????????????????????????????????????????????????","??????????????????????????????????????????????????","??????????????????????????????????????????????????","??????????????????????????????????????????????????"}

    Returns: 0

  175. {"??????????????????????????????????????????????????","??????????????????????????????????????????????????","??????????????????????????????????????????????????","??????????????????????????????????????????????????","??????????????????????????????????????????????????","??????????????????????????????????????????????????","??????????????????????????????????????????????????","??????????????????????????????????????????????????","??????????????????????????????????????????????????","??????????????????????????????????????????????????","??????????????????????????????????????????????????","??????????????????????????????????????????????????","??????????????????????????????????????????????????","??????????????????????????????????????????????????","??????????????????????????????????????????????????","??????????????????????????????????????????????????","??????????????????????????????????????????????????","??????????????????????????????????????????????????","??????????????????????????????????????????????????","??????????????????????????????????????????????????","??????????????????????????????????????????????????","??????????????????????????????????????????????????","??????????????????????????????????????????????????","??????????????????????????????????????????????????","??????????????????????????????????????????????????","??????????????????????????????????????????????????","??????????????????????????????????????????????????","??????????????????????????????????????????????????","??????????????????????????????????????????????????","??????????????????????????????????????????????????","??????????????????????????????????????????????????","??????????????????????????????????????????????????","??????????????????????????????????????????????????","??????????????????????????????????????????????????","??????????????????????????????????????????????????","??????????????????????????????????????????????????","??????????????????????????????????????????????????","??????????????????????????????????????????????????","??????????????????????????????????????????????????","??????????????????????????????????????????????????","??????????????????????????????????????????????????","??????????????????????????????????????????????????","??????????????????????????????????????????????????","??????????????????????????????????????????????????","????????????????????????????????????????W?????????","??????????????????????????????????????????????????","??????????????????????????????????????????????????","??????????????????????????????????????????????????","??????????????????????????????????????????????????","??????????????????????????????????????????????????"}

    Returns: 0

  176. {"??????????????????????????????????????????????????","??????????????????????????????????????????????????","??????????????????????????????????????????????????","??????????????????????????????????????????????????","??????????????????????????????????????????????????","??????????????????????????????????????????????????","??????????????????????????????????????????????????","??????????????????????????????????B???????????????","??????????????????????????????????????????????????","??????????????????????????????????????????????????","??????????????????????????????????????????????????","??????????????????????????????????????????????????","??????????????????????????????????????????????????","??????????????????????????????????????????????????","??????????????????????????????????????????????????","??????????????????????????????????????????????????","??????????????????????????????????????????????????","??????????????????????????????????????????????????","??????????????????????????????????????????????????","??????????????????????????????????????????????????","??????????????????????????????????????????????????","??????????????????????????????????????????????????","??????????????????????????????????????????????????","??????????????????????????????????????????????????","??????????????????????????????????????????????????","??????????????????????????????????????????????????","??????????????????????????????????????????????????","??????????????????????????????????????????????????","??????????????????????????????W???????????????????","??????????????????????????????????????????????????","??????????????????????????????????????????????????","??????????????????????????????????????????????????","??????????????????????????????????????????????????","??????????????????????????????????????????????????","??????????????????????????????????????????????????","??????????????????????????????????????????????????","??????????????????????????????????????????????????","??????????????????????????????????????????????????","??????????????????????????????????????????????????","??????????????????????????????????????????????????","??????????????????????????????????????????????????","??????????????????????????????????????????????????","??????????????????????????????????????????????????","??????????????????????????????????????????????????","??????????????????????????????????????????????????","??????????????????????????????????????????????????","??????????????????????????????????????????????????","??????????????????????????????????????????????????","??????????????????????????????????????????????????","??????????????????????????????????????????????????"}

    Returns: 0

  177. {"W??????????????????????????","???????????????W???????????","???????????????????????????","???????????????????????????"}

    Returns: 0

  178. {"???","???","??W","???","???","???","???","???","???","???","???","???","???","???","???","???","???","???","???","???","???","???","???","???","???","???","?B?","???","???","???","???","???","???","???","???","???","???","???","???","???","???","???","???","???","???","???","???","???","???","???"}

    Returns: 0

  179. {"W?????????????????W???????????????????????????????"}

    Returns: 281474976710656

  180. {"????","????","????","????","???B","????","????","????","????","????","????","????","????","????","????","????","????","????","????","????","????","????","????","????","????","????","????","????","????","????","????"}

    Returns: 0

  181. {"????","????","????","????","????","????","????","????","???W","??B?","????","????","????","????"}

    Returns: 0

  182. {"B???????"}

    Returns: 128

  183. {"???????????????????????B??????????????????????????"}

    Returns: 562949953421312

  184. {"??????????????????????????????????????????????????","?????????????????????W????????????????????????????","??????????????????????????????????????????????????","????????????????????????????????????????????????B?","??????????????????????????????????????????????????"}

    Returns: 0

  185. {"B?"}

    Returns: 2

  186. {"???????","???????","???????","???????","???????","???????","???????","???????","???????","???????","???????","???????","???????","???????","???????","??????B","???????","???????","???????","???????","???????","???????","???????","???????","???????","???????","???????","???????","???????","???????","???????","???????","???????","???????","???????","???????","???????","???????","???????","???????","???????","???????","B??????","???????"}

    Returns: 0

  187. {"?","B","W","?","?"}

    Returns: 8

  188. {"????","????","?WB?","????","????"}

    Returns: 240

  189. {"B?","??","?B","??","??","??"}

    Returns: 224

  190. {"????????????????????W?????????????????????????????","??????????????????????????????????????????????????"}

    Returns: 373517294095040512

  191. {"??????????W???????????????????????????????????????", "???????????????????????B??????????????????????????" }

    Returns: 186899384535875584

  192. {"B??????????????????????", "????????????????W??????" }

    Returns: 316669952

  193. {"???B???????B???????????????????????W??????????????", "????????W???????????????????????W????????B????????" }

    Returns: 11698803719536640

  194. {"??????????????????????????????????????????????????", "??????????????????????????????????????????????????" }

    Returns: 747034588190081024

  195. {"BBBBBBBBBBBBBBBBBBBBBBB" }

    Returns: 1

  196. {"??????????????????????????????????????????????????", "??????????????????????????????????????????????????", "??????????????????????????????????????????????????", "??????????????????????????????????????????????????", "??????????????????????????????????????????????????", "??????????????????????????????????????????????????", "??????????????????????????????????????????????????", "??????????????????????????????????????????????????", "??????????????????????????????????????????????????", "??????????????????????????????????????????????????", "??????????????????????????????????????????????????", "??????????????????????????????????????????????????", "??????????????????????????????????????????????????", "??????????????????????????????????????????????????", "??????????????????????????????????????????????????", "??????????????????????????????????????????????????", "??????????????????????????????????????????????????", "??????????????????????????????????????????????????", "??????????????????????????????????????????????????", "??????????????????????????????????????????????????", "??????????????????????????????????????????????????", "??????????????????????????????????????????????????", "??????????????????????????????????????????????????", "??????????????????????????????????????????????????", "??????????????????????????????????????????????????", "??????????????????????????????????????????????????", "??????????????????????????????????????????????????", "??????????????????????????????????????????????????", "??????????????????????????????????????????????????", "??????????????????????????????????????????????????", "??????????????????????????????????????????????????", "??????????????????????????????????????????????????", "??????????????????????????????????????????????????", "??????????????????????????????????????????????????", "??????????????????????????????????????????????????", "??????????????????????????????????????????????????", "??????????????????????????????????????????????????", "??????????????????????????????????????????????????", "??????????????????????????????????????????????????", "??????????????????????????????????????????????????", "??????????????????????????????????????????????????", "??????????????????????????????????????????????????", "??????????????????????????????????????????????????", "??????????????????????????????????????????????????", "??????????????????????????????????????????????????", "??????????????????????????????????????????????????", "??????????????????????????????????????????????????", "??????????????????????????????????????????????????", "??????????????????????????????????????????????????", "??????????????????????????????????????????????????" }

    Returns: 0

  197. {"BBBB" }

    Returns: 1

  198. {"???????????????????????????????", "???????????????????????????????" }

    Returns: 568009424896

  199. {"??????????W?????????B???????????????????W?????????", "??????????B?????????B??????????W??????????????????" }

    Returns: 1829587348619264

  200. {"????", "????", "????", "????" }

    Returns: 840

  201. {"????????????????????????????????????????????????", "????????????????????????????????????????????????" }

    Returns: 172544160723632128

  202. {"??????????????????????????????????????????????????", "??????????????????????????????????????????????????", "??????????????????????????????????????????????????", "??????????????????????????????????????????????????", "??????????????????????????????????????????????????", "??????????????????????????????????????????????????", "??????????????????????????????????????????????????", "??????????????????????????????????????????????????" }

    Returns: 0

  203. {"??", "??", "??", "??", "??", "??", "??", "??", "??", "??", "??", "??", "??", "??", "??", "??", "??", "??", "??", "??", "??", "??", "??", "??", "??", "??", "??", "??", "??", "??", "??", "??", "??", "??", "??", "??", "??", "??", "??", "??", "??", "??", "??", "??", "??", "??", "??", "??", "??" }

    Returns: 359162070282797056

  204. {"??????????????????????????????????????????????????", "??????????????????????????????????????????????????", "??????????????????????????????????????????????????", "??????????????????????????????????????????????????", "??????????????????????????????????????????????????" }

    Returns: 0

  205. {"?????", "?????", "?????", "?????" }

    Returns: 720

  206. {"??????????????????????????????????????????????????" }

    Returns: 1125899906842624


This problem statement is the exclusive and proprietary property of TopCoder, Inc. Any unauthorized use or reproduction of this information without the prior written consent of TopCoder, Inc. is strictly prohibited. (c)2024, TopCoder, Inc. All rights reserved.
This problem was used for: