Statistics

Problem Statement for "CliqueCount"

Problem Statement

An undirected graph is defined as a set of vertices with undirected edges connecting some of the pairs of vertices. A clique in an undirected graph is a non-empty subset of vertices where there is a direct connection between every pair of vertices in the subset. A maximal clique is a clique that is not a proper subset of any other clique. You will be given a graph as a String[] where the jth character of the ith element is a '1' if and only if vertices i and j are connected. Your method should return the number of maximal cliques in the graph.

Definition

Class:
CliqueCount
Method:
countCliques
Parameters:
String[]
Returns:
int
Method signature:
int countCliques(String[] graph)
(be sure your method is public)

Constraints

  • graph will contain between 1 and 20 elements, inclusive.
  • Each element of graph will contain as many characters as graph has elements.
  • Each character in graph will be '0' or '1'.
  • Character j of element i of graph will be the same as character i of element j for all i and j.
  • Character i of element i of graph will be '0' for all i.

Examples

  1. {"010", "100", "000"}

    Returns: 2

    If the vertices are 0, 1, and 2, corresonding to the elements of the input, then the two maximal cliques are {0,1} and {2}.

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

    Returns: 1

    All nodes are connected so there is just one big clique.

  3. {"00010000000000100000", "00110000000000000000", "01011001000000011000", "11101000000100010110", "00110000001100000000", "00000000010000000001", "00000000000000011001", "00100000000010000001", "00000000000100011000", "00000100000010000010", "00001000000000000010", "00011000100001000101", "00000001010000000000", "00000000000100000010", "10000000000000000010", "00110010100000000000", "00100010100000000000", "00010000000100000000", "00010000011001100000", "00000111000100000000"}

    Returns: 28

  4. {"00", "00"}

    Returns: 2

  5. {"01111111111111111111", "10111111111111111111", "11011111111111111111", "11101111111111111111", "11110111111111111111", "11111011111111111111", "11111101111111111111", "11111110111111111111", "11111111011111111111", "11111111101111111111", "11111111110111111111", "11111111111011111111", "11111111111101111111", "11111111111110111111", "11111111111111011111", "11111111111111101111", "11111111111111110111", "11111111111111111011", "11111111111111111101", "11111111111111111110"}

    Returns: 1

  6. {"00111111111111111111", "00011111111111111111", "10001111111111111111", "11000111111111111111", "11100011111111111111", "11110001111111111111", "11111000111111111111", "11111100011111111111", "11111110001111111111", "11111111000111111111", "11111111100011111111", "11111111110001111111", "11111111111000111111", "11111111111100011111", "11111111111110001111", "11111111111111000111", "11111111111111100011", "11111111111111110001", "11111111111111111000", "11111111111111111100"}

    Returns: 265

  7. {"00011111111111111111", "00001111111111111111", "00000111111111111111", "10000011111111111111", "11000001111111111111", "11100000111111111111", "11110000011111111111", "11111000001111111111", "11111100000111111111", "11111110000011111111", "11111111000001111111", "11111111100000111111", "11111111110000011111", "11111111111000001111", "11111111111100000111", "11111111111110000011", "11111111111111000001", "11111111111111100000", "11111111111111110000", "11111111111111111000"}

    Returns: 296

  8. {"01101110011111110111","10111011010111101111","11000101111101111011","01001110011111111110","11010101110110111111","10111010101111111111","11010100110101110011","01101000111110111010","00101111011111101011","11111011100110010111","10110101100001111111","11111111110011111011","11011101110101110101","11110110101110100111","11111111101111011111","10111111011110101101","01111101101100110110","11011100011011111011","11111111111101101101","11101110111111110110"}

    Returns: 96

  9. {"01011111110110111111","10101101111111111111","01000111111101111101","10001010111111010101","11010011111111001111","11100011110111111101","10111101111111111110","11101110011011101111","11111110011111111110","11111111101111111111","01111011110111011011","11111110111011101001","11011111111101111100","01111111111110101111","11100111110111011101","11110110111010101011","11101111111111110001","11111111110011100011","11001011111001010101","11111101011101111110"}

    Returns: 92

  10. {"01101111111111101111","10100101111001110111","11011011111110110010","00101101111011111100","10110110111111111101","11011010111111010101","10101101111111100111","11110010101101111111","11111111011111111111","11111110101011110111","11111111110111111111","10101111101011111110","10111110111101111111","11011111111110101110","11111011111111011111","01111101111110101110","10011001101111110110","11011111111111111011","11100011111111111101","11001111111010100110"}

    Returns: 51

  11. {"01101111111111111111","10111111111111111011","11011111111111111111","01101111111111111111","11110111001111111111","11111011111110111111","11111101101111011111","11111110101110111110","11110111011110111111","11110100101111111111","11111111110011111111","11111111110011111111","11111111111101111101","11111010011110111111","11111101111111011111","11111111111111101111","11111111111111110110","10111111111111111011","11111111111101111101","11111110111111110110"}

    Returns: 240

  12. {"01111111101111111111","10111110111111101111","11001111111111011111","11001111111111111111","11110111111111111111","11111001110111111111","11111001111111111111","10111110111111111111","11111111011111111111","01111111101111111111","11111011110111111111","11111111111011111111","11111111111100111111","11111111111100111101","11011111111111011111","10111111111111101111","11111111111111110111","11111111111111111011","11111111111110111101","11111111111111111110"}

    Returns: 32

  13. {"01011111100110111101","10101111100011101111","01011011111111011101","10101010101111101101","11110111010010110101","11001001110111111101","11111000101011010101","11101100100111111111","11110111010101111111","00101100101110111111","00110010010111111111","10110101111011111001","11111111011101111110","01110111101110011111","11011101111110000101","10101111111111000111","11110101111111000111","11111111111011111001","01000001111011011001","11111111111101111110"}

    Returns: 124

  14. {"01111111111111101111","10111111111111111111","11011111111111111111","11101111111111101101","11110111111111111011","11111011111011111111","11111101111111111111","11111110111111111111","11111111011111111111","11111111101011011111","11111111110111111111","11111011101011111111","11111111111100111111","11111111111100111111","11111111101111011111","01101111111111101110","11111111111111110111","11110111111111111011","11101111111111111101","11111111111111101110"}

    Returns: 36

  15. {"01111111111111111111","10111111111111111111","11011111111111111111","11101111111111111111","11110111011111111111","11111011111111111111","11111101111111111111","11111110111111111111","11110111011111111111","11111111101111111111","11111111110111111111","11111111111011111111","11111111111101110111","11111111111110111111","11111111111111011111","11111111111111101111","11111111111101110111","11111111111111111011","11111111111111111101","11111111111111111110"}

    Returns: 4

  16. {"01111111111111111101","10111111011011101110","11010111110101111110","11101101111111111111","11010111111011101111","11111010111111101101","11101101111111011111","11111010011101111110","10111110011011101111","11111111101011111111","11011111110111100011","10110111001011101011","11011110111101111011","11111111111110110101","11111101111111011111","10110011010011101111","11111111110110110011","11111111110001110011","01111011111110111101","10011110111111111110"}

    Returns: 94

  17. {"01010011111111111111","10100011110100111110","01011100011111111111","10101111111111011101","00110111111011011101","00111011111111011101","11011101011110111011","11011110111111111111","11011101010111111111","11111111101111111111","10111111010111111101","11110111111011110000","10111111111101101110","10111101111110011101","11100011111110010111","11111111111101101100","11111111111011010101","11111101111011111011","11100011110010100101","10111111111001101110"}

    Returns: 64

  18. {"01111111111011111101","10101010110111011111","11001111011011110101","10001111111011111011","11110111110111101011","10111011111100111110","11111101111111111111","10111110011110011111","11011110011011101110","11111111101111111001","10110111110111111111","01001111011011011111","11111011111101111111","11111010111110111101","10111110111011011111","11110111011111101110","11011111111111110110","11100111101111111011","01011111101110111101","11111011011111100110"}

    Returns: 90

  19. {"01111111111111111111","10111111111111111111","11011111111111111111","11101111111111111011","11110111111111111111","11111011111111111111","11111101111111111111","11111110111111111111","11111111010111111111","11111111101111111111","11111111010111011111","11111111111011111111","11111111111101111111","11111111111110111111","11111111110111011101","11111111111111101111","11111111111111110111","11101111111111111011","11111111111111011101","11111111111111111110"}

    Returns: 6

  20. {"01111111101111111111","10111111111111111111","11011111111111111111","11101111111111111111","11110111111111111111","11111011110111111111","11111101111111111101","11111110111111111101","11111111011111111111","01111111101111111111","11111011110111111111","11111111111011111111","11111111111101111111","11111111111110111111","11111111111111011111","11111111111111101111","11111111111111110111","11111111111111111011","11111100111111111101","11111111111111111110"}

    Returns: 8

  21. {"01010111011111110011","10011101100011110011","00010100101101100111","11101111110110011100","01010010111001101110","11110011011110111110","10011100011100011111","11010100111111101110","01111001011011100110","10011111101100111101","10101111110110010000","10110111011011101111","11010101101101111100","11101001100110111001","11101101110111010011","11010110011011101111","00011111010111010001","00111111110110010011","11101111100100110101","11100010010101111110"}

    Returns: 90

  22. {"01111111111111111111","10111111111111111111","11011111111111111101","11101111111111111111","11110111111111111111","11111011111111111111","11111101111111111111","11111110111111111111","11111111011111111111","11111111101111111111","11111111110111111111","11111111111011111111","11111111111101111111","11111111111110111111","11111111111111011111","11111111111111101111","11111111111111110111","11111111111111111011","11011111111111111101","11111111111111111110"}

    Returns: 2

  23. {"01111111111111111111","10111111111111111111","11011111111111111111","11101111111111111111","11110111111111111111","11111011111111111111","11111101111111111111","11111110111111111111","11111111011111111111","11111111101111111111","11111111110111111111","11111111111011111111","11111111111100111111","11111111111100111111","11111111111111011111","11111111111111101111","11111111111111110111","11111111111111111010","11111111111111111101","11111111111111111010"}

    Returns: 4

  24. {"01111111111111111111","10111111111111111111","11011111111111111111","11101111111111111111","11110111111111111111","11111011111111111111","11111101111111111111","11111110111111111111","11111111011111111111","11111111101111111111","11111111110111111111","11111111111011111111","11111111111101111111","11111111111110111111","11111111111111011111","11111111111111101111","11111111111111110111","11111111111111111011","11111111111111111101","11111111111111111110"}

    Returns: 1

  25. {"01111111111011111111","10111111111111111111","11011111011011111111","11101111111111111111","11110111111111111111","11111011101111111111","11111101111111111111","11111110011111011111","11011110011011111111","11111011101111111111","11111111110111111110","01011111011001110101","11111111111001111111","11111111111110111111","11111110111111011111","11111111111111101111","11111111111011110110","11111111111111111011","11111111111011111101","11111111110111110110"}

    Returns: 20

  26. {"01111111111101111111","10111111111111111111","11011111111011111101","11101111111110111111","11110111101111111111","11111011111010111111","11111101111111111101","11111110111111111111","11111111011111011111","11110111101011101111","11111111110111011011","11011011101011011011","01111111111101111111","11101011111110111111","11111111010011011111","11111111101111100111","11111111111111100111","11111111110011111010","11011101111111111101","11111111111111111010"}

    Returns: 108

  27. {"01111111111111110111","10111101111111111111","11011111111111111111","11101111111111111111","11110111111111111111","11111011111111111111","10111101111110111111","11111110111111111111","11111111011111111011","11111111101111111111","11111111110111111111","11111111111011111111","11111111111101111111","11111101111110111111","11111111111111011111","11111111111111100101","01111111111111100111","11111111011111111011","11111111111111101101","11111111111111111110"}

    Returns: 12

  28. {"00011011111111111111","00011100010011101010","00011100101101111100","11101101010111111111","11110101001110001111","01111011011111100100","10000101111010011101","10011110111111110011","10100011011111101111","11010111101110111111","10101111110110111011","10111101111011001101","11011111111101111111","11110101100110011010","11110101111010001111","10110011011011001101","11111010111111110110","10111110110110111011","11011001111011101101","10011011111110110110"}

    Returns: 80

  29. {"01111111111111111111","10111111111111111111","11011111111111111111","11101111111111011111","11110111111111111111","11111011111111111111","11111101111111111111","11111110111111111111","11111111011111101111","11111111101111111111","11111111110111111111","11111111111011111111","11111111111101111111","11111111111110111111","11101111111111011111","11111111011111101111","11111111111111110111","11111111111111111011","11111111111111111101","11111111111111111110"}

    Returns: 4

  30. {"01111111111111111111","10111111111111111111","11011111111111111111","11101111111111111111","11110111111111111111","11111011111111111111","11111101111111111111","11111110111111111111","11111111011111111111","11111111101111111111","11111111110111111111","11111111111011111111","11111111111101111111","11111111111110111111","11111111111111011111","11111111111111101111","11111111111111110111","11111111111111111011","11111111111111111101","11111111111111111110"}

    Returns: 1

  31. {"01111111111111111111","10111111111111111111","11011111111111111111","11101111111111111111","11110111111111111111","11111011111111111111","11111101111111111111","11111110111111111111","11111111011111111111","11111111101111111111","11111111110111111111","11111111111011111111","11111111111101111111","11111111111110111111","11111111111111011111","11111111111111101111","11111111111111110111","11111111111111111011","11111111111111111101","11111111111111111110"}

    Returns: 1

  32. {"01111111111111111110","10110111111111110111","11000111111111111111","11001111111111101111","10010111111111110111","11111011111011111111","11111101111111111111","11111110111111111111","11111111011111111111","11111111101111111111","11111111110111111111","11111011111011111111","11111111111101111111","11111111111110111011","11111111111111011111","11101111111111101111","10110111111111110111","11111111111110111011","11111111111111111101","01111111111111111110"}

    Returns: 48

  33. {"01100111101011101111","10101111110111111111","11010011111111011101","00101101111110001100","01010111110001010011","11011011010101000111","11101101111111111101","11111110111110001010","11111011010111111110","01111111101101001011","10110011010111101011","01110111111000111111","11110011101000111110","11101110111000011111","11000010101110010001","01101010100111101111","11110011111111010111","11110110100111011001","11001101111111011001","11101110011101111110"}

    Returns: 74

  34. {"01111111111111110111","10111111111111111111","11011111111111111111","11100111111111111101","11100111111011111111","11111011111011111011","11111101111111111111","11111110111111111111","11111111011111111011","11111111101111111111","11111111110111111111","11110011111011111111","11111111111101111111","11111111111110111111","11111111111111011111","11111111111111101111","01111111111111110111","11111011011111111011","11101111111111111101","11111111111111111110"}

    Returns: 14

  35. {"01111101111111101111","10111111111111111111","11011110011110101110","11101111101111011111","11110011011111011111","11110011111101110111","01111101110111111101","11011110110111111101","11010111011010111111","11101111101111111111","11111100110111111110","11111111011010011110","11111011111100110110","11011111011000111111","11100111111011011111","01011111111111101001","11111011111101110110","11111111111111101011","11111100111111101101","11011111110001110110"}

    Returns: 109

  36. {"01111111111111111111","10111111111111111111","11011111111111111111","11101111111111111111","11110111111111111111","11111011111111111111","11111101111111111111","11111110111111111111","11111111011111111111","11111111101111111111","11111111110111111111","11111111111011111111","11111111111101111111","11111111111110111111","11111111111111011111","11111111111111101111","11111111111111110111","11111111111111111011","11111111111111111101","11111111111111111110"}

    Returns: 1

  37. {"01111111111111111111","10111111111111111111","11011111111101111111","11101111111111111101","11110111111111111111","11111011111111111111","11111101111111111111","11111110111111111111","11111111011111111111","11111111101111111111","11111111110111111111","11111111111011111111","11011111111101111111","11111111111110111111","11111111111111011111","11111111111111101111","11111111111111110111","11111111111111111011","11101111111111111101","11111111111111111110"}

    Returns: 4

  38. {"01111111101111111101","10111111111111111111","11011111111111111111","11101111111111111111","11110111111111111111","11111011111111111111","11111101111111111111","11111110111011111111","11111111001111111111","01111111001111111111","11111111110111111101","11111110111011111111","11111111111101111110","11111111111110111111","11111111111111011111","11111111111111101111","11111111111111110111","11111111111111111011","01111111110111111101","11111111111101111110"}

    Returns: 16

  39. {"01111111111111111111","10111111111111111111","11011111111101111110","11101111111101111111","11110101111111111001","11111011101011110111","11110101111111111111","11111110111111111011","11111111010111111111","11111011101011011111","11111111010111111111","11111011101011111111","11001111111101111111","11111111111110111111","11111111101111011111","11111111111111100110","11111011111111100111","11110110111111111011","11110111111111111101","11011111111111101110"}

    Returns: 84

  40. {"01111110011111111111","10101110111111111111","11001111111111111111","10001011111111111111","11110111101111110111","11101011111111111111","11111101111111111111","00111110111111111011","01111111011011101111","11110111101111111111","11111111110111001111","11111111011011011111","11111111111101111111","11111111111110110111","11111111110011011110","11111111010111101110","11110111111110110111","11111110111111111011","11111111111111111101","11111111111111001110"}

    Returns: 60

  41. {"01111111011111111111","10111111111101111011","11001111111111110111","11001111111111111111","11110111111111111111","11111011111111111111","11111101111111111111","11111110111111111111","01111111011111011111","11111111101111111111","11111111110111101111","11111111111011111111","10111111111101111111","11111111111110111111","11111111011111011111","11111111110111101111","11011111111111110111","10111111111111111011","11111111111111111101","11111111111111111110"}

    Returns: 16

  42. {"01111101101001010101","10001001101010110101","10011011111010111111","10100111110101100101","11100110100101110011","10011011001111101110","00111101101001010110","11110110011011101011","11111010001011010010","00110001001011010000","11100111110101011111","00011100001011110011","01100101110100010100","10011111111100100111","01111101000101000110","11101010111110000110","00100101001000000000","11110110001011110010","00101111101101110100","11111001001101000000"}

    Returns: 77

  43. {"01011001111111111111","10111111110011111010","01010000101100001100","11101101010001111000","11010110101110010101","01011000000100111001","01001001111110111110","11010010101101001101","11101011001101100101","11010010001111011111","10101011110101111101","10101111111000101011","11001010010001111110","11010001111010110001","11010110101111001001","11011110011011001001","11110111011110110111","10101011111010001001","11000010010110001001","10001101111101111110"}

    Returns: 70

  44. {"01111011101111101110","10111111011111111111","11011011110111111111","11101111111111111111","11110111111111111111","01011011111111111111","11111101111111111111","11111110111101111111","10111111011111111111","01111111101101111111","11011111110111110111","11111111111011111111","11111110101101110111","11111111111110110111","11111111111111001111","01111111111111001111","11111111110100110110","11111111111111111011","11111111111111111101","01111111111111110110"}

    Returns: 34

  45. {"01111111111111111111","10111111110111101110","11011111111011111111","11101011011011111111","11110111111111111111","11101011011110111111","11111101111111111111","11111110111111111111","11101011001011100111","11111111001111111111","10111111110110111101","11001111011011111111","11111111111101110111","11111011110110111111","11111111111111010111","10111111011111101011","11111111011101010111","11111111111111101011","11111111110111111101","10111111111111111110"}

    Returns: 39

  46. {"01101101111111011111","10111011111111110011","11011111101110111100","01101111111111111111","11110001111110111111","10110011111010111011","01110101111111111111","11111110111111111011","11111111011111111110","11011111101110111101","11111111110110101111","11111011111011100111","11111111111101101100","11010011100110011101","01111111111110001101","11111111110001000111","10111111111011100110","10111010111111111011","11011111101100011101","11011111011101110110"}

    Returns: 115

  47. {"01111111111111111111","10111011111111111111","11011111111111111111","11101111111111111111","11110111111111111101","10111011111111111111","11111101111111111111","11111110111111111110","11111111011111111111","11111111101101111111","11111111110011111111","11111111110011111111","11111111101101111111","11111111111110111111","11111111111111011111","11111111111111101111","11111111111111110111","11111111111111111011","11110111111111111101","11111110111111111110"}

    Returns: 32

  48. {"01111111111111111101","10111111111111111111","11011111111111111111","11101111111101111111","11110111111111111111","11111001111111011111","11111001111011111111","11111110111110111111","11111111011111111111","11111111101111111101","11111111110111111011","11111101111010111111","11101111111101111101","11111110111010011111","11111011111110011101","11111111111111101111","11111111111111110011","11111111110111110011","01111111101101011101","11111111111111111110"}

    Returns: 28

  49. {"00110001100100101011","00000110100100111001","10000110111101000110","10001000101101110100","00010010100110110100","01100010111111110010","01101101010110110110","10000010111110101011","11111101000101010111","00100111001011110111","00110101010101001111","11111111101001011101","00001111010001100111","00110100111110111111","11011111010011010111","01011110110101101001","11000001001101010010","00111010111111100011","10100111111011101101","11000001111111110110"}

    Returns: 63

  50. {"01111001101101111101","10111100111111011101","11011110111111100110","11101111110111111111","11110111101111111011","01111011111111111111","00111101111111111111","10011110110110011111","11111111011111001110","01110111101111111111","11101110110101111111","11111111111011111011","01111111110101111111","11111110111110111111","10111110011111011111","11011111011111101111","11011111111111110111","11110111111011111010","00111111111111111101","11011111011111111010"}

    Returns: 72

  51. {"00111101111111111111","00111111111111111111","11011101111111111111","11101111111111110110","11110101111111110000","11111010011111111111","01010101111101111110","11111010101111111101","11111011011111111111","11111110101111111101","11111111110111111111","11111111111001111111","11111101111001111111","11111111111110011101","11111111111110011011","11111111111111101111","11100111111111110111","11110111111111011010","11110110101110111101","11100101111111111010"}

    Returns: 124

  52. {"01010110101111111010","10111110010011111011","01011111001110111110","11101110111111011011","01110001101110111111","11110001101111111110","11110001101011011101","00101110100001111101","10011111001011101110","01010000001101001100","10111110110001011010","10111100010001001111","11111110100001000011","11010111111110110001","11101101100001010010","11111111001001101110","11111111111100010111","00101111110100011000","11111100101110111001","01011011000111001010"}

    Returns: 71

  53. {"01111111111111111111","10111111111111111111","11011111111111111111","11101111111111111111","11110111111111111111","11111011111111111111","11111101111110111111","11111110111111111111","11111111011111111111","11111111101111111101","11111111110111111111","11111111111011111111","11111111111101111111","11111101111110110111","11111111111111011011","11111111111111101111","11111111111110110111","11111111111111011011","11111111101111111101","11111111111111111110"}

    Returns: 8

  54. {"01111110111011011111","10111111110111111101","11010111111110111110","11101011110111101111","11010111110110111111","11101011111111111110","11111101010111101111","01111110111101111111","11111101011111111111","11111111101111111011","10100101110111111111","01111111111011111010","11111110111101111011","11010111111110110101","01111111111111011001","11101101111111101101","11111111111110110110","11111111101001011000","10111111111110001001","11011011111011110010"}

    Returns: 119

  55. {"01111111111111111111","10111111111111100111","11011111111111111111","11101111011111111111","11110110111111111111","11111011111111111111","11111101111111111111","11110110111111111111","11101111011111111111","11111111101111011011","11111111110111111111","11111111111011111111","11111111111101111111","11111111111110111111","11111111101111011111","10111111111111101111","10111111111111110111","11111111101111111011","11111111111111111101","11111111111111111110"}

    Returns: 16

  56. {"01111111101111111111","10111111111111111010","11011111011111111111","11101111111111111111","11110111111111111111","11111011101111011111","11111101110101111111","11111110111111011111","11011111011111110111","01111011101111111111","11111101110101111111","11111111111011111111","11111101110101111011","11111111111110111111","11111010111111011111","11111111111111101111","11111111011111110110","10111111111101111011","11111111111111111101","10111111111111110110"}

    Returns: 56

  57. {"01110111111101111111","10111101111111111111","11011111111111111111","11101101111111111111","01110111111110111110","11111011111101111111","10101101011101011000","11111110111101111111","11111101011111111111","11111111101111111111","11111111110110111111","11111111111011111111","01111000111100101111","11110111110100111111","11111101111111011111","11111111111101101111","11111111111111110111","11111101111111111011","11111101111111111101","11110101111111111110"}

    Returns: 8

  58. {"01111111111111111111", "10111111111111111111", "11011111111111111111", "11101111111111111111", "11110111111111111111", "11111011111111111111", "11111101111111111111", "11111110111111111111", "11111111011111111111", "11111111101111111111", "11111111110111111111", "11111111111011111111", "11111111111101111111", "11111111111110111111", "11111111111111011111", "11111111111111101111", "11111111111111110111", "11111111111111111011", "11111111111111111101", "11111111111111111110" }

    Returns: 1

  59. {"00010000000000100000", "00110000000000000000", "01011001000000011000", "11101000000100010110", "00110000001100000000", "00000000010000000001", "00000000000000011001", "00100000000010000001", "00000000000100011000", "00000100000010000010", "00001000000000000010", "00011000100001000101", "00000001010000000000", "00000000000100000010", "10000000000000000010", "00110010100000000000", "00100010100000000000", "00010000000100000000", "00010000011001100000", "00000111000100000000" }

    Returns: 28

  60. {"01000", "10100", "01010", "00101", "00010" }

    Returns: 4

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

    Returns: 1

  62. {"01111111111111111111", "10111111111111111111", "11011111111111111111", "11101111111111111111", "11110111111111111111", "11111011111111111111", "11111101111111111111", "11111110111111111111", "11111111011111111111", "11111111101111111111", "11111111110111111111", "11111111111011111111", "11111111111101111111", "11111111111110111111", "11111111111111011111", "11111111111111101111", "11111111111111110111", "11111111111111111011", "11111111111111111101", "11111111111111111110" }

    Returns: 1

  63. {"00010000000000100000", "00110000000000000000", "01011001000000011000", "11101000000100010110", "00110000001100000000", "00000000010000000001", "00000000000000011001", "00100000000010000001", "00000000000100011000", "00000100000010000010", "00001000000000000010", "00011000100001000101", "00000001010000000000", "00000000000100000010", "10000000000000000010", "00110010100000000000", "00100010100000000000", "00010000000100000000", "00010000011001100000", "00000111000100000000" }

    Returns: 28

  64. {"01000", "10100", "01010", "00101", "00010" }

    Returns: 4

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

    Returns: 1

  66. {"01111111111111111111", "10111111111111111111", "11011111111111111111", "11101111111111111111", "11110111111111111111", "11111011111111111111", "11111101111111111111", "11111110111111111111", "11111111011111111111", "11111111101111111111", "11111111110111111111", "11111111111011111111", "11111111111101111111", "11111111111110111111", "11111111111111011111", "11111111111111101111", "11111111111111110111", "11111111111111111011", "11111111111111111101", "11111111111111111110" }

    Returns: 1

  67. {"00010000000000100000", "00110000000000000000", "01011001000000011000", "11101000000100010110", "00110000001100000000", "00000000010000000001", "00000000000000011001", "00100000000010000001", "00000000000100011000", "00000100000010000010", "00001000000000000010", "00011000100001000101", "00000001010000000000", "00000000000100000010", "10000000000000000010", "00110010100000000000", "00100010100000000000", "00010000000100000000", "00010000011001100000", "00000111000100000000" }

    Returns: 28

  68. {"01000", "10100", "01010", "00101", "00010" }

    Returns: 4

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

    Returns: 1


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: