Statistics

Problem Statement for "WalkOverATreeDiv2"

Problem Statement

Surya has a tree with n nodes, numbered 1 through n. Each node contains some arbitrary nonnegative number of tokens.

Surya sometimes goes for a walk on the tree. He has to start his walk in node 1, but he may terminate it in any node of the tree. Surya gets tired easily: during the walk he is only able to traverse at most L edges.

Surya now wants to collect as many tokens as possible during a single walk. He can collect tokens in all nodes he visits, including the nodes where he starts and ends his walk. Obviously, the tokens in each node can only be collected once.

You are given the structure of the tree in int[]s A and B, each with n-1 elements. For each valid i the tree contains an edge between the nodes A[i] and B[i]. You are also given the int[] tokens with n elements. For each valid i, tokens[i] is the number of tokens in node i+1. Finally, you are given the int L.

Return the maximum number of tokens Surya can collect.

Definition

Class:
CollectingTokens
Method:
maxTokens
Parameters:
int[], int[], int[], int
Returns:
int
Method signature:
int maxTokens(int[] A, int[] B, int[] tokens, int L)
(be sure your method is public)

Constraints

  • n will be between 1 and 50, inclusive.
  • A and B will contain exactly n-1 elements each.
  • Each element of A and B will be between 1 and n, inclusive.
  • A and B will define a tree.
  • tokens will contain exactly n elements.
  • Each element of tokens will be between 1 and 100, inclusive.
  • L will be between 1 and 100, inclusive.

Examples

  1. {1}

    {2}

    {7,1}

    6

    Returns: 8

    This tree consists of two nodes and a single edge. There are 7 tokens in node 1 and 1 token in node 2. Surya can make at most six steps, which is more than enough to collect all 7+1 = 8 tokens.

  2. {3,1}

    {2,2}

    {2,3,9}

    5

    Returns: 14

  3. {1,2,5,3}

    {4,4,1,4}

    {6,1,6,4,4}

    3

    Returns: 16

    This is a tree with five nodes. One optimal walk for this tree is to start in node 1, go to node 4, then to node 3, and then back to node 4. As L=3, this is the longest walk Surya may make. During this walk he will collect 6 tokens in node 1, 4 tokens in node 4, 6 tokens in node 3, and then 0 tokens when revisiting node 4. The total is 6+4+6+0 = 16 tokens. Another optimal walk is to start in node 1, go to node 4, then to node 3, and to stop there. Surya is not required to make all L steps.

  4. {9,1,7,10,5,8,3,4,2}

    {6,6,9,6,6,1,1,6,6}

    {4,2,1,6,3,7,8,5,2,9}

    4

    Returns: 26

  5. {25,22,35,42,40,9,32,12,37,44,23,1,24,28,20,4,26,33,11,48,34,6,16,50,46,17,8,43,18,30,31,36,39,13, 10,45,3,47,15,2,29,19,7,14,41,49,38,27,21}

    {5,5,25,25,25,42,25,40,5,35,25,32,42,9,32,23,40,25,20,33,26,37,12,1,48,24,22,25,11,24,48,34,18,9,50,42,16,40,1, 10,47,22,48,44,48,1,4,46,47}

    {6,9,4,9,5,8,6,4,4,1,4,8,3,4,5,8,5,6,4,9,7,9,7,9,5,2,7,2,7,7,5,9,5,8,5,7,1,9,3,9,3,6,4,5,5,4,7,9,2,2}

    48

    Returns: 194

  6. {45,14,8,21,16,4,11,33,7,27,17,31,15,5,24,19,43,29,46,9,32,36,44,40,20,28,48,50,37,35,2,41,49,18,10,38,6,23,1,42,34,26,39,30,47,25,12,13,3}

    {22,22,45,14,45,22,22,21,4,16,45,33,17,8,7,15,27,15,24,14,46,45,4,7,5,22,19,22,17,8,20,15,43,46,21,50,20,24,50,24,1,22,6,32,29,29,1,15,10}

    {9,6,2,2,8,9,5,3,1,9,2,5,9,5,2,4,2,6,1,3,5,7,9,8,5,8,5,9,4,1,8,7,2,3,5,7,7,2,7,8,5,9,2,4,6,4,1,5,3,5}

    47

    Returns: 179

  7. {23,18,8,37,31,41,36,25,11,50,3,38,30,46,27,13,21,14,12,32,35,43,29,24,2,44,6,17,33,48,47,4,20,15,40,42,22,5,34,10,16,1,49,7,45,39,26,9,28}

    {19,19,19,18,23,18,19,31,41,18,8,37,23,31,23,23,3,31,38,38,8,11,36,30,11,31,23,32,50,38,37,14,2,18,13,12,27,15,35,20,41,36,46,30,20,6,19,6,18}

    {6,9,9,1,2,2,5,7,9,9,3,5,8,6,1,9,8,4,8,4,9,8,9,4,1,7,1,6,5,4,6,5,6,8,8,5,8,5,1,3,3,4,5,3,1,3,1,7,5,1}

    40

    Returns: 170

  8. {}

    {}

    {1}

    10

    Returns: 1

  9. {1}

    {2}

    {9,5}

    13

    Returns: 14

  10. {1,2}

    {3,3}

    {2,9,6}

    8

    Returns: 17

  11. {4,2,1}

    {3,3,3}

    {3,2,7,8}

    2

    Returns: 18

  12. {4,2,1,3}

    {5,5,4,5}

    {3,1,7,3,8}

    17

    Returns: 22

  13. {5,1,6,4,3}

    {2,2,2,1,1}

    {8,2,8,1,6,3}

    7

    Returns: 27

  14. {4,7,5,1,3,2}

    {6,6,4,4,5,6}

    {6,7,1,1,6,6,9}

    21

    Returns: 36

  15. {8,4,6,7,1,3,5}

    {2,2,8,8,8,4,7}

    {3,2,3,3,6,1,4,4}

    16

    Returns: 26

  16. {5,9,1,4,8,6,3,2}

    {7,7,7,7,9,4,7,4}

    {1,6,8,6,1,9,6,2,5}

    3

    Returns: 22

  17. {10,2,3,6,7,9,4,8,1}

    {5,5,5,10,5,2,10,5,6}

    {2,7,2,4,5,7,6,4,8,3}

    3

    Returns: 17

  18. {13,28,15,14,29,2,21,36,32,16,17,8,35,20,5,22,39,25,3,31,26,38,1,33,24,23,10,27,4,34,19,6,40,9,37,18,12,30,11}

    {7,7,7,28,28,13,29,2,14,21,32,2,17,7,8,13,35,29,32,17,35,31,21,28,3,33,17,35,32,2,27,26,27,8,32,7,29,26,23}

    {5,5,6,3,3,4,2,4,1,7,5,4,3,4,1,3,4,8,7,1,4,8,8,7,6,1,2,9,8,4,2,8,5,1,5,6,3,3,5,4}

    2

    Returns: 17

  19. {1,39,5,15,41,24,30,19,34,26,3,10,13,7,27,8,16,23,38,35,32,22,33,14,28,4,29,25,2,40,31,37,20,12,9,6,18,11,21,17}

    {36,36,1,1,5,1,39,24,24,36,41,15,39,15,34,39,39,24,7,10,23,36,30,24,13,10,23,36,7,38,8,19,2,13,19,34,14,4,29,39}

    {9,4,5,5,1,8,3,2,4,2,6,6,5,7,3,9,4,7,3,4,7,6,7,2,4,9,3,7,7,8,6,4,6,5,8,1,6,2,1,3,3}

    18

    Returns: 75

  20. {33,21,41,36,13,9,7,29,16,14,15,8,17,18,28,6,25,12,3,26,10,30,19,34,2,35,24,31,39,22,38,4,40,37,27,1,42,5,20,32,23}

    {11,11,11,33,33,36,33,41,11,36,16,21,9,11,29,9,16,16,29,16,21,15,26,36,3,9,34,11,11,24,30,41,16,33,19,26,8,38,4,5,15}

    {3,7,8,1,3,7,5,1,7,3,1,7,2,7,1,2,4,8,6,5,9,8,9,4,7,6,9,9,2,1,7,5,9,1,7,1,4,6,7,2,4,8}

    23

    Returns: 97

  21. {10,6,22,12,2,27,33,4,37,14,21,16,28,17,29,25,31,32,1,38,7,40,9,3,36,8,18,39,13,35,11,34,26,15,30,24,20,43,19,5,23,41}

    {42,42,42,6,22,22,22,2,12,27,2,10,14,6,42,12,22,12,10,17,25,31,31,37,32,37,1,33,14,3,2,4,38,3,14,12,22,1,42,42,42,20}

    {5,4,9,2,6,9,4,1,3,2,4,4,2,6,2,9,6,2,8,9,2,9,6,5,3,4,6,5,1,4,6,2,9,3,5,9,1,2,8,9,7,6,2}

    13

    Returns: 74

  22. {29,25,18,4,16,43,13,3,22,23,39,10,5,31,34,1,27,38,7,35,6,26,42,32,40,41,9,21,33,36,15,19,11,20,17,14,8,28,24,12,37,44,30}

    {2,2,2,29,25,18,16,25,13,3,4,2,18,22,25,2,25,13,10,16,5,2,34,18,2,34,23,39,9,5,41,21,23,5,41,34,40,40,25,31,22,33,40}

    {9,9,9,7,4,1,1,9,7,2,7,3,8,5,2,9,3,2,1,4,9,5,8,5,9,4,9,1,2,1,1,6,2,7,6,7,4,2,9,1,4,9,2,5}

    19

    Returns: 107

  23. {44,5,10,38,17,9,37,32,24,36,13,14,39,6,26,43,25,28,19,30,41,4,20,23,21,31,34,2,7,33,3,22,11,12,8,27,1,16,45,40,35,18,42,29}

    {15,15,44,15,10,5,17,44,17,10,44,5,36,32,44,39,10,26,43,13,13,36,10,6,32,43,17,14,4,38,25,31,3,43,44,6,6,7,21,22,37,7,7,31}

    {6,8,1,3,8,3,7,8,5,8,3,7,8,5,1,6,3,7,2,3,1,8,2,8,2,1,4,9,5,6,9,3,2,2,4,8,8,1,6,3,4,7,5,1,8}

    11

    Returns: 65

  24. {15,12,16,28,11,33,31,19,24,17,32,9,25,40,27,4,30,45,21,7,37,10,1,46,3,14,20,18,5,38,41,42,36,29,2,23,22,34,13,39,8,35,43,6,44}

    {26,26,26,15,15,16,15,15,31,28,11,19,33,17,28,17,19,16,24,30,21,15,16,37,19,21,11,7,12,3,17,40,18,11,37,24,41,46,33,24,11,16,11,10,18}

    {3,2,3,2,9,5,3,5,1,6,1,6,5,4,6,4,9,7,6,5,7,1,6,4,7,5,7,9,1,3,3,8,7,9,9,6,5,8,2,9,8,6,1,9,7,6}

    28

    Returns: 126

  25. {20,2,17,38,44,13,16,29,4,35,33,30,22,25,15,9,47,12,21,36,37,1,42,28,39,41,7,8,5,11,6,24,10,14,26,43,19,46,32,23,40,3,18,31,27,45}

    {34,34,20,2,34,2,34,38,34,13,13,35,17,35,13,16,17,20,33,25,35,44,16,20,20,9,30,13,25,13,35,34,47,21,22,9,44,28,26,1,13,11,19,4,15,5}

    {6,4,4,5,7,7,7,3,9,8,5,2,4,9,2,1,5,1,4,8,5,2,2,6,9,8,5,8,1,5,2,5,7,7,3,1,7,9,5,7,9,5,2,9,2,9,4}

    21

    Returns: 104

  26. {46,21,29,9,8,18,14,3,28,48,31,1,44,39,33,26,19,30,41,34,17,38,4,35,25,47,15,10,42,16,27,43,32,11,6,5,20,45,7,24,12,22,13,37,40,36,23}

    {2,2,46,21,2,46,8,18,18,3,18,8,21,31,28,2,33,48,3,48,21,1,34,34,38,8,28,8,3,41,41,14,19,42,32,32,44,42,43,41,39,27,31,4,18,18,1}

    {6,1,3,4,7,2,3,6,7,2,7,3,9,1,1,4,9,5,1,4,7,2,3,9,4,8,2,6,7,5,5,3,3,1,3,8,2,7,6,5,2,8,3,8,8,7,5,7}

    22

    Returns: 100

  27. {1,42,26,22,31,30,25,32,21,48,9,40,13,39,44,29,24,38,6,43,27,11,37,2,16,7,17,10,18,35,20,12,49,36,4,15,8,45,46,33,28,19,5,14,34,3,41,47}

    {23,23,1,1,26,1,31,22,1,25,30,48,26,48,9,22,48,25,9,30,39,21,25,48,30,11,31,44,6,23,26,35,13,44,27,48,6,13,17,39,20,46,1,20,4,12,32,42}

    {8,7,3,8,9,3,5,7,1,1,5,5,3,8,8,6,8,8,7,5,8,5,8,1,2,1,2,1,1,6,6,3,9,6,5,4,5,8,6,4,9,4,5,5,4,6,2,4,1}

    28

    Returns: 121

  28. {1,12,42,22,45,39,16,31,48,30,2,33,23,14,19,32,27,36,18,25,29,41,46,9,44,5,4,40,49,34,21,15,24,38,35,28,17,11,50,37,26,20,10,8,13,7,43,3,47}

    {6,6,1,1,6,1,42,42,22,39,48,45,48,42,16,2,48,23,30,45,6,14,27,48,1,29,41,32,5,23,16,46,12,29,4,5,15,29,12,33,23,35,16,31,30,8,49,48,5}

    {8,8,1,8,1,5,5,2,7,1,3,7,8,5,6,7,6,1,1,2,4,5,3,1,6,9,3,2,5,8,9,1,6,3,6,6,5,5,8,9,4,1,7,3,7,8,7,3,1,8}

    8

    Returns: 47

  29. {11,5,35,46,24,39,27,44,9,19,22,29,4,41,18,6,15,30,21,40,25,8,38,3,12,7,16,33,37,20,45,17,28,10,32,23,36,34,42,1,2,13,43,26,31}

    {14,14,11,14,5,11,35,46,11,24,44,9,22,39,29,11,19,18,19,44,41,18,4,4,38,35,46,27,18,33,27,25,30,20,24,4,27,20,33,9,22,28,1,10,10}

    {46,41,42,42,44,44,46,43,47,48,49,48,49,47,48,40,40,49,42,44,49,48,40,46,49,42,45,48,41,47,45,41,47,41,44,42,47,41,46,45,48,46,40,44,41,41}

    28

    Returns: 886

  30. {1}

    {2}

    {45,45}

    2

    Returns: 90

  31. {9,10,7,15,3,11,16,14,17,18,8,2,6,4,13,1,12}

    {5,5,5,5,10,15,10,10,7,16,3,5,7,2,7,2,14}

    {41,47,40,46,41,44,40,44,49,44,40,49,41,49,48,42,49,43}

    1

    Returns: 88

  32. {9,7,18,21,12,43,38,25,41,31,30,23,24,46,33,20,11,17,13,1,10,34,6,35,4,5,8,44,32,37,40,39,14,15,42,29,16,3,36,27,2,26,45,47,28,22}

    {19,19,9,9,18,9,21,12,18,7,21,21,9,18,7,12,24,38,24,30,19,33,46,9,33,13,12,17,38,23,7,12,6,38,14,6,6,12,21,25,38,35,32,4,12,40}

    {47,45,44,40,47,43,40,43,41,41,48,47,40,48,47,44,47,40,49,40,44,48,40,49,47,46,40,40,46,44,46,40,40,48,45,42,48,48,48,43,43,43,46,43,41,42,42}

    4

    Returns: 230

  33. {}

    {}

    {43}

    1

    Returns: 43

  34. {4,6,17,8,21,16,18,19,3,7,25,23,2,20,10,24,22,5,11,13,14,26,12,27,9,1}

    {15,15,4,6,4,6,8,21,4,4,6,7,16,21,17,3,8,20,18,2,17,16,14,25,21,2}

    {42,46,46,46,41,41,42,42,41,40,46,41,49,43,45,46,42,44,46,43,45,48,47,44,48,47,49}

    50

    Returns: 1200

  35. {18,38,23,8,26,25,30,19,11,16,1,37,32,9,29,13,6,27,5,7,10,15,20,14,17,39,4,24,2,33,36,21,42,28,34,31,43,41,12,40,35,22}

    {3,3,18,18,18,3,26,25,23,8,25,38,11,19,37,19,18,38,11,6,11,5,8,32,25,8,13,20,7,37,16,38,14,8,10,29,37,20,2,1,2,29}

    {48,48,40,42,48,45,41,44,46,42,49,43,44,47,47,41,45,45,49,48,46,41,45,46,49,45,40,40,42,40,49,41,42,46,47,40,40,48,49,41,43,48,40}

    69

    Returns: 1750

  36. {5,11,8,6,10,9,13,2,1,4,3,7}

    {12,12,12,5,8,6,5,11,12,11,9,12}

    {45,45,42,40,46,46,48,42,43,40,48,41,46}

    15

    Returns: 492

  37. {24,18,2,6,16,15,21,4,23,13,11,20,8,19,3,12,7,9,22,5,14,1,10}

    {17,17,17,17,24,17,18,17,6,16,6,17,23,15,18,8,8,11,21,15,3,20,8}

    {44,48,47,49,48,49,40,40,49,45,45,46,42,49,48,41,41,48,40,40,43,48,49,43}

    6

    Returns: 309

  38. {4,1,3}

    {2,2,2}

    {47,48,46,45}

    3

    Returns: 141

  39. {1,4,7,2,5,6}

    {3,3,1,3,4,4}

    {41,44,43,47,42,46,42}

    1

    Returns: 84

  40. {13,2,25,6,15,29,23,14,8,10,9,1,4,28,26,12,7,3,27,22,30,20,18,11,24,19,32,5,16,17,31}

    {21,21,21,21,21,6,25,2,25,14,25,25,9,9,29,6,14,13,1,25,1,9,10,21,4,13,25,13,12,26,28}

    {48,47,46,40,43,40,44,40,49,43,40,45,41,47,44,44,44,46,47,44,44,44,48,42,46,49,44,45,46,43,44,40}

    8

    Returns: 370

  41. {46,48,29,15,23,17,10,47,35,28,27,41,42,6,24,20,21,39,34,45,19,13,30,3,40,8,32,44,1,33,43,37,11,31,9,36,5,18,25,14,7,4,2,26,12,22,16}

    {38,38,38,46,38,38,29,29,46,29,46,47,47,23,28,46,23,24,27,21,15,28,42,27,47,35,29,45,48,19,28,47,23,28,32,31,19,24,36,41,46,39,36,29,15,47,14}

    {46,45,49,49,44,46,46,45,46,46,40,40,43,42,45,48,44,41,47,44,40,40,45,42,43,42,40,43,44,40,44,49,49,43,45,42,44,40,44,42,45,46,45,42,47,44,41,44}

    83

    Returns: 2031

  42. {9,12,5,16,4,6,14,15,17,10,7,3,1,8,2,13}

    {11,11,9,9,11,5,9,6,14,14,11,12,4,3,1,7}

    {42,40,44,48,47,40,43,45,45,47,40,49,45,46,45,42,40}

    31

    Returns: 748

  43. {7,20,10,21,12,1,22,14,9,4,18,8,26,5,19,15,11,17,23,27,25,2,3,16,13,24}

    {6,6,6,7,7,6,6,1,6,20,6,7,10,7,6,5,18,6,11,17,15,17,20,8,21,9}

    {49,41,40,42,48,47,41,47,42,43,47,48,41,44,42,44,49,43,47,49,44,46,43,49,42,42,45}

    38

    Returns: 999

  44. {28,33,6,37,15,34,18,26,5,20,7,12,11,23,40,22,10,17,25,31,16,14,8,2,24,21,9,19,32,29,36,27,4,1,39,35,30,13,38}

    {3,3,3,3,33,37,37,6,33,18,3,26,34,37,5,37,6,37,40,40,5,34,31,28,3,18,25,37,33,15,23,9,8,17,36,27,29,22,19}

    {49,48,42,49,46,41,42,45,49,44,48,45,48,46,47,40,41,46,49,44,41,45,43,49,40,48,40,42,41,46,43,44,42,42,49,42,42,49,46,48}

    16

    Returns: 635

  45. {4,1,5,3,2}

    {6,6,4,1,5}

    {46,45,49,42,44,44}

    3

    Returns: 176

  46. {11,16,7,24,22,2,4,28,30,13,9,19,6,29,20,8,25,27,1,10,12,31,21,26,5,23,15,3,17,14}

    {18,18,11,11,16,24,18,16,11,11,28,16,2,7,24,28,16,6,8,30,22,22,24,24,30,10,27,6,19,9}

    {49,40,47,41,43,41,47,42,46,44,42,41,48,45,48,45,47,41,47,40,41,43,40,41,47,48,45,49,47,45,44}

    22

    Returns: 767

  47. {22,5,27,2,15,16,20,28,8,6,1,23,11,9,19,21,17,25,14,26,24,3,12,18,10,7,13}

    {4,4,22,4,22,5,4,4,22,2,28,2,20,1,16,27,1,27,28,8,6,17,19,19,5,28,24}

    {49,49,44,45,41,49,49,48,44,42,43,43,41,49,46,44,40,42,42,41,45,40,49,46,47,45,44,47}

    54

    Returns: 1254

  48. {3,1}

    {2,2}

    {42,47,43}

    3

    Returns: 132

  49. {1}

    {2}

    {49,49}

    3

    Returns: 98

  50. {34,9,16,30,23,33,12,21,31,15,13,3,22,1,10,14,27,37,36,5,29,11,20,4,7,24,17,18,28,19,25,6,38,32,26,8,35}

    {2,2,34,34,9,34,9,30,2,21,9,12,16,31,9,23,30,9,9,3,1,30,22,3,13,37,7,33,3,4,24,27,7,13,36,37,1}

    {49,49,49,49,49,49,49,49,49,49,49,49,49,49,49,49,49,49,49,49,49,49,49,49,49,49,49,49,49,49,49,49,49,49,49,49,49,49}

    61

    Returns: 1715

  51. {22,10,11,12,5,1,20,4,14,18,26,6,7,8,3,25,19,2,23,13,16,21,17,9,24}

    {15,15,15,15,10,22,15,10,5,4,11,11,1,22,1,6,8,18,26,22,20,11,10,10,17}

    {49,49,49,49,49,49,49,49,49,49,49,49,49,49,49,49,49,49,49,49,49,49,49,49,49,49}

    40

    Returns: 1176

  52. {12,16,19,21,4,14,11,6,20,7,13,22,17,18,15,3,5,2,9,1,8}

    {10,10,12,10,10,19,10,19,14,19,19,19,19,7,12,12,17,13,13,21,7}

    {49,49,49,49,49,49,49,49,49,49,49,49,49,49,49,49,49,49,49,49,49,49}

    25

    Returns: 784

  53. {13,5,2,8,7,11,17,12,4,16,6,9,10,1,15,14}

    {3,3,3,3,2,5,7,8,2,13,5,13,6,7,13,9}

    {49,49,49,49,49,49,49,49,49,49,49,49,49,49,49,49,49}

    27

    Returns: 833

  54. {3,16,32,41,21,20,22,14,38,19,17,42,2,8,37,1,44,5,31,4,7,12,15,35,13,28,33,10,6,23,25,18,9,11,27,30,34,43,36,39,24,40,26}

    {29,29,3,29,3,32,32,29,21,32,38,3,38,32,21,8,2,32,22,20,21,29,1,1,5,1,13,42,12,20,32,35,15,41,38,4,25,29,28,16,7,44,25}

    {49,49,49,49,49,49,49,49,49,49,49,49,49,49,49,49,49,49,49,49,49,49,49,49,49,49,49,49,49,49,49,49,49,49,49,49,49,49,49,49,49,49,49,49}

    83

    Returns: 2156

  55. {1}

    {2}

    {49,49}

    3

    Returns: 98

  56. {1,4,10,6,3,9,7,11,12,5,2}

    {8,8,1,4,10,6,4,9,9,4,8}

    {49,49,49,49,49,49,49,49,49,49,49,49}

    20

    Returns: 588

  57. {14,28,34,32,20,22,37,16,43,6,5,9,42,2,4,40,41,13,24,18,38,26,39,7,10,25,33,1,36,3,17,35,23,8,11,21,15,29,31,19,12,30}

    {27,27,27,14,28,27,20,28,14,37,43,34,16,32,43,42,14,14,6,22,13,14,2,4,43,4,34,24,26,40,34,1,28,1,4,10,24,25,34,38,3,13}

    {49,49,49,49,49,49,49,49,49,49,49,49,49,49,49,49,49,49,49,49,49,49,49,49,49,49,49,49,49,49,49,49,49,49,49,49,49,49,49,49,49,49,49}

    72

    Returns: 2058

  58. {4,21,13,12,5,11,6,17,19,20,9,14,18,7,8,2,15,16,1,10}

    {3,3,3,3,4,12,5,13,5,17,6,17,17,11,20,11,19,12,15,15}

    {49,49,49,49,49,49,49,49,49,49,49,49,49,49,49,49,49,49,49,49,49}

    41

    Returns: 1029

  59. {11,36,24,13,30,27,35,3,12,15,39,16,18,34,7,14,22,1,2,23,6,38,5,28,32,10,21,17,19,40,9,4,29,20,33,8,26,37,25}

    {31,31,11,11,36,36,13,13,13,24,30,31,39,16,16,12,24,39,18,11,35,14,1,38,24,38,24,3,22,31,5,6,18,17,19,38,30,36,5}

    {3,4,3,4,2,4,3,3,3,3,4,2,2,3,4,1,1,4,2,4,2,4,3,4,3,2,3,4,4,2,2,3,4,3,1,3,1,3,3,3}

    32

    Returns: 70

  60. {25,13,34,41,14,20,35,39,38,28,17,12,18,29,32,15,21,1,10,8,37,36,11,7,5,2,31,22,16,4,19,27,23,33,30,9,3,24,6,40}

    {26,26,25,13,25,41,26,34,25,34,20,39,25,26,39,13,29,41,18,18,10,10,39,21,17,12,18,28,29,1,11,29,41,32,16,18,29,14,28,33}

    {2,4,2,4,3,4,3,3,1,1,2,3,3,4,4,2,1,2,1,1,2,2,3,1,2,3,3,4,4,2,3,2,2,1,4,3,2,1,1,4,4}

    20

    Returns: 47

  61. {11,27,12,16,3,23,26,25,21,39,30,9,5,29,28,7,4,34,15,38,8,18,35,22,6,32,2,1,20,37,19,36,42,13,10,40,41,17,33,14,31}

    {24,24,11,11,24,16,12,24,3,25,27,23,30,23,27,23,28,26,29,16,25,34,16,12,16,12,3,27,9,32,22,39,27,9,20,18,15,22,29,42,26}

    {1,1,3,3,1,1,2,4,3,1,4,3,4,3,2,4,2,4,4,1,2,3,2,4,4,2,3,3,2,1,3,1,3,2,4,2,2,4,1,2,1,2}

    31

    Returns: 65

  62. {7,35,10,12,34,25,18,40,17,22,33,41,29,24,9,6,21,16,11,27,38,2,4,28,42,13,3,1,36,26,19,31,8,37,15,39,23,32,5,20,43,14}

    {30,30,7,7,35,35,34,35,18,10,12,35,33,25,41,29,25,22,22,30,21,6,16,2,10,17,10,18,12,1,6,41,33,40,38,26,12,13,42,23,13,3}

    {1,4,1,1,2,4,2,4,4,3,1,1,1,2,4,4,3,4,1,3,3,1,1,4,1,3,2,2,2,2,4,2,1,3,1,2,4,1,1,4,1,3,2}

    5

    Returns: 17

  63. {35,37,19,39,20,15,44,25,2,29,14,38,16,3,5,41,21,36,9,34,11,31,13,7,40,22,30,24,42,12,43,32,28,26,10,1,8,27,23,33,6,18,17}

    {4,4,4,35,37,39,4,39,15,15,39,29,19,15,20,35,5,25,16,16,3,44,38,11,3,44,3,21,30,19,35,20,15,9,32,7,13,43,28,15,30,26,11}

    {3,4,4,1,2,2,4,1,2,3,4,4,2,4,2,3,1,4,2,2,3,2,4,4,1,1,2,2,4,2,2,2,2,2,2,3,3,3,3,1,4,2,1,1}

    39

    Returns: 78

  64. {34,33,37,36,30,10,20,41,17,21,9,6,26,38,22,32,11,1,3,7,2,13,25,5,18,4,35,42,43,39,19,14,44,40,28,23,12,16,27,24,15,31,8,29}

    {45,45,34,33,33,45,30,37,34,41,37,10,30,21,9,33,10,32,10,26,17,30,37,3,13,45,1,5,30,38,43,42,33,6,39,21,40,2,26,38,10,45,38,12}

    {2,2,1,4,4,2,3,1,3,4,4,2,2,1,3,4,3,3,1,2,2,4,2,4,3,3,1,3,4,1,3,3,4,1,2,3,3,3,1,1,2,2,3,2,4}

    48

    Returns: 87

  65. {3,34,32,9,24,2,16,29,38,41,6,10,21,4,13,1,12,15,39,42,14,11,36,33,18,44,37,19,43,46,31,5,26,17,8,25,23,22,35,27,7,20,45,40,30}

    {28,28,3,34,32,28,28,9,2,28,28,24,6,32,10,34,16,3,4,24,28,9,38,34,32,11,33,32,42,37,16,46,32,42,39,19,12,5,37,22,1,14,1,38,29}

    {2,3,1,2,1,3,2,3,1,3,2,3,1,1,4,3,4,4,2,3,2,4,2,4,3,1,3,2,4,4,4,3,1,2,2,1,4,1,3,1,4,4,2,3,3,1}

    13

    Returns: 34

  66. {29,16,25,43,31,42,28,27,39,47,35,17,38,5,33,14,34,4,37,2,32,10,12,45,20,3,44,46,19,8,36,18,15,9,7,11,41,21,26,6,24,30,22,1,13,23}

    {40,40,40,40,25,40,31,25,16,43,28,42,16,28,17,16,31,16,40,42,35,34,16,34,34,2,31,16,28,28,12,2,4,44,25,38,15,27,36,9,15,42,27,7,36,30}

    {1,1,3,2,1,3,2,3,4,3,1,4,4,4,1,2,3,4,1,3,4,1,3,1,2,1,3,4,3,3,2,3,1,1,2,2,4,1,3,1,2,3,1,4,4,3,4}

    8

    Returns: 22

  67. {34,42,43,39,4,5,29,47,40,18,21,27,8,10,2,9,30,46,24,22,15,6,7,44,25,14,3,26,23,37,19,17,41,38,35,20,11,45,36,13,12,32,31,33,1,28,16}

    {48,48,48,42,42,48,39,43,42,48,40,18,21,42,4,27,2,21,2,4,24,47,46,4,29,27,22,8,14,14,48,4,39,6,27,17,29,29,5,8,7,13,5,8,5,11,41}

    {4,1,1,2,4,2,3,4,1,2,3,4,3,4,3,2,3,4,3,2,3,2,3,4,2,1,2,4,3,1,4,1,4,4,3,3,4,1,4,2,2,2,1,3,3,2,3,4}

    17

    Returns: 46

  68. {18,42,7,28,33,38,20,49,12,4,25,46,27,48,29,32,35,24,6,9,2,15,10,37,47,5,30,14,26,41,8,3,17,16,1,22,36,21,31,23,13,34,19,43,44,40,11,45}

    {39,39,18,42,39,18,42,7,38,42,20,12,20,46,12,7,48,4,29,35,27,18,24,39,10,46,28,4,47,30,10,7,26,46,39,20,49,9,8,7,39,38,18,10,34,32,24,25}

    {2,1,3,2,1,1,2,2,3,1,4,4,3,1,3,4,3,3,4,2,4,1,1,4,1,1,2,2,1,2,1,3,2,3,4,1,3,4,2,3,2,1,2,3,4,2,3,2,4}

    26

    Returns: 56

  69. {9,17,1,13,45,41,20,3,25,18,47,33,34,14,39,38,26,28,37,24,46,30,49,42,22,6,11,2,16,8,40,29,19,43,21,5,44,4,10,31,50,32,27,15,36,48,35,12,23}

    {7,7,7,9,1,17,7,17,41,1,45,41,17,18,41,47,20,13,26,7,13,7,14,45,20,24,45,45,28,3,28,7,47,38,11,45,16,19,33,8,18,33,21,8,26,25,3,25,27}

    {3,2,3,3,4,4,3,4,3,3,4,3,2,2,4,4,3,2,3,4,3,1,1,4,2,1,2,3,4,3,3,1,3,3,3,4,3,1,4,4,1,1,1,4,2,4,1,1,4,2}

    8

    Returns: 26

  70. {13,17,2,34,21,10,23,24,3,26,25,12,32,4,39,40,36,7,37,1,33,5,22,28,30,35,6,18,20,16,11,27,38,31,14,19,9,15,8}

    {29,29,29,13,2,17,13,34,21,23,17,13,24,23,29,23,12,24,34,26,7,2,7,1,3,26,33,40,37,29,4,18,34,13,28,10,12,6,16}

    {2,1,3,4,4,1,2,4,1,4,1,3,3,1,1,1,4,1,3,2,2,3,3,2,4,1,1,3,1,1,2,4,3,3,2,2,2,3,2,3}

    81

    Returns: 93

  71. {39,14,24,27,10,26,34,35,40,8,31,37,17,1,21,28,7,18,5,30,36,25,9,6,20,29,11,4,12,41,15,2,32,13,19,38,16,3,22,33}

    {23,23,39,14,24,24,10,14,14,23,39,10,23,34,23,17,26,24,39,39,5,17,30,24,8,10,5,18,5,36,25,36,31,12,12,4,5,19,16,20}

    {1,1,4,3,2,4,4,4,1,2,2,2,3,1,1,3,1,1,1,1,2,3,1,3,1,4,1,4,3,4,2,3,4,2,2,1,2,1,3,2,1}

    64

    Returns: 87

  72. {5,30,25,27,26,20,40,17,4,9,29,1,34,16,39,13,11,6,42,31,18,22,23,28,37,8,35,19,41,32,7,38,12,15,24,2,3,36,21,10,33}

    {14,14,5,5,14,14,30,20,30,26,40,27,40,29,9,5,16,1,27,13,42,29,31,9,42,31,1,8,40,4,34,25,41,20,22,7,30,41,29,37,17}

    {1,3,4,2,3,3,3,2,1,4,4,1,2,2,3,4,4,2,1,4,2,3,3,1,2,1,3,2,1,1,3,1,1,2,2,1,2,4,2,3,2,1}

    82

    Returns: 96

  73. {3,13,39,1,18,25,11,42,28,7,43,19,15,33,35,20,4,5,30,8,29,34,41,40,12,16,32,10,36,23,21,2,26,9,38,24,37,22,14,31,17,6}

    {27,27,3,3,13,1,3,27,13,3,27,39,28,11,42,11,35,25,25,33,30,35,7,4,35,19,39,43,42,16,1,3,35,23,2,28,18,18,41,16,28,28}

    {4,4,3,1,1,3,2,2,2,2,1,2,4,3,1,2,1,4,1,3,3,4,3,1,2,4,4,2,2,4,2,2,1,2,3,1,3,1,3,3,3,3,3}

    92

    Returns: 105

  74. {6,1,8,22,4,40,23,28,12,9,21,14,17,34,3,19,33,11,44,42,2,32,38,30,29,37,18,27,31,36,13,16,7,26,35,10,5,43,41,25,39,20,24}

    {15,15,6,6,1,1,15,4,22,1,1,12,22,23,6,22,14,1,4,14,9,11,22,8,4,2,2,4,30,34,34,23,6,22,8,3,18,11,16,33,26,17,38}

    {4,4,2,1,3,2,4,4,1,4,4,4,3,4,2,1,4,2,2,3,1,1,4,1,1,2,4,4,3,1,4,4,4,4,1,4,1,2,3,2,2,3,3,2}

    77

    Returns: 118

  75. {29,17,11,1,43,33,12,41,22,34,20,5,37,35,42,26,4,8,40,9,28,6,2,3,23,16,45,32,27,14,25,39,15,38,7,44,13,19,24,31,21,10,36,18}

    {30,30,30,30,11,17,11,33,12,43,12,33,20,29,29,1,35,30,5,33,30,42,26,34,2,12,8,5,9,37,42,6,45,9,43,28,11,15,9,7,8,11,2,24}

    {1,3,2,3,1,4,3,1,2,4,4,1,2,1,1,3,1,3,2,2,1,1,4,1,1,1,1,4,4,3,1,2,1,4,3,3,2,1,1,1,1,3,3,2,1}

    88

    Returns: 94

  76. {33,24,16,27,40,9,12,21,35,31,44,26,36,34,23,25,11,28,46,4,18,8,13,39,19,43,10,30,22,1,42,7,20,37,45,5,2,3,29,14,41,6,17,15,38}

    {32,32,32,32,32,32,33,9,12,21,35,32,32,16,40,35,24,32,27,23,35,11,21,4,25,26,40,18,27,31,23,8,18,46,27,10,7,11,5,16,28,13,7,6,27}

    {2,4,1,2,4,4,1,3,2,1,1,2,3,1,2,2,4,2,2,1,2,2,3,4,1,3,3,1,2,2,3,3,2,3,4,4,2,1,4,3,3,3,2,4,2,4}

    54

    Returns: 91

  77. {12,47,19,1,11,34,16,6,43,20,26,37,32,45,35,27,24,42,39,44,10,25,15,31,30,40,33,41,13,2,3,17,21,29,8,7,14,36,22,23,46,18,5,4,38,9}

    {28,28,28,12,19,19,12,28,16,28,34,43,1,1,11,1,37,19,27,27,26,26,19,26,25,32,26,40,10,32,31,12,31,10,32,1,13,31,28,26,14,13,3,7,3,18}

    {2,2,4,1,2,3,4,3,4,2,1,2,1,2,1,4,4,4,2,2,3,3,3,1,2,4,4,3,1,4,1,2,2,2,1,2,2,1,4,2,4,3,3,3,3,4,2}

    88

    Returns: 119

  78. {5,19,14,33,41,30,12,17,21,42,25,20,16,34,27,45,32,24,3,31,37,11,1,26,35,28,39,4,43,8,9,40,22,6,46,44,2,47,7,15,36,23,48,38,29,10,13}

    {18,18,5,19,14,14,33,14,30,33,19,21,5,12,16,25,18,34,32,30,30,16,42,18,37,41,19,35,28,21,39,39,12,42,30,31,19,26,17,35,20,4,26,36,47,27,28}

    {2,2,1,3,3,2,4,1,2,3,2,4,2,4,1,2,2,2,3,4,4,1,1,1,2,2,1,1,3,1,3,2,4,4,4,2,3,3,4,1,4,2,4,2,3,3,3,2}

    84

    Returns: 119

  79. {6,22,38,37,1,29,34,18,30,20,47,28,45,43,26,10,24,36,3,9,16,33,17,41,39,25,12,44,49,46,48,27,15,19,21,13,11,31,5,8,23,4,40,35,32,2,7,42}

    {14,14,6,14,6,22,6,37,22,38,14,14,30,14,29,18,20,18,1,18,24,29,26,45,3,16,20,43,6,47,10,18,48,16,33,1,12,28,30,10,13,9,37,26,21,41,13,33}

    {3,3,2,4,4,2,3,1,2,4,2,4,4,4,3,2,1,4,4,2,1,3,1,4,3,3,3,2,2,2,1,3,2,4,3,1,3,3,2,2,1,2,4,1,3,1,3,4,2}

    81

    Returns: 123

  80. {11,43,10,18,24,46,9,15,50,49,40,30,1,23,48,37,14,8,31,38,12,32,17,13,22,34,39,3,45,5,36,16,29,21,33,35,2,19,25,7,28,20,26,4,44,41,6,47,27}

    {42,42,11,42,42,11,11,10,24,42,43,49,40,9,11,11,10,40,42,37,37,23,12,1,32,11,10,31,8,39,50,43,40,16,45,29,48,13,9,1,3,10,11,18,17,49,36,45,4}

    {4,4,3,4,3,4,4,4,1,1,1,4,1,4,2,4,2,1,2,1,2,3,2,4,3,3,3,1,4,2,2,4,1,1,1,2,3,1,1,4,2,2,4,1,2,4,1,4,2,1}

    84

    Returns: 121

  81. {35,36,7,31,24,1,27,16,25,20,10,3,29,28,18,39,23,26,8,2,38,22,17,19,32,34,33,40,4,11,21,30,37,6,5,14,12,13,15}

    {9,9,9,36,9,35,35,35,7,1,16,36,9,20,35,36,9,39,20,1,36,7,3,39,24,7,25,26,3,1,39,19,2,40,29,16,33,17,2}

    {68,54,98,77,97,57,71,90,70,99,95,95,53,87,71,94,69,71,90,86,55,96,66,78,91,67,96,96,88,55,66,69,73,74,92,53,51,68,72,79}

    45

    Returns: 2255

  82. {21,8,32,11,18,14,35,6,38,15,28,33,30,9,24,19,40,13,37,36,7,27,41,34,4,3,31,2,5,17,25,20,39,16,26,29,1,23,10,22}

    {12,12,21,12,21,32,32,12,32,8,35,15,32,38,38,6,21,12,11,19,32,6,28,38,14,11,40,41,33,33,38,28,3,41,25,9,21,21,13,40}

    {92,96,58,75,80,50,74,85,81,83,50,62,64,99,60,71,80,68,98,66,69,96,57,80,56,78,58,91,75,50,86,91,79,99,92,60,73,57,84,82,54}

    49

    Returns: 2230

  83. {32,30,14,2,27,34,21,28,7,41,35,15,20,36,17,22,23,16,40,25,1,9,6,33,38,39,19,31,18,13,12,26,8,3,24,10,29,5,11,42,37}

    {4,4,32,32,32,14,2,27,30,14,32,34,21,7,7,14,15,30,20,21,17,27,35,35,34,40,27,16,41,25,34,1,34,15,2,27,4,41,16,21,39}

    {87,65,62,75,71,91,57,98,50,73,83,60,77,73,53,54,89,96,68,53,68,56,57,52,99,73,81,81,50,87,77,73,54,71,64,90,70,99,51,90,58,53}

    48

    Returns: 2304

  84. {20,9,30,35,25,41,7,6,13,1,26,42,23,29,4,12,22,24,17,43,33,16,28,15,8,31,3,27,34,2,38,40,11,14,5,21,37,18,36,10,32,39}

    {19,19,20,19,9,35,19,41,41,7,7,35,1,41,30,29,42,9,42,19,13,42,35,16,16,16,26,43,22,13,41,2,17,40,31,25,17,13,11,24,16,19}

    {71,97,86,74,73,71,74,74,65,96,60,63,67,94,74,50,62,82,55,76,72,73,61,62,73,57,70,84,96,60,64,86,61,81,65,98,95,71,54,66,54,78,67}

    46

    Returns: 2110

  85. {15,39,19,3,35,2,12,24,21,8,17,5,33,36,37,34,4,20,26,27,13,6,7,41,38,44,30,31,10,28,1,22,23,43,29,18,32,16,11,9,14,42,40}

    {25,25,15,39,15,39,3,3,15,39,15,35,12,2,3,17,2,25,12,21,26,21,35,5,6,25,21,35,13,38,25,13,20,39,7,21,38,8,5,39,31,35,21}

    {53,81,67,87,67,80,75,70,79,82,90,85,54,64,94,73,63,85,62,98,54,57,67,76,81,83,61,83,99,54,96,54,69,71,68,68,66,74,77,76,90,85,68,70}

    48

    Returns: 2226

  86. {26,35,32,30,28,27,24,43,17,38,13,22,40,6,23,15,5,25,44,7,19,3,11,39,41,1,29,2,33,34,12,14,21,4,8,36,18,42,10,45,20,31,9,16}

    {37,37,37,26,37,35,32,30,35,37,24,26,17,30,24,37,24,28,13,28,35,7,19,27,5,43,27,5,37,37,7,26,2,37,1,4,43,22,41,27,35,44,8,7}

    {64,86,60,95,87,85,72,75,84,83,70,88,80,83,99,91,86,73,65,86,74,77,57,59,69,60,74,56,92,77,97,75,73,92,75,66,74,56,70,57,66,71,75,88,60}

    47

    Returns: 2332

  87. {37,23,27,39,15,5,16,28,32,36,22,20,6,34,40,38,25,8,31,10,9,4,30,21,45,41,13,35,42,43,17,26,33,19,18,7,24,1,14,46,12,44,2,3,11}

    {29,29,37,37,27,29,37,39,5,5,5,36,29,39,23,39,39,37,20,39,22,39,27,20,32,5,40,29,16,32,15,40,34,16,9,40,34,10,10,41,36,35,42,43,35}

    {73,56,96,81,85,80,81,52,55,50,64,77,54,51,72,67,72,62,54,99,76,90,79,91,62,97,67,69,80,58,54,57,51,51,97,85,65,64,61,95,71,69,80,62,53,70}

    47

    Returns: 2178

  88. {7,22,2,34,46,24,33,13,40,29,19,35,43,6,3,9,11,27,32,36,37,26,14,21,39,38,1,41,31,20,44,47,16,18,4,42,8,15,23,30,28,10,25,12,45,5}

    {17,17,7,17,22,17,34,34,33,24,2,29,17,2,17,46,35,3,29,40,7,7,7,22,19,13,13,17,33,2,34,39,2,38,36,39,34,1,19,38,34,29,35,14,39,36}

    {58,67,69,75,94,89,61,85,80,51,85,77,91,64,58,58,66,56,55,79,50,89,93,83,81,81,60,95,67,78,86,60,89,55,55,89,53,61,83,76,86,69,50,82,89,73,57}

    49

    Returns: 2290

  89. {19,48,21,34,43,40,6,13,15,24,7,10,32,38,37,29,33,22,36,46,42,39,8,41,45,30,44,3,28,5,31,23,35,17,2,4,18,47,26,14,25,16,20,27,9,12,1}

    {11,11,11,19,48,19,48,48,48,34,43,21,43,48,21,43,10,19,43,6,7,21,33,13,48,39,21,8,32,32,33,29,19,15,33,35,5,3,48,38,43,45,25,41,10,31,2}

    {58,58,93,90,92,92,95,72,72,86,63,62,81,79,69,53,84,64,80,88,94,94,74,94,69,57,72,76,50,55,59,96,89,62,53,81,57,53,84,56,92,52,67,86,91,91,62,51}

    45

    Returns: 2275

  90. {24,20,39,22,37,23,21,30,32,16,28,26,27,13,14,44,43,40,4,41,33,5,11,6,36,46,9,10,34,1,17,42,7,25,38,3,47,31,45,12,29,2,35,49,15,19,18,8}

    {48,48,24,48,20,39,20,23,22,30,39,24,32,32,48,13,27,22,27,40,48,27,43,32,44,16,33,37,48,32,39,6,11,33,21,5,25,48,1,22,1,4,13,38,37,13,46,46}

    {51,70,99,62,85,69,66,54,63,58,66,78,64,58,63,76,90,87,92,81,71,80,73,67,84,72,63,62,70,94,67,73,58,94,61,63,53,90,83,57,95,50,63,97,58,96,90,51,85}

    45

    Returns: 2226

  91. {36,19,3,1,16,21,39,25,45,31,6,42,43,27,33,4,28,10,50,24,2,30,8,18,12,41,32,48,40,49,22,9,11,14,46,35,44,37,34,29,38,17,5,20,47,13,23,7,26}

    {15,15,15,15,15,15,1,19,36,16,3,45,3,39,36,31,31,39,3,27,28,19,3,31,10,19,50,16,10,16,40,42,33,12,27,19,16,41,22,36,44,42,41,9,28,35,35,50,38}

    {56,58,50,64,79,52,54,92,89,51,99,85,77,95,89,76,98,52,73,90,61,69,83,66,85,94,76,98,65,90,51,56,53,83,67,83,59,85,70,59,50,58,92,66,78,76,73,76,71,86}

    45

    Returns: 2059

  92. {1, 2, 5, 3 }

    {4, 4, 1, 4 }

    {6, 1, 6, 4, 4 }

    3

    Returns: 16

  93. {25, 22, 35, 42, 40, 9, 32, 12, 37, 44, 23, 1, 24, 28, 20, 4, 26, 33, 11, 48, 34, 6, 16, 50, 46, 17, 8, 43, 18, 30, 31, 36, 39, 13, 10, 45, 3, 47, 15, 2, 29, 19, 7, 14, 41, 49, 38, 27, 21 }

    {5, 5, 25, 25, 25, 42, 25, 40, 5, 35, 25, 32, 42, 9, 32, 23, 40, 25, 20, 33, 26, 37, 12, 1, 48, 24, 22, 25, 11, 24, 48, 34, 18, 9, 50, 42, 16, 40, 1, 10, 47, 22, 48, 44, 48, 1, 4, 46, 47 }

    {6, 9, 4, 9, 5, 8, 6, 4, 4, 1, 4, 8, 3, 4, 5, 8, 5, 6, 4, 9, 7, 9, 7, 9, 5, 2, 7, 2, 7, 7, 5, 9, 5, 8, 5, 7, 1, 9, 3, 9, 3, 6, 4, 5, 5, 4, 7, 9, 2, 2 }

    48

    Returns: 194

  94. {1, 2 }

    {2, 3 }

    {10, 20, 30 }

    1

    Returns: 30

  95. {1, 1 }

    {2, 3 }

    {1, 6, 8 }

    1

    Returns: 9

  96. {1, 1, 2, 2, 5, 5 }

    {3, 2, 4, 5, 6, 7 }

    {1, 1, 5, 10, 5, 6, 10 }

    5

    Returns: 27

  97. {1, 2 }

    {2, 3 }

    {5, 10, 15 }

    2

    Returns: 30


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: