Statistics

Problem Statement for "Clicountingd2"

Problem Statement

Hero has a simple undirected graph. I.e., the graph has no self-loops and each pair of vertices is connected by at most one edge. Hero would like to solve a standard problem: he wants to find the size of the largest clique in his graph. (A clique is a subset C of vertices such that each pair of vertices in C is connected by an edge. The size of a clique is the number of vertices in C.) However, Hero is facing an issue: for some (at most 20) pairs of vertices he does not remember whether they are connected by an edge or not. You are given the information Hero remembers: a String[] g with n elements, where n is the number of vertices in the graph. The vertices are numbered 0 through n-1. For each valid i and j, g[i][j] is one of '0', '1', and '?'. Here, '0' means that vertices i and j are not connected, '1' means that they are connected, and '?' means that Hero does not remember whether they are connected. Let there be k unordered pairs of vertices for which Hero does not remember whether they are connected or not. Then, there are exactly 2^k different graphs consistent with what Hero remembers. For each of those graphs find the size of the largest clique, and return the sum of those 2^k numbers.

Definition

Class:
Clicountingd2
Method:
count
Parameters:
String[]
Returns:
int
Method signature:
int count(String[] g)
(be sure your method is public)

Constraints

  • g will contain n elements.
  • n will be between 1 and 20, inclusive.
  • Each element in g will contain exactly n characters.
  • Each character in g will be either '0', '1' or '?'.
  • For each valid i and j, g[i][j] will be equal to g[j][i].
  • For each valid i, g[i][i] will be '0'.
  • Number of unknown edges (number of '?' characters divided by 2) will be between 0 and 20, inclusive.

Examples

  1. {"01","10"}

    Returns: 2

  2. {"0?","?0"}

    Returns: 3

    Here the maximum clique size is either 2 (if the unknown edge is present) or 1 (if the edge is absent).

  3. {"011","101","110"}

    Returns: 3

    This is a complete graph on 3 vertices. The size of the maximum clique is 3.

  4. {"0?1","?01","110"}

    Returns: 5

    Hero is not sure about a single edge. If the edge is in the graph, we get the situation from Example 2. If the edge is not there, we get a graph in which the size of the maximum clique is 2. The answer is therefore 3+2 = 5.

  5. {"0???","?0??","??0?","???0"}

    Returns: 151

  6. {"001?????","001?????","110?????","???0??0?","????0?01","?????0?0","???00?01","????1010"}

    Returns: 3534230

  7. {"00000000010010100011","00111111101011011110","01001101110000?00000","0100000110?011100010","01100011100110000100","011000?1111001001110","01001?0100000100110?","01111110110001111000","011111010001?0101100","10100101001101001001","010?01000100100?1101","00001000110010111001","11011000?0110001101?","01010111010000101000","10?10001100101010001","0100000100?110101110","01000111111111010010","01001110101000010000","11010100000010011000","100000?00111?0100000"}

    Returns: 704

  8. {"01?11111111111111111","10100111?11111111010","?100111101111011111?","1000101111100111??1?","10110111111??11?0101","111010001010?0??1111","111110001?1101111101","11111000111?11111101","1?01111100111101??11","111110?1001111111101","111111111101101011?0","1110?01?111010101111","1110??011111011?1110","11011011110010111111","11111?11011111011101","1111??111100?1101100","111?0111?11111110111","101?1111?1111111101?","1111010010?111001101","10??1111110101101?10"}

    Returns: 4810752

  9. {"0??????","?0????0","??001??","??00???","??1?0??","?????0?","?0????0"}

    Returns: 822732

  10. {"0????","?0???","??0??","???0?","????0"}

    Returns: 2750

  11. {"01??1?1011?1","101?00??1?1?","?1000??1101?","??0011111111","10010111??01","?0?11011?111","1??11101??00","0?1111101?11","1111???100?1","1?01?1??00?1","?1110101??00","1??111011100"}

    Returns: 5750784

  12. {"01111110101111","10111111111111","11011110?11111","11101111111111","11110111111111","11111011101111","1111110111?101","01011110111111","11?11111010111","01111011101?11","111111?1010?11","111111111??011","11111101111101","11111111111110"}

    Returns: 156

  13. {"010101?0","10?1?11?","0?0111??","1110111?","0?11011?","1111101?","?1?11101","0?????10"}

    Returns: 2598

  14. {"010011011101011","10?11?1101000?1","0?01?1?11111111","0110111111111?0","11?1011?1010110","1?111010000110?","01?1110111011?1","1111?01011111?1","101110110111111","1111001110111?1","001110011101110","101101111110101","001111111111001","1?1?10??1?10001","11100?111101110"}

    Returns: 16384

  15. {"0??11110?01111","?001?1111??111","?0001???111110","11001?111??111","1?11011111?111","11??10?11?1?11","11?11?01111111","01?11110111111","?1111111011111","0?1?1?11101111","1?1??1111101?1","11111?111110??","1111111111??0?","11011111111??0"}

    Returns: 8770636

  16. {"00??1?","00?11?","??00??","?10011","11?10?","???1?0"}

    Returns: 850

  17. {"001?01000??10000000","0001011?01010001001","100000010?0001000?1","?100010001?0?010000","00000100010000?0?10","11011000?100000001?","0100000010010000010","0?10000010000000000","00000?110?0?0010?0?","?1?11100?0010000001","?00?000000011?11100","11000010?1101001100","000?000000110000010","0010000000?00010011","0001?0001010010?010","01000000001100?00??","0000?000?0110000010","00?011100000111?100","01100?00?100010?000"}

    Returns: 4194304

  18. {"01010011","10?11010","0?011011","11100111","01100010","00010011","11111101","10110110"}

    Returns: 8

  19. {"01010011111110011110","10111100111110111000","01011111111011111101","11101111111001111111","01110111100111111111","01111011110110111100","10111101101011111111","10111110111011011111","111111110?1111111010","11110101?01111110111","11110011110100110011","11001100111010111011","11101111110100011111","00111011110000110110","01111110111101011001","11111111111111101101","11111111100110110111","10111111010011011011","10011011111111001101","00111011011110111110"}

    Returns: 18

  20. {"0?11?1111?","?01011101?","1101?11?11","10101111?1","?1?1010011","111110?111","11110?011?","10?10110??","111?111?01","??1111??10"}

    Returns: 12276

  21. {"0011?100011011110101","0000?11110?11000?001","1000?10?0100011?1111","10001101011001111110","???10011100100100010","111100?001?111?00000","01001?0?1101?0011000","01?110?0001?11000000","010010100000101?1101","1011011000101?101001","1?010?01010001111?1?","0100111?000000000000","110001?111000?100010","101101010?10?0011?00","10111?00111010010010","10?10010?01001100111","0?110010111001000100","1011000010?00?01100?","00111000001010110000","1110000011?000010?00"}

    Returns: 5799936

  22. {"01101110111011011011","10100111010111111011","1101111??01111110111","00100111011?11111111","10100100100111111111","1111101101?0?111110?","11110101011?1111111?","01?10110101111110111","10?010010110?1111111","11010110101111111111","10110?11110111111110","011?10?101101101?111","11111?11?11101101111","11111111111110011111","0111111111101001?111","11111111111101101111","11011110111?11?10001","00111111111111110011","11111011111111110101","11111??1110111111110"}

    Returns: 18112

  23. {"011?0100?0?001110","1000101?0000010?0","10000100110?111?0","?0001??0010011110","01010000000111111","101?001101?10000?","010?01000?0100010","0?0001000?0??0010","?0100000000000100","001101??00110111?","?0000?00010?01001","00?0111?01?00?00?","0011100?000000000","11111000011?001?1","10111000110001010","1??1101101000?100","00001?000?1?01000"}

    Returns: 4759552

  24. {"0000?11111110","000111?010111","0001110011001","0110100101011","?111010011011","1110100?1?110","1?00000111001","10010?1000110","1110111001111","10111?1010100","1100010111010","1101110110101","0111101010010"}

    Returns: 80

  25. {"0?11????","?0???1?1","1?0??1?0","1??0?11?","????0??1","?111?0??","???1??0?","?10?1??0"}

    Returns: 2092804

  26. {"0?111?1??1","?011?1??11","110?111???","11?01???1?","1?11011110","?11?10???1","1?1?1?0111","????1?10??","?1?11?1?01","11??011?10"}

    Returns: 5622237

  27. {"00000?0000100000","00?0??0000100011","0?0000100000?000","000000100001000?","0?00000000000?00","??0000000?000000","001100000000?000","00000000?0000000","0000000?00100100","00000?0000?0?100","110000001?00010?","0001000000000100","00?000?00?000000","0000?0001111000?","0100000000000001","010?000000?00?10"}

    Returns: 49152

  28. {"01101111111111111111","10?111111?11111111?1","1?0111?0111101101111","0110111111?10111?111","111101111111?1?11111","1111101111111101111?","11?11100111111111111","11011100111111101111","11111111011111111111","1?111111100110111?11","111?1111100?1111111?","1111111111?01?111101","1100?111111101111111","11111111101?10111111","1111?011111111011111","11011110111111101110","111?11111111111101?0","111111111?1111111011","1?11111111101111?101","11111?1111?111100110"}

    Returns: 195728

  29. {"011?1111?1111?1","101?11?11???111","110111111111111","??1011??11?1111","11110111111111?","11111011111?111","1?1?1101?111111","111?11101??1111","?11111?101111?1","1?11111?1011111","1?1?111?1101111","1?111?111110???","11111111111?011","?1111111?11?101","1111?111111?110"}

    Returns: 10572329

  30. {"011111110?11","101111111111","110111111111","111011?10111","111101111011","111110111010","111?11011111","111111101101","011011110111","?11100111011","111111101101","111110111110"}

    Returns: 30

  31. {"01001010?00111010001","1010011?10001?00?00?","0100?00?110010101001","0000100101110011?101","10?1000?1101?1101110","0100000???0010110000","110000000010110?1101","0??1??0001011100110?","?1101?00011011100100","00111?01100101?10011","00010010100011010010","10011001010010100011","1110?11110110?000101","1?0010111110?0?11000","001111001?010?00?111","100101?00110010001?0","0?1?1011000001?00111","00011011100010111001","000010000111001?1000","1?11001?010110101100"}

    Returns: 5209088

  32. {"01111101111110111111","101111?0111111111111","11001111011010101001","11001111101111110110","1111001101?100101111","11110010101000110111","0?11110111?011111111","10111010110111101110","11010111001111101101","11101011000101111110","1111?1?0100001110111","11011001110000111111","11110011100001110100","0101001111101011110?","11111111111111011111","11010110011111101110","11101011110101110110","11011111111111111001","11011111011100111000","1110111010110?100100"}

    Returns: 128

  33. {"000?000?0000000010?1","00000010100100000000","00000000010000?00000","?0000000000?0?000?00","00000000000000000000","00000000?0?000??0000","01000000000000000000","?000000000000?0000?0","01000?00000000001100","00100000000000000000","00000?00000000000011","010?0000000000010000","00000000000000000000","000?000?00000001?000","00?00?00000000000?00","00000?0000010100?0?0","1000000010000?0?000?","000?0000100000?000?0","?000000?0010000?0?0?","1000000000100000?0?0"}

    Returns: 2973696

  34. {"0?11?01111000","?0000?10000??","1000101101101","1000000000?10","?010010100111","0?001011?1111","1110010000000","1010110001000","10000?00000?0","1010010100011","001?110000011","0?011100?110?","0?101100011?0"}

    Returns: 2304

  35. {"0111010?110","1000?10?1?0","100?1001001","10?010?0??1","0?110?0?10?","1100?0?1?00","000?0?0?10?","??10?1?0000","110?1?1000?","1?0?0000001","0011?0?0?10"}

    Returns: 246688

  36. {"0??????","?00????","?00????","???0???","????0??","?????0?","??????0"}

    Returns: 3309747

  37. {"0011010?1011111","001111111111110","110100100101100","111011111111?10","010101111111???","110110111111101","011111011111011","?101111001111?1","110111100010011","011111110011100","110111111101111","111111110110101","111??1010111011","1101?01?101010?","1000?11110111?0"}

    Returns: 1152

  38. {"0001110111","0000110100","0000100000","1000000000","1110001110","1100001101","0000110000","1100110011","100010010?","10000101?0"}

    Returns: 8

  39. {"0?1111?11?111?1","?0?111111111111","1?011111111??11","1110111111?1111","11110111?111111","11111011?111111","?111110??1?11?1","111111?01111110","1111???1011?111","?1111111101???1","111?11?11101111","11?11111??10?1?","11?111111?1?011","?11111?11?11101","11111110111?110"}

    Returns: 9805556

  40. {"0????","?0???","??0??","???0?","????0"}

    Returns: 2750

  41. {"011?0011110011110?11","1011?110101100010010","110001?011110?010110","?100101?1011011?1011","0?010100010110111101","0110101111?011010111","11?1010111?001100001","100?01100111111111?0","11110110011?11000101","10101111100111101101","01110??1100010111111","01111001?10010111010","10001101111101010001","10?10111110010001001","10011011011100010?01","111?1101001110101111","00011001011101010011","?0101101111000?10011","1111010?001100011101","10011110111011111110"}

    Returns: 24576

  42. {"0110100111101110000","1011100?01110111?0?","11011001101?11?111?","01100?010011010001?","1110011110011111111","000?10101111111??10","0000110001101111111","1?111000?0?1111?1?0","1010110?00110111010","1100011000111101110","1111011?1101101001?","01?1110111100010111","10101111011001?1101","11111111110010111??","11?011111011?101001","01101?1?11001110011","0?101?1101011100011","0011111?11110?01101","0???101000?11?11110"}

    Returns: 1743872

  43. {"01???11??","10110?1?1","?10??1?1?","?1?0??01?","?0??0??1?","1?1??0111","11?0?10??","??1111?0?","?1???1??0"}

    Returns: 4790194

  44. {"0?11?0??","?0?10111","1?011111","11101???","?0110?1?","011??001","?11?100?","?11??1?0"}

    Returns: 8922

  45. {"01111111111?10111111","10111111111111111111","11011111110111111111","11101011?11111111111","11110?11111111111111","1110?0?1111111110111","11111?01111111111111","1111111011111111?111","111?1111011111111111","11111111101111111111","11011111110111111111","?1111111111011111111","11111111111101110111","01111111111110111111","1111111111111101111?","11111111111111101111","1111101?111101110111","11111111111111111011","11111111111111111101","11111111111111?11110"}

    Returns: 968

  46. {"0??????","?0?????","??0????","???0???","????0??","?????01","?????10"}

    Returns: 3493492

  47. {"0"}

    Returns: 1

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

    Returns: 2750

  49. {"00000000000000000","000?00?00?0000?0?","000?00000000?0000","0??0?0?0000?00??0","000?00000000000?0","0000000?00000000?","0?0?00000000?000?","00000?00?000?1000","0000000?000000000","0?000000001000100","000000000100000?0","000?0000000000000","00?000??000000000","00000001000000000","0?0?0000010000000","000??00000?000000","0?000??0000000000"}

    Returns: 2647552

  50. {"00000??0000?0000","000000??00000000","00000?0000?00000","0000000000?01?00","0000000?0?000??0","?0?0000000000?00","??00000000?000?0","0?00?00000000000","000000000000?000","0000?000000?0?00","00??00?000000100","?00000000?000000","00010000?0000000","000???000?1000?0","0000?0?000000?00","0000000000000000"}

    Returns: 2531328

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

    Returns: 97829

  52. {"00?1011011101000","0011011?1?11?110","?1001?1??0101001","11000010?1110111","001001111111?111","11?0100111?11101","111110011?11101?","0??0111010111011","11??111101111011","1?0111?010111101","11111?11110?11?1","0101111111?01?11","1?10?1111111010?","01011100011?101?","0101101110?10101","001111?11111??10"}

    Returns: 921344

  53. {"0????","?0???","??0??","???0?","????0"}

    Returns: 2750

  54. {"011101?1","10111011","11011110","111011?1","011101?1","10111011","?11??101","11011110"}

    Returns: 35

  55. {"0?????1","?0?????","??0????","???0???","????0??","?????0?","1?????0"}

    Returns: 3493492

  56. {"01??10?1??","10??101?11","??0111?011","??101?1?1?","11110111??","001?10010?","?1?1100110","1?0?1110??","?111?01?0?","?11???0??0"}

    Returns: 1298296

  57. {"000001010","000001101","000?00100","00?001100","000000110","110100000","011110000","100010000","010000000"}

    Returns: 5

  58. {"0?0?1","?01??","010??","???0?","1???0"}

    Returns: 351

  59. {"01111??110","1010?1????","11011??111","1010?1?111","1?1?0?00?1","?1?1?0??1?","????0?001?","1?110?001?","1?11?11100","0?111???00"}

    Returns: 1350752

  60. {"0101011101011?100?","10111010?101001010","010001111011011011","1100110101100010?0","010100101111011010","101100111011100110","1110110?1111001110","101101?0100000?000","0?1011110110100110","110110101011110011","001111101100001000","111011100100?01101","10000100110?001111","?0101000010000111?","1111101?0011110101","000001101001111010","011?11101100110100","?010000001011?1000"}

    Returns: 1408

  61. {"010111111101","100111101011","000111111110","111011111101","111101111111","111110110101","111111000111","101111001111","111110010011","101111110001","011010111001","110111111110"}

    Returns: 7

  62. {"000111100101001","000000010100001","000010000?10000","1000000001010?0","101000001100110","100000111101001","100001001110011","01000100000??11","0000111000110?0","11?111100000010","001000101001010","1001010?1010011","0000100?0000000","000?1011?111000","110001110001000"}

    Returns: 128

  63. {"000001?0110100100?0","0000000000?11100000","00000000?0000000000","0000?0010001?000100","000?000?0000?10100?","100000010?00?000000","?0000001010?0100100","0001?1100010010?001","10?000000010000000?","10000?10000???00001","0?00000110000000000","110100?00?0000?1000","010???000?000000000","010010110?00000000?","10000000000?0000000","0000100?00010000001","00010010000000000?0","?000000000000000?01","0000?001?1000?01010"}

    Returns: 3448832

  64. {"01111111101111?11?","101110111111?11111","110111111111101111","11100?1?0?1?11?111","11100011101?1111?1","101?00101111111101","111111001111101111","111?10000111110111","111011100101111111","011?01111011110?11","111111110101101001","111??11111100111?1","1?1111111110011011","110111011101101110","?11?1110101111011?","111111111?01011011","1111?011110?111100","?1111111111110?100"}

    Returns: 71772

  65. {"0????","?0???","??0??","???0?","????0"}

    Returns: 2750

  66. {"0000000000?0000?00","0000000?0000110001","0000000?0?10000000","00000?000000000000","000000000000000000","000?0000000010?000","00000001000?0000?0","0??0001000000?0000","0000000000?0000010","00?00000000000000?","?0100000?000000010","000000?0000000000?","010001000000000?0?","0100000?0000000000","00000?00000000000?","?00000000000?00000","000000?01010000000","010000000?0??0?000"}

    Returns: 184320

  67. {"010101010?1?10110001","1010??100?0011000001","010??10?1001?01110??","10?01010010001101010","0??1000011110?1?0001","1?1000?0011001010000","01010?01111010011010","10?00010?0?011110111","0010101?010000000001","??011110100101101001","1000111?0000001?01?0","?0101000010010100110","11?00011000100110011","0101?101010000101101","10111001011111010111","1010?11100?01010111?","00110010010001010110","00000001001101111010","00?1001100?110111101","11?010011100111?0010"}

    Returns: 2961408

  68. {"0011111111001?","00101011101111","11001010010010","10001111111101","11110101111101","10011011111111","11110101111011","11011110111011","11011111011111","10111111100110","01011111100011","01011100110000","11100111111000","?1011111101000"}

    Returns: 14

  69. {"01101111?1??1111?110","1010110111111?0?111?","11001111110?111?1?11","00001111111111111111","11110011??1111111110","11110011111111111111","10111101111111111110","111111101?11111111?1","?111?11101?111111111","1111?11?101?11111111","?1011111?10111111110","?1?111111?101?11?111","11111111111100111111","1?111111111?00?01011","1011111111111?0?1111","1??11111111110?01111","?1111111111?11110111","11?11111111110111011","1111111?111111111101","0?110101110111111110"}

    Returns: 12176000

  70. {"0?1110?10111001110?1","?001011111?111111101","10011111001011101??1","11100?100111111?1?11","10100111110111100111","011?1010001011111101","?1111101?1?111110111","1110101011111?1110?1","010010?101101111111?","11011011101111001111","1?1101?1110111111111","11011011011001101010","0111111111100?110110","0111111?1111?001?110","11111111101110011011","110?0111101011100111","1111010111110?10011?","01??1110111011011001","?0?1101?111111111001","11111111?1100011?110"}

    Returns: 981648

  71. {"01001101011111101101","10111111110101011111","01011111111?11010110","011011001111100?1111","11110111111111111110","11111011111111111110","01101100111111011111","11101100011001101110","01111110011111001111","11111111101110111111","10111111110111111111","11?11110111000111111","10111110111001111111","11101111101010111111","10001101011111001110","011?1110011111001110","11011111111111110001","11111111111111110011","01111111111111110101","11010010111111001110"}

    Returns: 40

  72. {"01?100111101111111","101011010?0111?111","?10101001101110110","101010011110010110","010101111001110111","011010011110001111","100010010111011100","110111100000010011","101111000111?01101","1?110110100?111101","00010110100000010?","111010101?00?10111","11101000?10?011111","111110110101101100","1?0001101100110111","111111101111111011","111111010001101100","1100110111?1101100"}

    Returns: 874

  73. {"0001111111100001","00110001011?1101","0100111110111110","1100110110101111","1011010010?11101","1011101011111111","1010010111111111","1111001011111111","1011111101100011","1100011110001110","1111?11110011101","0?10111100100?10","0111111101100111","01111111011?1011","0011011111011101","1101111110101110"}

    Returns: 56

  74. {"000??0???0000000","000000??10000000","0000?000?0000000","?000000000000001","?0?001000000?01?","0000101000100000","??0001000?000000","??00000000000?00","?1?0000000?10000","000000?000?00000","00000100??000010","0000000010000100","0000?00000000000","0000000?00010000","0000100000100001","0001?00000000010"}

    Returns: 81920

  75. {"0010???1?","00011??1?","100??1???","01?0?1?10","?1??011??","??1110?1?","????1?0??","11?1?1?01","???0???10"}

    Returns: 4479825

  76. {"0????","?0???","??0??","???0?","????0"}

    Returns: 2750

  77. {"0??100","?01111","?10010","1100?1","011?01","010110"}

    Returns: 28

  78. {"01010010001011111101","10111101?111110010??","01010011111101010110","111011110011?011?111","01010111?11101110011","01011011111101?1??11","10111101111?01100111","01111110111111101?11","0?10?11101011?111011","0110111110111011??11","11111111010?1011111?","011111?111?001010110","110?00011110011110?1","11101111?00110110111","10011?11111011001110","10111100111111001111","110?0?011?1010110?1?","10110?1?0?110111?011","0?1111111111?111110?","1?01111111?01101?1?0"}

    Returns: 8225536

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

    Returns: 2750

  80. {"00110110111111?01","00101101111111111","11011110111???11?","1010011101?110011","01100100111011111","11111001101010111","1011000000?100111","0101010000?11101?","11101100001101111","11111000001110111","111?11??11000111?","11?10011110010101","11?11101010101001","11?01001101010100","?1101110111101011","01111111111000101","11?1111?11?110110"}

    Returns: 8448

  81. {"0110?111111?11","10111100010110","1101?010111?11","01100??1010111","?1?001111?1111","110?10101?1?1?","101?1101110111","10011010110111","10101111001010","1111??1100001?","10101100100100","?1?11?11001011","11111111110100","10111?110?0100"}

    Returns: 11264

  82. {"0????1?","?0?????","??0????","???0???","????0??","1????0?","??????0"}

    Returns: 3493492

  83. {"0111101110111","10?111111?1?1","1?0?1101111?1","11?011?111111","1111011?11111","0111101111111","110?1101?1111","1111?1101?111","111111?101111","0?11111?10111","1111111111011","1??1111111101","1111111111110"}

    Returns: 4608

  84. {"0??????","?0?????","??0????","???0???","????01?","????10?","??????0"}

    Returns: 3493492

  85. {"01000100111111","10011111111101","00011100110101","01100111110110","01100111010111","11111001001100","01011001110?10","01011110111110","11110011000101","1111101100?011","110001010?0111","111111?1101001","10011011011001","11101000111110"}

    Returns: 22

  86. {"0110110100100100?1?1", "1000?0101?0100001?10", "1000?011111101?10000", "0000001011011011?010", "1??00?10001111?10?10", "1000?010110111110101", "011111001100100?1000", "10100000111?11111111", "011101110010?001110?", "0?1101110011010111?0", "10101001110011010111", "0111110?010001001110", "00011111?010011100?1", "101011010111101?1000", "00?1?1010000110?0010", "001111?111101??0?011", "?10?00111101010?0000", "1?00?101111100000010", "?10110010?11?0110100", "10000101?01010010000" }

    Returns: 5898240

  87. {"0?1", "?01", "110" }

    Returns: 5


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: