Statistics

Problem Statement for "HeroicScheduled2"

Problem Statement

Hero has a list of tasks he can do. Each task will take him exactly one day, and on each day he can only work on one of the tasks. The days on which Hero can do these tasks are numbered starting from 0. Each task i has two parameters: start[i] is the first day on which Hero can do this task, and finish[i] is the last such day. Hero can choose which tasks he will perform and in which order. Note that he is not required to maximize the number of tasks he'll complete. In particular, he can always choose not to do any of the tasks. You are given the int[]s start and finish. Calculate and return the number of different subsets of tasks Hero may complete.

Definition

Class:
HeroicScheduled2
Method:
getcount
Parameters:
int[], int[]
Returns:
long
Method signature:
long getcount(int[] start, int[] finish)
(be sure your method is public)

Constraints

  • start and finish will contain the same number of elements.
  • start will contain between 1 and 50 elements, inclusive.
  • Each element in finish will be between 0 and 15, inclusive.
  • For each i start[i] will be between 0 and finish[i], inclusive.

Examples

  1. {0,0,0}

    {0,0,0}

    Returns: 4

    Hero will either do nothing or he will complete one of the three tasks.

  2. {14,14,14}

    {15,15,15}

    Returns: 7

    This time Hero has two days, and on each of them he can complete one of the three given tasks. Thus, he can complete any set of zero, one, or two tasks, but not all three of them.

  3. {0,0,1,2,3,4}

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

    Returns: 63

  4. {0,1,2,2}

    {3,2,2,2}

    Returns: 12

  5. {0,0,0,2,2,2,3,3,3}

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

    Returns: 427

  6. {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}

    {14,14,14,14,14,14,14,14,14,14,14,14,14, 14,14,14,14,14,14,14,14,14,14,14,14,14,14, 14,14,14,14,14,14,14,14,14,14,14,14,14,14, 14,14,14,14,14,14,14,14}

    Returns: 2645651289030

  7. {1,1,0,2,0,0,0,0,1,1,2,0,1,2,0,0,2,0,2,1,0,0,0,0,0,0,1,0,0,0,2,1,0,1,0,1,0,1,0,0,0,0}

    {2,2,1,2,0,2,1,2,1,2,2,1,1,2,2,0,2,0,2,1,0,2,1,2,1,2,1,1,2,0,2,2,0,1,1,2,2,2,1,2,1,1}

    Returns: 9564

  8. {0,2,1,1,2,2,0,1,0,0,0,2,1,1,0,1,0,0,2,1,0,0,1,2,1,0,1,2,0,0,0,0,1,0,0,1,1,2,0,0,1}

    {0,2,2,2,2,2,2,2,2,2,1,2,1,2,2,1,1,0,2,1,1,1,2,2,1,2,1,2,1,2,1,1,1,2,1,2,1,2,2,2,1}

    Returns: 8358

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

    {10,11,10,13,10,12,12,12,11,12,13,12,4,6,11,12,7}

    Returns: 130094

  10. {3,2,1,0,3,2,1,3,0,0,1,1,2,1,0}

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

    Returns: 4095

  11. {0,5,0,9,0,4,2,4,6,5,0,5,6,5,2,0,2,2,13,3,2}

    {8,7,4,13,7,10,14,10,7,11,3,12,8,6,5,1,6,10,14,5,14}

    Returns: 2026374

  12. {2,4,0,4,3,3,2,5,0}

    {4,5,9,5,4,5,8,9,7}

    Returns: 480

  13. {0,3,3,8,7,1,1,2,7,3,3,1,1,5,0,8,1,5,0,0,4,7,4,2,2,0,7,4,4,1,4,2,6,5,5,6,3}

    {8,5,6,11,10,6,10,2,11,7,8,7,6,6,8,11,5,7,1,4,11,10,8,8,6,11,9,6,11,7,10,5,10,7,11,7,10}

    Returns: 2651951542

  14. {7,6}

    {13,11}

    Returns: 4

  15. {11,1,11,7,3,0,2,8,10,11,8,8,8}

    {11,12,13,8,4,2,6,9,13,13,13,9,11}

    Returns: 7904

  16. {7,0,10}

    {8,11,13}

    Returns: 8

  17. {0,3,2,3,0,2,1,3,1,1,2,0,4,3,1,2,1,0,2,3,3,2,1,0,0,2,0,0,1,0,3,1,4,1,1,0,1,0,0,0,2,0,0,1,1,1,0}

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

    Returns: 1245670

  18. {2,1,6,0,3,6}

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

    Returns: 48

  19. {11,9,3,4,3,1,12,2,6,0,3,3,3,0,5,0,0,10,1,0,0}

    {13,14,6,14,14,14,13,11,9,10,9,5,12,2,7,10,1,11,5,2,7}

    Returns: 2068687

  20. {2,1}

    {3,4}

    Returns: 4

  21. {1,2,1,0,0,1,1,0,0,0,0,0,0,0,1,0,1,1,1,1,1,1,0,2,1,0,0,0,1,0,0,1,0,1,0,0,0,0,1,0,1,0,1,0,1,1,1}

    {2,2,1,1,1,1,2,2,2,2,2,2,2,0,1,2,1,2,2,1,2,2,2,2,2,1,2,0,2,0,2,2,2,1,1,0,2,1,2,1,1,0,2,1,1,2,2}

    Returns: 13820

  22. {3,4,7,3,8,5,6,8,2,5,1,2,4,8,4,0,1,6,12,10,1,4,1,10,8,5,5,5,1,6,4,2,5,2,13,1,0}

    {13,11,10,9,12,10,12,14,9,10,10,5,11,11,4,8,7,8,14,13,12,8,8,14,12,7,14,8,10,13,13,6,13,6,14,8,13}

    Returns: 17678738457

  23. {0,0,0,0,0}

    {1,0,0,1,1}

    Returns: 15

  24. {5,5,5,0,8}

    {10,11,9,8,9}

    Returns: 32

  25. {5,4,7,0,8,2,10}

    {11,6,9,5,13,2,14}

    Returns: 128

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

    {13,4,8,12,10,11,5,11,9,10,11,9,11,9,11,10,13,14,7,12}

    Returns: 1031772

  27. {6,1,0,1,6,6,3,0,3,11,11,8,4,2,2,1,1,9,7,0,1,0,9,7,6,8,1,12,6,10,1,12,5,0,1}

    {12,6,8,10,12,12,10,3,14,14,14,14,8,8,13,14,7,12,10,8,4,9,10,7,14,12,4,14,6,12,4,12,14,2,11}

    Returns: 8121575290

  28. {3,6,4,10,5,4,0,2,1,6,11,8,0,5,2,5,5,6,0,4,3,2,5,4,0,1,0,3,6,0,10,2,6,6,6,10,8}

    {7,13,8,10,14,4,14,10,13,7,11,10,7,13,6,8,14,8,4,14,14,2,12,5,4,1,3,5,14,1,14,4,14,9,6,14,9}

    Returns: 18660269132

  29. {3,2,0,3,4,4,0,0,8,3,2,3,6,0,7,3,7,0}

    {3,9,5,7,14,12,2,6,13,6,13,5,7,5,13,11,12,10}

    Returns: 261398

  30. {3,0,3,4,7,6,1,9,4,11,8,3,1,13,0,7,7,8,0,6,6}

    {6,4,14,13,8,13,14,11,8,14,13,5,7,14,7,8,9,9,2,13,11}

    Returns: 1939884

  31. {7,8,7,3,4,7,1,8,7,0,5,3,0,1,0,4,8,0,4,5,11,9,8,7,0,3,4,12,3,8,8,6,3,2,13,0,0,1,2,2,5,12,1}

    {10,9,12,14,11,7,5,10,8,8,9,6,9,4,12,9,14,1,4,13,13,14,9,8,2,11,11,14,14,9,14,11,8,12,14,14,6,10,14,3,12,14,10}

    Returns: 238229760042

  32. {4,4,3,7,4,5,12,1,1,7,9,1,6,3,4,8,2,4,2,0,1,0}

    {11,14,14,12,7,5,13,2,3,10,13,8,9,13,14,13,8,11,11,1,3,0}

    Returns: 3955212

  33. {0,2,2,5,4,1,2,3,1,4,0,0,3,1,5,1,1,0,1,5,1,2,0,0,1,0,1,3,3,3,5,1,0,3,1,0,1,1,0}

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

    Returns: 68851236

  34. {2,8,3,10,2,10,1,2,9,9,1,6,0,2,3,4,6,0,0}

    {8,9,7,10,2,12,5,3,9,11,2,11,0,4,4,6,10,1,12}

    Returns: 447993

  35. {0,2,8}

    {14,6,13}

    Returns: 8

  36. {2,1,1,0,1,4,0,4}

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

    Returns: 256

  37. {1,4,3,4,1,0,1,0,7,4,0,2,0,2,5,0,4,4,3,5,1,0,2,3,4,5,0,0,5,2,8,2,4,1,0,5,1,1,2,1,5,2,4,1,6,4,3,8,1,2}

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

    Returns: 6309229516

  38. {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}

    {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}

    Returns: 17

  39. {1,1,0,1,0,6,12,8,1,11,1,3,5,2,0,7,5,4,6,10,0,1,1,8,7,1,4,1}

    {10,6,11,4,8,13,13,11,8,14,10,11,8,5,7,12,9,9,8,14,12,13,12,11,14,10,11,3}

    Returns: 185185129

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

    {4,8,9,7,10,12,10,10,12,3,11,1,7,11,4,8,11,9}

    Returns: 254484

  41. {3,0,0,0,5,5,2,4,1,1,2,1,10,4,8,1,5,0,4,1,4,5,1,8,1,3,1,1,1,4,4,4,13,3,11,8,3,10,4,13,14,5}

    {8,12,6,0,14,12,6,10,4,14,12,12,12,5,14,12,8,13,7,4,14,12,5,11,9,5,14,14,4,6,5,9,14,11,13,14,12,12,11,14,14,10}

    Returns: 168631632336

  42. {1,0,5,0,0,5,0,0,0,2,0,7,1,5,4,2,1,2,6,0,0,4,1,0,4,1,0,1,4,1,5,4,0,5,6,5,1,2,2,1,0,0,0,0,2,5,0,0}

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

    Returns: 303379146

  43. {7,5,2,5,0,0,7,1,3,5,5,5,4,5,0,1,2,0,3,0,5,0,8,2,1,1,7,5,0,0,2,8,2,3,5,4,2,1,4,5,2,3,1,2,0,7,0,0,3}

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

    Returns: 1692239394

  44. {6,3,6,0,1,4,3,9,5,11,11,5,1,3,8,2,3,2,4,6,8,6,2,0,7,4,8,0,6,7,4,3,0,12,0,11,2,2,4,1,0,7,2,3,4,4,9,8,4}

    {13,11,11,12,9,12,8,13,7,12,13,7,9,5,10,7,6,7,11,6,12,10,8,13,9,6,10,10,8,8,11,6,8,12,7,12,4,3,7,5,12,12,10,8,7,10,10,13,6}

    Returns: 674956109342

  45. {5,6,2,1,2,9,4,12,0,2,0,0,3,1,10,6,3,1,5,2}

    {8,9,5,4,6,12,8,14,14,14,1,1,10,6,13,10,6,4,9,14}

    Returns: 1034438

  46. {11,1,4,2,0,1,3,4,8,9,4}

    {13,2,10,6,13,6,11,12,10,11,13}

    Returns: 2048

  47. {0,0,1,2,7}

    {13,11,5,10,8}

    Returns: 32

  48. {0,0,8,4,9,0,11,0,6,4,4,4,7,5,13,9,10,1}

    {4,6,14,8,11,1,11,9,14,5,13,6,10,5,13,10,13,3}

    Returns: 261563

  49. {4,4,2,9,4,3,0,5,5,2,8,7,0,1,2,8,6,3,5,10,0,9,4,10,2,4,4,11,7,6,2,5,5,1,6,2,3}

    {11,10,7,14,6,9,2,13,8,4,9,9,0,3,9,12,11,9,6,13,1,11,10,14,5,7,12,14,7,7,6,8,13,2,8,3,11}

    Returns: 12380128954

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

    {0,10,7,6,4,10,6,9,6,6,2,10,8,7,9,8,6,10,7,8,9,7,4,9,10,6,8,9,9,2,6,7,9,8,9,10,10,6,7,9,4,5,4,8,6,8,4,7,5,2}

    Returns: 31490969154

  51. {3,1,7,5,2,4,7,2,0,0,0,3,3,5,2,9,1,4,2,4,0,1,0,1,6,5,2,0,8,2,5,0,11,6,4,2,5}

    {7,8,13,11,3,5,11,10,11,1,8,10,10,11,11,12,12,10,13,6,10,9,7,5,7,8,10,4,13,12,6,6,11,8,5,6,6}

    Returns: 9854560953

  52. {1,3,3,1,7,6,6,12,5,9,4,0,0,1,4,4,7,4,4,5,6,7,7,6,4,5,1,6,1,2,8,2,3,7,0,3,3,0,8,3,12,5,6,4,5,10,1,3,5,0}

    {7,14,8,9,12,8,6,12,12,12,7,13,8,2,6,7,9,13,4,14,11,12,13,13,6,12,11,9,5,10,13,14,12,11,0,6,14,3,10,14,14,8,12,10,5,12,2,4,11,5}

    Returns: 2575527731947

  53. {1,0,1,3,0,0,1,0,1,3,1,1,1,2,1,0,0,1,0,2,0,2,0,0,0,0,0,1,1,1,0,4,1,1,1,1,1,2,3,3,0,1,1,2,0,3,3,2,2,1}

    {5,5,2,4,1,5,4,4,2,5,4,5,5,5,4,2,0,4,5,3,3,3,5,1,1,4,5,5,2,5,1,5,5,5,4,5,3,5,5,3,0,3,5,5,5,4,5,5,3,5}

    Returns: 15954573

  54. {11,5,1,2,6,10,0,1,4,0,2,6,4,10,2,4,5,8,9,6,1,4,1,6,4,5,2,2,4,9,6,4,7,9,3,1,0,2,12,0,1,6,9,3,1,5,7,1,8,7}

    {14,11,12,11,7,11,3,13,6,9,5,9,14,12,14,11,6,13,12,8,2,8,3,7,13,13,7,5,9,12,9,7,12,13,3,10,1,3,13,14,5,10,13,4,11,14,11,10,10,8}

    Returns: 2518076170502

  55. {0,1,0,0,0,0,1,0,0,0,1,1,1,0,0,2,0,0,0,0,2,1,2,1,0,0,2,0,0,2,0,0,1,1,0,2,0,0,2,2,0,0,0,0,0,1,1,0,1,2}

    {2,2,0,0,2,2,2,1,1,2,2,2,1,2,1,2,1,2,1,2,2,2,2,2,0,1,2,2,2,2,2,1,2,2,2,2,2,2,2,2,1,2,1,0,0,1,2,0,2,2}

    Returns: 17261

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

    {10,4,6,12,10,12,9,8,10,10,8,13,14,8,14,9,14,8,14,14,14,9,11,5,13,13,11,7,14,5,3,8,6,10,4,9,14,10,12,14,8,11,5,11,9,6,14,3,9,11}

    Returns: 2478060024485

  57. {9,8,7,8,3,1,10,8,3,10,2,3,1,3,8,5,0,9,0,4,4,9,1,10,12,2,0,4,0,3,1,11,1,6,3}

    {13,14,9,9,7,3,12,10,5,14,3,6,9,4,9,7,2,11,1,5,8,14,3,10,14,6,12,14,2,6,6,14,12,11,10}

    Returns: 6524548155

  58. {9,1,1,1,1,8,9,3,5,3,2,9,1,2,1,8,2,2,12,2,4,2,4,4,2,1,2,1,2,5,0,2,9,1,10,0,1,1,4,10,4,1,4,1,1,2,4,4,7,6}

    {13,3,12,3,11,14,14,10,6,6,3,10,8,10,1,10,9,7,12,13,5,5,10,14,10,3,9,6,7,7,11,7,12,3,12,4,10,9,7,12,13,3,6,2,6,6,13,12,13,11}

    Returns: 1454126742160

  59. {3,8,3,2,5,4,12,3,1,0,9,3,10,10,10,1,11,0,6,2,5,1,2,2,7,1,3}

    {12,13,5,9,10,5,14,5,12,8,13,10,13,10,11,8,12,3,8,6,6,10,3,14,11,5,4}

    Returns: 91025044

  60. {0,0,2,0,1,1,0,0,3,0,1,0,0,0,4,0,0,2,1,3,0,2,4,1,0,2,2,0,1,0,2,1,1,1,0,0,0,0}

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

    Returns: 444877

  61. {0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,0,0,0,1,0,0,0,0,0,0,1,1,1,0,0,0,0,1,0,0,1,0,0,0,0,0,0,1,1,1,0,0,0,0,0}

    {1,1,1,1,0,0,1,1,1,1,1,0,0,1,1,1,1,1,1,0,1,0,0,1,1,1,1,1,1,1,1,1,1,1,0,1,1,1,1,1,1,0,1,1,1,1,1,0,1,1}

    Returns: 1176

  62. {3,11,5,0,12,0,12,12,8,9,9,0,5,2,7,9,0,4,7,1,6,1,5,4,4,0,5,0,0,2,11,0,4,6,10,2,0,5,9,1,0,3,10,5,2,6,6,1,6,4}

    {9,14,9,13,12,11,13,14,9,14,10,3,7,3,12,11,6,9,9,2,10,4,8,4,13,7,8,12,12,7,13,5,6,13,14,13,9,14,9,4,3,5,12,11,14,14,6,5,8,10}

    Returns: 3082538212640

  63. {7,3,1,5,2,11,11,2,2,12,2,4,5,2,11,6,1,7,0,2,11,9,1,2,5,1}

    {8,5,14,8,5,12,14,3,3,14,12,9,9,13,13,7,4,8,8,9,14,12,8,5,5,13}

    Returns: 45306038

  64. {4,3}

    {7,13}

    Returns: 4

  65. {1,4,0,2,1,2,0,3,0,0,2,2,0,2,2,0,0,0,2,3,2,1,4,2,4,1,1,1,3,3,2,0,1,3,3,2,2,0,2,0,0,2,4,1,2,1,0,0,1,1}

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

    Returns: 1104976

  66. {8,5,10,11,2,1,0,6,6,0,8,3,0,2,2,3,0,7,2,2,3,3,9,4,6,4,2,0,4,6,1,4,2,9,1,0,4,12,1,1,1,5,9,0,10,5,6,2,7}

    {10,5,14,12,5,13,14,10,7,2,8,11,13,6,9,6,8,9,14,14,8,6,11,10,12,7,7,1,8,12,6,5,13,14,3,3,12,14,5,13,7,7,14,4,13,14,10,9,11}

    Returns: 2247200097419

  67. {1,3,1,2,2,3,5,4,1,1,1,1,2,0,3,2,2,4,1,4,2,2,0,2,4,1,5,1,2,0,2,3,3,0,3,0,2,1}

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

    Returns: 1693783

  68. {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}

    {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}

    Returns: 50

  69. {0}

    {2}

    Returns: 2

  70. {11,7,3,7,0}

    {12,14,13,10,13}

    Returns: 32

  71. {2,5,0,4,5,0,3,3,1,3,3,3,3,2,6,4,4,6,0,8,3,8,1,4,2,0,0,5,7,8,4,7,0,6,6,7,4,5,3,7,2,4,6,2,1,0,0,0,1}

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

    Returns: 6036819143

  72. {3,8,10,7,1,7,0,6,7,8,5,1,2,2,3,2,1,1,2,2,11,8,1,12,3,2,0,1,0,10,2,11,5,5,0,2,5,5,2,9,3,1,6,7,1,3,6,11,11}

    {7,11,13,10,9,9,9,10,14,8,12,12,6,9,12,5,9,5,9,13,13,9,5,14,6,4,6,4,9,13,8,12,11,12,12,12,12,8,9,10,10,9,10,13,10,7,13,13,12}

    Returns: 1472457591013

  73. {2,6,0,3,7,2,1,4,3,2,9,2,9,0,0,3,9,4,3,9,11,2,8,6,7,6}

    {10,8,7,11,13,7,3,11,9,4,11,13,10,4,11,8,10,13,7,13,14,14,14,9,9,8}

    Returns: 52603577

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

    {13,8,5,13,12,14,4,9,7,5,14,2,7,14,12,5,13,7,9,11,10,8,9,9,6,4,12,14,14,6,14,12,13,10,10,7,9,5,13,6,12,10,13,11,12,5,8,4,11,7}

    Returns: 2248201288429

  75. {1,0,0,0,0,0,0,0,0,0,0,0,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,0,1,1,0,0,0,0,1,0,1,0,0,1,0,0,0,0,0,0,0}

    {1,0,0,1,1,1,1,1,1,1,1,0,1,1,1,1,1,1,0,1,0,1,0,1,1,0,0,1,1,1,1,1,1,0,1,1,1,1,1,1,0,1,1,1,1,0,0,0,1,0}

    Returns: 1130

  76. {2,0,0,1,1,3,0,1,3,1,3,2,1,1,3,0,3,2,2,0,0,1,1,2,1,1,0,3,0,2,0,2,0,1,3,1,2,4,3,2,2,2,4,1,2,2,2,1,3}

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

    Returns: 1208262

  77. {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}

    {5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5}

    Returns: 16122226

  78. {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}

    {14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14}

    Returns: 2645651289030

  79. {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}

    {11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11}

    Returns: 172186125456

  80. {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}

    {6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6}

    Returns: 102022810

  81. {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}

    {10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10}

    Returns: 50786474356

  82. {0, 0, 0, 2, 2, 2, 3, 3, 3 }

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

    Returns: 427

  83. {0, 0, 0, 5, 6, 7, 3, 3, 3 }

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

    Returns: 512


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: