DatasetRepo commited on
Commit
799648d
·
verified ·
1 Parent(s): b0fc665

931860a9a1d95a21cf69aee18b8bd2cdf0af4907340b1a2808019fdac081e71f

Browse files
This view is limited to 50 files because it contains too many changes.   See raw diff
Files changed (50) hide show
  1. .gitattributes +1 -0
  2. divide_intervals_into_minimum_number_of_groups/ocaml_tests/main.ml +26 -0
  3. divide_intervals_into_minimum_number_of_groups/scala_tests/MySuite.scala +12 -0
  4. divide_nodes_into_the_maximum_number_of_groups/.DS_Store +0 -0
  5. divide_nodes_into_the_maximum_number_of_groups/haskell_tests/Main.hs +24 -0
  6. divide_nodes_into_the_maximum_number_of_groups/java_tests/Main.java +21 -0
  7. divide_nodes_into_the_maximum_number_of_groups/meta.json +0 -0
  8. divide_nodes_into_the_maximum_number_of_groups/ocaml_tests/main.ml +26 -0
  9. divide_nodes_into_the_maximum_number_of_groups/scala_tests/MySuite.scala +12 -0
  10. divide_players_into_teams_of_equal_skill/.DS_Store +0 -0
  11. divide_players_into_teams_of_equal_skill/haskell_tests/Main.hs +27 -0
  12. divide_players_into_teams_of_equal_skill/java_tests/Main.java +25 -0
  13. divide_players_into_teams_of_equal_skill/meta.json +0 -0
  14. divide_players_into_teams_of_equal_skill/ocaml_tests/main.ml +29 -0
  15. divide_players_into_teams_of_equal_skill/scala_tests/MySuite.scala +16 -0
  16. divisible_and_non_divisible_sums_difference/haskell_tests/Main.hs +45 -0
  17. divisible_and_non_divisible_sums_difference/java_tests/Main.java +25 -0
  18. divisible_and_non_divisible_sums_difference/meta.json +102 -0
  19. divisible_and_non_divisible_sums_difference/ocaml_tests/main.ml +50 -0
  20. divisible_and_non_divisible_sums_difference/scala_tests/MySuite.scala +44 -0
  21. double_modular_exponentiation/haskell_tests/Main.hs +45 -0
  22. double_modular_exponentiation/java_tests/Main.java +21 -0
  23. double_modular_exponentiation/meta.json +2189 -0
  24. double_modular_exponentiation/ocaml_tests/main.ml +47 -0
  25. double_modular_exponentiation/scala_tests/MySuite.scala +40 -0
  26. earliest_possible_day_of_full_bloom/.DS_Store +0 -0
  27. earliest_possible_day_of_full_bloom/haskell_tests/Main.hs +27 -0
  28. earliest_possible_day_of_full_bloom/java_tests/Main.java +25 -0
  29. earliest_possible_day_of_full_bloom/meta.json +31 -0
  30. earliest_possible_day_of_full_bloom/ocaml_tests/main.ml +29 -0
  31. earliest_possible_day_of_full_bloom/scala_tests/MySuite.scala +16 -0
  32. earliest_second_to_mark_indices_i/haskell_tests/Main.hs +0 -0
  33. earliest_second_to_mark_indices_i/java_tests/Main.java +25 -0
  34. earliest_second_to_mark_indices_i/meta.json +0 -0
  35. earliest_second_to_mark_indices_i/ocaml_tests/main.ml +0 -0
  36. earliest_second_to_mark_indices_i/scala_tests/MySuite.scala +0 -0
  37. earliest_second_to_mark_indices_ii/haskell_tests/Main.hs +0 -0
  38. earliest_second_to_mark_indices_ii/java_tests/Main.java +25 -0
  39. earliest_second_to_mark_indices_ii/meta.json +0 -0
  40. earliest_second_to_mark_indices_ii/ocaml_tests/main.ml +0 -0
  41. earliest_second_to_mark_indices_ii/scala_tests/MySuite.scala +0 -0
  42. eat_pizzas/haskell_tests/Main.hs +0 -0
  43. eat_pizzas/java_tests/Main.java +20 -0
  44. eat_pizzas/meta.json +3 -0
  45. eat_pizzas/ocaml_tests/main.ml +0 -0
  46. eat_pizzas/scala_tests/MySuite.scala +0 -0
  47. equal_row_and_column_pairs/.DS_Store +0 -0
  48. equal_row_and_column_pairs/haskell_tests/Main.hs +24 -0
  49. equal_row_and_column_pairs/java_tests/Main.java +21 -0
  50. equal_row_and_column_pairs/meta.json +0 -0
.gitattributes CHANGED
@@ -112,3 +112,4 @@ distribute_elements_into_two_arrays_ii/meta.json filter=lfs diff=lfs merge=lfs -
112
  divide_an_array_into_subarrays_with_minimum_cost_ii/meta.json filter=lfs diff=lfs merge=lfs -text
113
  divide_array_into_arrays_with_max_difference/meta.json filter=lfs diff=lfs merge=lfs -text
114
  divide_intervals_into_minimum_number_of_groups/meta.json filter=lfs diff=lfs merge=lfs -text
 
 
112
  divide_an_array_into_subarrays_with_minimum_cost_ii/meta.json filter=lfs diff=lfs merge=lfs -text
113
  divide_array_into_arrays_with_max_difference/meta.json filter=lfs diff=lfs merge=lfs -text
114
  divide_intervals_into_minimum_number_of_groups/meta.json filter=lfs diff=lfs merge=lfs -text
115
+ eat_pizzas/meta.json filter=lfs diff=lfs merge=lfs -text
divide_intervals_into_minimum_number_of_groups/ocaml_tests/main.ml ADDED
@@ -0,0 +1,26 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ module Main = struct
3
+ open OUnit2
4
+
5
+ (* Program start *)
6
+
7
+ (* Program end *)
8
+
9
+ (* Test cases *)
10
+
11
+ let test1 _ = assert_equal 3 (minGroups [[5;10];[6;8];[1;5];[2;3];[1;10]])
12
+
13
+ let test2 _ = assert_equal 1 (minGroups [[1;3];[5;6];[8;10];[11;13]])
14
+
15
+
16
+ (* Grouping test cases *)
17
+ let suite = "Test Suite for minGroups" >::: [
18
+
19
+ "test1" >:: test1;
20
+ "test2" >:: test2;
21
+ ]
22
+
23
+
24
+ (* Running the tests *)
25
+ let () = run_test_tt_main suite
26
+ end
divide_intervals_into_minimum_number_of_groups/scala_tests/MySuite.scala ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ class MySuite extends munit.FunSuite {
3
+
4
+ test("test1") {
5
+ assertEquals(Main.minGroups(List(List(5,10),List(6,8),List(1,5),List(2,3),List(1,10))), 3)
6
+ }
7
+
8
+ test("test2") {
9
+ assertEquals(Main.minGroups(List(List(1,3),List(5,6),List(8,10),List(11,13))), 1)
10
+ }
11
+
12
+ }
divide_nodes_into_the_maximum_number_of_groups/.DS_Store ADDED
Binary file (6.15 kB). View file
 
divide_nodes_into_the_maximum_number_of_groups/haskell_tests/Main.hs ADDED
@@ -0,0 +1,24 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ module Main where
3
+ import Test.HUnit
4
+
5
+ --Program start
6
+
7
+ --Program end
8
+
9
+ -- Test cases
10
+
11
+ test1 :: Test
12
+ test1 = TestCase (assertEqual "for (magnificentSets 6 [[1,2],[1,4],[1,5],[2,6],[2,3],[4,6]])," 4 (magnificentSets 6 [[1,2],[1,4],[1,5],[2,6],[2,3],[4,6]]))
13
+
14
+ test2 :: Test
15
+ test2 = TestCase (assertEqual "for (magnificentSets 3 [[1,2],[2,3],[3,1]])," (-1) (magnificentSets 3 [[1,2],[2,3],[3,1]]))
16
+
17
+
18
+ -- Grouping test cases
19
+ tests :: Test
20
+ tests = TestList [TestLabel "Test1" test1]
21
+
22
+ -- Running the tests
23
+ main :: IO Counts
24
+ main = runTestTT tests
divide_nodes_into_the_maximum_number_of_groups/java_tests/Main.java ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ import static org.junit.jupiter.api.Assertions.*;
3
+ import org.junit.jupiter.api.Test;
4
+ import java.util.List;
5
+ import java.util.Arrays;
6
+ import java.util.ArrayList;
7
+ public class Main {
8
+ //Program start
9
+
10
+ //Program end
11
+
12
+ @Test
13
+ public void test1() {
14
+ assertEquals(4, magnificentSets(6, new ArrayList<>(Arrays.asList(new ArrayList<>(Arrays.asList(1,2)),new ArrayList<>(Arrays.asList(1,4)),new ArrayList<>(Arrays.asList(1,5)),new ArrayList<>(Arrays.asList(2,6)),new ArrayList<>(Arrays.asList(2,3)),new ArrayList<>(Arrays.asList(4,6))))));
15
+ }
16
+ @Test
17
+ public void test2() {
18
+ assertEquals(-1, magnificentSets(3, new ArrayList<>(Arrays.asList(new ArrayList<>(Arrays.asList(1,2)),new ArrayList<>(Arrays.asList(2,3)),new ArrayList<>(Arrays.asList(3,1))))));
19
+ }
20
+
21
+ }
divide_nodes_into_the_maximum_number_of_groups/meta.json ADDED
The diff for this file is too large to render. See raw diff
 
divide_nodes_into_the_maximum_number_of_groups/ocaml_tests/main.ml ADDED
@@ -0,0 +1,26 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ module Main = struct
3
+ open OUnit2
4
+
5
+ (* Program start *)
6
+
7
+ (* Program end *)
8
+
9
+ (* Test cases *)
10
+
11
+ let test1 _ = assert_equal 4 (magnificentSets 6 [[1;2];[1;4];[1;5];[2;6];[2;3];[4;6]])
12
+
13
+ let test2 _ = assert_equal (-1) (magnificentSets 3 [[1;2];[2;3];[3;1]])
14
+
15
+
16
+ (* Grouping test cases *)
17
+ let suite = "Test Suite for magnificentSets" >::: [
18
+
19
+ "test1" >:: test1;
20
+ "test2" >:: test2;
21
+ ]
22
+
23
+
24
+ (* Running the tests *)
25
+ let () = run_test_tt_main suite
26
+ end
divide_nodes_into_the_maximum_number_of_groups/scala_tests/MySuite.scala ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ class MySuite extends munit.FunSuite {
3
+
4
+ test("test1") {
5
+ assertEquals(Main.magnificentSets(6,List(List(1,2),List(1,4),List(1,5),List(2,6),List(2,3),List(4,6))), 4)
6
+ }
7
+
8
+ test("test2") {
9
+ assertEquals(Main.magnificentSets(3,List(List(1,2),List(2,3),List(3,1))), -1)
10
+ }
11
+
12
+ }
divide_players_into_teams_of_equal_skill/.DS_Store ADDED
Binary file (6.15 kB). View file
 
divide_players_into_teams_of_equal_skill/haskell_tests/Main.hs ADDED
@@ -0,0 +1,27 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ module Main where
3
+ import Test.HUnit
4
+
5
+ --Program start
6
+
7
+ --Program end
8
+
9
+ -- Test cases
10
+
11
+ test1 :: Test
12
+ test1 = TestCase (assertEqual "for (dividePlayers [3,2,5,1,3,4])," 22 (dividePlayers [3,2,5,1,3,4]))
13
+
14
+ test2 :: Test
15
+ test2 = TestCase (assertEqual "for (dividePlayers [3,4])," 12 (dividePlayers [3,4]))
16
+
17
+ test3 :: Test
18
+ test3 = TestCase (assertEqual "for (dividePlayers [1,1,2,3])," (-1) (dividePlayers [1,1,2,3]))
19
+
20
+
21
+ -- Grouping test cases
22
+ tests :: Test
23
+ tests = TestList [TestLabel "Test1" test1, TestLabel "Test2" test2]
24
+
25
+ -- Running the tests
26
+ main :: IO Counts
27
+ main = runTestTT tests
divide_players_into_teams_of_equal_skill/java_tests/Main.java ADDED
@@ -0,0 +1,25 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ import static org.junit.jupiter.api.Assertions.*;
3
+ import org.junit.jupiter.api.Test;
4
+ import java.util.List;
5
+ import java.util.Arrays;
6
+ import java.util.ArrayList;
7
+ public class Main {
8
+ //Program start
9
+
10
+ //Program end
11
+
12
+ @Test
13
+ public void test1() {
14
+ assertEquals(22, dividePlayers(new ArrayList<>(Arrays.asList(3,2,5,1,3,4))));
15
+ }
16
+ @Test
17
+ public void test2() {
18
+ assertEquals(12, dividePlayers(new ArrayList<>(Arrays.asList(3,4))));
19
+ }
20
+ @Test
21
+ public void test3() {
22
+ assertEquals(-1, dividePlayers(new ArrayList<>(Arrays.asList(1,1,2,3))));
23
+ }
24
+
25
+ }
divide_players_into_teams_of_equal_skill/meta.json ADDED
The diff for this file is too large to render. See raw diff
 
divide_players_into_teams_of_equal_skill/ocaml_tests/main.ml ADDED
@@ -0,0 +1,29 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ module Main = struct
3
+ open OUnit2
4
+
5
+ (* Program start *)
6
+
7
+ (* Program end *)
8
+
9
+ (* Test cases *)
10
+
11
+ let test1 _ = assert_equal 22 (dividePlayers [3;2;5;1;3;4])
12
+
13
+ let test2 _ = assert_equal 12 (dividePlayers [3;4])
14
+
15
+ let test3 _ = assert_equal (-1) (dividePlayers [1;1;2;3])
16
+
17
+
18
+ (* Grouping test cases *)
19
+ let suite = "Test Suite for dividePlayers" >::: [
20
+
21
+ "test1" >:: test1;
22
+ "test2" >:: test2;
23
+ "test3" >:: test3;
24
+ ]
25
+
26
+
27
+ (* Running the tests *)
28
+ let () = run_test_tt_main suite
29
+ end
divide_players_into_teams_of_equal_skill/scala_tests/MySuite.scala ADDED
@@ -0,0 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ class MySuite extends munit.FunSuite {
3
+
4
+ test("test1") {
5
+ assertEquals(Main.dividePlayers(List(3,2,5,1,3,4)), 22)
6
+ }
7
+
8
+ test("test2") {
9
+ assertEquals(Main.dividePlayers(List(3,4)), 12)
10
+ }
11
+
12
+ test("test3") {
13
+ assertEquals(Main.dividePlayers(List(1,1,2,3)), -1)
14
+ }
15
+
16
+ }
divisible_and_non_divisible_sums_difference/haskell_tests/Main.hs ADDED
@@ -0,0 +1,45 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ module Main where
3
+ import Test.HUnit
4
+
5
+ --Program start
6
+
7
+ --Program end
8
+
9
+ -- Test cases
10
+
11
+ test1 :: Test
12
+ test1 = TestCase (assertEqual "for (differenceOfSums 10 3)," 19 (differenceOfSums 10 3))
13
+
14
+ test2 :: Test
15
+ test2 = TestCase (assertEqual "for (differenceOfSums 5 6)," 15 (differenceOfSums 5 6))
16
+
17
+ test3 :: Test
18
+ test3 = TestCase (assertEqual "for (differenceOfSums 5 1)," (-15) (differenceOfSums 5 1))
19
+
20
+ test4 :: Test
21
+ test4 = TestCase (assertEqual "for (differenceOfSums 827 713)," 340952 (differenceOfSums 827 713))
22
+
23
+ test5 :: Test
24
+ test5 = TestCase (assertEqual "for (differenceOfSums 957 390)," 456063 (differenceOfSums 957 390))
25
+
26
+ test6 :: Test
27
+ test6 = TestCase (assertEqual "for (differenceOfSums 941 790)," 441631 (differenceOfSums 941 790))
28
+
29
+ test7 :: Test
30
+ test7 = TestCase (assertEqual "for (differenceOfSums 224 255)," 25200 (differenceOfSums 224 255))
31
+
32
+ test8 :: Test
33
+ test8 = TestCase (assertEqual "for (differenceOfSums 17 99)," 153 (differenceOfSums 17 99))
34
+
35
+ test9 :: Test
36
+ test9 = TestCase (assertEqual "for (differenceOfSums 203 363)," 20706 (differenceOfSums 203 363))
37
+
38
+
39
+ -- Grouping test cases
40
+ tests :: Test
41
+ tests = TestList [TestLabel "Test1" test1, TestLabel "Test2" test2, TestLabel "Test3" test3, TestLabel "Test4" test4, TestLabel "Test5" test5, TestLabel "Test6" test6, TestLabel "Test7" test7, TestLabel "Test8" test8, TestLabel "Test9" test9]
42
+
43
+ -- Running the tests
44
+ main :: IO Counts
45
+ main = runTestTT tests
divisible_and_non_divisible_sums_difference/java_tests/Main.java ADDED
@@ -0,0 +1,25 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ import static org.junit.jupiter.api.Assertions.*;
3
+ import org.junit.jupiter.api.Test;
4
+ import java.util.List;
5
+ import java.util.Arrays;
6
+ import java.util.ArrayList;
7
+ public class Main {
8
+ //Program start
9
+
10
+ //Program end
11
+
12
+ @Test
13
+ public void test1() {
14
+ assertEquals(19, differenceOfSums(10, 3));
15
+ }
16
+ @Test
17
+ public void test2() {
18
+ assertEquals(15, differenceOfSums(5, 6));
19
+ }
20
+ @Test
21
+ public void test3() {
22
+ assertEquals(-15, differenceOfSums(5, 1));
23
+ }
24
+
25
+ }
divisible_and_non_divisible_sums_difference/meta.json ADDED
@@ -0,0 +1,102 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "id": 3172,
3
+ "name": "divisible_and_non_divisible_sums_difference",
4
+ "difficulty": "Easy",
5
+ "link": "https://leetcode.com/problems/divisible-and-non-divisible-sums-difference/",
6
+ "date": "2023-10-01 00:00:00",
7
+ "task_description": "You are given positive integers `n` and `m`. Define two integers as follows: `num1`: The sum of all integers in the range `[1, n]` (both **inclusive**) that are **not divisible** by `m`. `num2`: The sum of all integers in the range `[1, n]` (both **inclusive**) that are **divisible** by `m`. Return _the integer_ `num1 - num2`. **Example 1:** ``` **Input:** n = 10, m = 3 **Output:** 19 **Explanation:** In the given example: - Integers in the range [1, 10] that are not divisible by 3 are [1,2,4,5,7,8,10], num1 is the sum of those integers = 37. - Integers in the range [1, 10] that are divisible by 3 are [3,6,9], num2 is the sum of those integers = 18. We return 37 - 18 = 19 as the answer. ``` **Example 2:** ``` **Input:** n = 5, m = 6 **Output:** 15 **Explanation:** In the given example: - Integers in the range [1, 5] that are not divisible by 6 are [1,2,3,4,5], num1 is the sum of those integers = 15. - Integers in the range [1, 5] that are divisible by 6 are [], num2 is the sum of those integers = 0. We return 15 - 0 = 15 as the answer. ``` **Example 3:** ``` **Input:** n = 5, m = 1 **Output:** -15 **Explanation:** In the given example: - Integers in the range [1, 5] that are not divisible by 1 are [], num1 is the sum of those integers = 0. - Integers in the range [1, 5] that are divisible by 1 are [1,2,3,4,5], num2 is the sum of those integers = 15. We return 0 - 15 = -15 as the answer. ``` **Constraints:** `1 <= n, m <= 1000`",
8
+ "public_test_cases": [
9
+ {
10
+ "label": "Example 1",
11
+ "input": "n = 10, m = 3",
12
+ "output": "19 "
13
+ },
14
+ {
15
+ "label": "Example 2",
16
+ "input": "n = 5, m = 6",
17
+ "output": "15 "
18
+ },
19
+ {
20
+ "label": "Example 3",
21
+ "input": "n = 5, m = 1",
22
+ "output": "-15 "
23
+ }
24
+ ],
25
+ "private_test_cases": [
26
+ {
27
+ "input": [
28
+ 827,
29
+ 713
30
+ ],
31
+ "output": 340952
32
+ },
33
+ {
34
+ "input": [
35
+ 957,
36
+ 390
37
+ ],
38
+ "output": 456063
39
+ },
40
+ {
41
+ "input": [
42
+ 941,
43
+ 790
44
+ ],
45
+ "output": 441631
46
+ },
47
+ {
48
+ "input": [
49
+ 224,
50
+ 255
51
+ ],
52
+ "output": 25200
53
+ },
54
+ {
55
+ "input": [
56
+ 17,
57
+ 99
58
+ ],
59
+ "output": 153
60
+ },
61
+ {
62
+ "input": [
63
+ 203,
64
+ 363
65
+ ],
66
+ "output": 20706
67
+ },
68
+ {
69
+ "input": [
70
+ 151,
71
+ 971
72
+ ],
73
+ "output": 11476
74
+ },
75
+ {
76
+ "input": [
77
+ 726,
78
+ 762
79
+ ],
80
+ "output": 263901
81
+ },
82
+ {
83
+ "input": [
84
+ 997,
85
+ 59
86
+ ],
87
+ "output": 481455
88
+ },
89
+ {
90
+ "input": [
91
+ 999,
92
+ 986
93
+ ],
94
+ "output": 497528
95
+ }
96
+ ],
97
+ "haskell_template": "differenceOfSums :: Int -> Int -> Int\ndifferenceOfSums n m ",
98
+ "ocaml_template": "let differenceOfSums (n: int) (m: int) : int = ",
99
+ "scala_template": "def differenceOfSums(n: Int,m: Int): Int = { \n \n}",
100
+ "java_template": "class Solution {\n public int differenceOfSums(int n, int m) {\n \n }\n}",
101
+ "python_template": "class Solution(object):\n def differenceOfSums(self, n, m):\n \"\"\"\n :type n: int\n :type m: int\n :rtype: int\n \"\"\"\n "
102
+ }
divisible_and_non_divisible_sums_difference/ocaml_tests/main.ml ADDED
@@ -0,0 +1,50 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ module Main = struct
3
+ open OUnit2
4
+
5
+ (* Program start *)
6
+
7
+ (* Program end *)
8
+
9
+ (* Test cases *)
10
+
11
+ let test1 _ = assert_equal 19 (differenceOfSums 10 3)
12
+
13
+ let test2 _ = assert_equal 15 (differenceOfSums 5 6)
14
+
15
+ let test3 _ = assert_equal (-15) (differenceOfSums 5 1)
16
+
17
+ let test4 _ = assert_equal 340952 (differenceOfSums 827 713)
18
+
19
+ let test5 _ = assert_equal 456063 (differenceOfSums 957 390)
20
+
21
+ let test6 _ = assert_equal 441631 (differenceOfSums 941 790)
22
+
23
+ let test7 _ = assert_equal 25200 (differenceOfSums 224 255)
24
+
25
+ let test8 _ = assert_equal 153 (differenceOfSums 17 99)
26
+
27
+ let test9 _ = assert_equal 20706 (differenceOfSums 203 363)
28
+
29
+ let test10 _ = assert_equal 11476 (differenceOfSums 151 971)
30
+
31
+
32
+ (* Grouping test cases *)
33
+ let suite = "Test Suite for differenceOfSums" >::: [
34
+
35
+ "test1" >:: test1;
36
+ "test2" >:: test2;
37
+ "test3" >:: test3;
38
+ "test4" >:: test4;
39
+ "test5" >:: test5;
40
+ "test6" >:: test6;
41
+ "test7" >:: test7;
42
+ "test8" >:: test8;
43
+ "test9" >:: test9;
44
+ "test10" >:: test10;
45
+ ]
46
+
47
+
48
+ (* Running the tests *)
49
+ let () = run_test_tt_main suite
50
+ end
divisible_and_non_divisible_sums_difference/scala_tests/MySuite.scala ADDED
@@ -0,0 +1,44 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ class MySuite extends munit.FunSuite {
3
+
4
+ test("test1") {
5
+ assertEquals(Main.differenceOfSums(10,3), 19)
6
+ }
7
+
8
+ test("test2") {
9
+ assertEquals(Main.differenceOfSums(5,6), 15)
10
+ }
11
+
12
+ test("test3") {
13
+ assertEquals(Main.differenceOfSums(5,1), -15)
14
+ }
15
+
16
+ test("test4") {
17
+ assertEquals(Main.differenceOfSums(827,713), 340952)
18
+ }
19
+
20
+ test("test5") {
21
+ assertEquals(Main.differenceOfSums(957,390), 456063)
22
+ }
23
+
24
+ test("test6") {
25
+ assertEquals(Main.differenceOfSums(941,790), 441631)
26
+ }
27
+
28
+ test("test7") {
29
+ assertEquals(Main.differenceOfSums(224,255), 25200)
30
+ }
31
+
32
+ test("test8") {
33
+ assertEquals(Main.differenceOfSums(17,99), 153)
34
+ }
35
+
36
+ test("test9") {
37
+ assertEquals(Main.differenceOfSums(203,363), 20706)
38
+ }
39
+
40
+ test("test10") {
41
+ assertEquals(Main.differenceOfSums(151,971), 11476)
42
+ }
43
+
44
+ }
double_modular_exponentiation/haskell_tests/Main.hs ADDED
@@ -0,0 +1,45 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ module Main where
3
+ import Test.HUnit
4
+
5
+ --Program start
6
+
7
+ --Program end
8
+
9
+ -- Test cases
10
+
11
+ test1 :: Test
12
+ test1 = TestCase (assertEqual "for (getGoodIndices [[2,3,3,10],[3,3,3,1],[6,1,1,4]] 2)," [0,2] (getGoodIndices [[2,3,3,10],[3,3,3,1],[6,1,1,4]] 2))
13
+
14
+ test2 :: Test
15
+ test2 = TestCase (assertEqual "for (getGoodIndices [[39,3,1000,1000]] 17)," [] (getGoodIndices [[39,3,1000,1000]] 17))
16
+
17
+ test3 :: Test
18
+ test3 = TestCase (assertEqual "for (getGoodIndices [[421, 377, 428, 165], [974, 742, 692, 350], [826, 560, 987, 757]] 143)," [] (getGoodIndices [[421, 377, 428, 165], [974, 742, 692, 350], [826, 560, 987, 757]] 143))
19
+
20
+ test4 :: Test
21
+ test4 = TestCase (assertEqual "for (getGoodIndices [[765, 245, 442, 420], [531, 902, 782, 675], [598, 622, 462, 829], [519, 17, 285, 454], [754, 818, 264, 34], [267, 54, 632, 323], [101, 332, 820, 72], [76, 579, 390, 12], [904, 523, 796, 307], [821, 209, 540, 668], [25, 603, 985, 140], [213, 823, 566, 823], [640, 78, 110, 6], [329, 508, 158, 997], [405, 840, 31, 104], [814, 139, 138, 447], [919, 935, 522, 626], [49, 25, 510, 236], [846, 119, 183, 956], [272, 849, 513, 91], [543, 726, 744, 269], [316, 561, 932, 235], [953, 843, 235, 320], [381, 895, 788, 480], [69, 477, 845, 383], [270, 102, 830, 266], [886, 406, 890, 315], [392, 835, 522, 614], [287, 313, 368, 775], [558, 67, 693, 344], [723, 564, 90, 381], [950, 571, 341, 775], [531, 909, 325, 713], [165, 201, 661, 21], [301, 689, 994, 518], [501, 132, 116, 180], [39, 232, 723, 753], [646, 578, 353, 71], [738, 287, 759, 385], [777, 553, 68, 238], [677, 13, 894, 297], [723, 155, 139, 792], [891, 272, 196, 568], [156, 356, 185, 499], [34, 756, 406, 15], [190, 243, 107, 252], [662, 547, 649, 666], [363, 726, 406, 953], [379, 496, 477, 453], [552, 954, 484, 732], [548, 238, 505, 45], [113, 679, 987, 145], [975, 463, 317, 692], [746, 540, 632, 772], [492, 257, 198, 980], [802, 838, 416, 782], [88, 315, 34, 395]] 942)," [] (getGoodIndices [[765, 245, 442, 420], [531, 902, 782, 675], [598, 622, 462, 829], [519, 17, 285, 454], [754, 818, 264, 34], [267, 54, 632, 323], [101, 332, 820, 72], [76, 579, 390, 12], [904, 523, 796, 307], [821, 209, 540, 668], [25, 603, 985, 140], [213, 823, 566, 823], [640, 78, 110, 6], [329, 508, 158, 997], [405, 840, 31, 104], [814, 139, 138, 447], [919, 935, 522, 626], [49, 25, 510, 236], [846, 119, 183, 956], [272, 849, 513, 91], [543, 726, 744, 269], [316, 561, 932, 235], [953, 843, 235, 320], [381, 895, 788, 480], [69, 477, 845, 383], [270, 102, 830, 266], [886, 406, 890, 315], [392, 835, 522, 614], [287, 313, 368, 775], [558, 67, 693, 344], [723, 564, 90, 381], [950, 571, 341, 775], [531, 909, 325, 713], [165, 201, 661, 21], [301, 689, 994, 518], [501, 132, 116, 180], [39, 232, 723, 753], [646, 578, 353, 71], [738, 287, 759, 385], [777, 553, 68, 238], [677, 13, 894, 297], [723, 155, 139, 792], [891, 272, 196, 568], [156, 356, 185, 499], [34, 756, 406, 15], [190, 243, 107, 252], [662, 547, 649, 666], [363, 726, 406, 953], [379, 496, 477, 453], [552, 954, 484, 732], [548, 238, 505, 45], [113, 679, 987, 145], [975, 463, 317, 692], [746, 540, 632, 772], [492, 257, 198, 980], [802, 838, 416, 782], [88, 315, 34, 395]] 942))
22
+
23
+ test5 :: Test
24
+ test5 = TestCase (assertEqual "for (getGoodIndices [[49, 533, 715, 737], [924, 897, 615, 101], [260, 131, 150, 918], [339, 462, 654, 276], [32, 767, 733, 978], [67, 883, 686, 626], [405, 321, 514, 716], [632, 376, 761, 338], [439, 1000, 156, 528], [87, 697, 84, 393], [684, 943, 837, 900], [326, 341, 868, 841], [142, 633, 342, 652], [294, 39, 296, 997], [35, 266, 62, 622], [11, 993, 775, 197], [893, 561, 863, 443], [92, 698, 743, 898], [793, 760, 708, 894], [548, 781, 487, 778], [289, 825, 321, 680], [628, 99, 912, 861], [627, 365, 475, 983], [669, 682, 681, 685], [914, 155, 752, 928], [649, 197, 921, 936], [135, 608, 32, 184], [270, 860, 434, 622], [815, 345, 501, 174], [819, 905, 643, 337], [644, 450, 22, 866], [120, 353, 623, 970], [458, 881, 872, 854], [547, 833, 855, 274], [121, 465, 388, 270], [175, 9, 815, 644], [157, 329, 216, 495], [398, 785, 529, 219], [896, 70, 244, 460], [943, 16, 568, 861], [363, 626, 973, 297], [397, 44, 92, 179], [494, 337, 729, 899], [750, 204, 840, 122], [37, 69, 68, 202], [452, 554, 248, 932], [540, 205, 629, 908], [756, 75, 973, 522], [60, 376, 810, 889], [351, 800, 930, 468], [352, 38, 789, 921], [929, 956, 909, 637], [246, 782, 974, 862], [495, 271, 475, 792], [106, 937, 243, 893], [922, 373, 956, 174], [177, 888, 611, 889], [963, 900, 153, 746], [395, 241, 550, 511], [202, 381, 700, 813], [471, 848, 331, 233], [299, 516, 910, 497], [293, 893, 784, 818], [773, 926, 287, 688], [306, 905, 694, 439], [682, 877, 886, 511], [195, 345, 401, 347], [271, 770, 84, 390], [22, 618, 595, 346], [71, 681, 146, 363], [604, 486, 669, 940], [980, 817, 838, 256], [691, 613, 458, 474], [820, 763, 708, 892], [671, 452, 760, 971], [654, 336, 997, 846], [806, 950, 694, 859], [309, 886, 76, 430], [74, 739, 871, 749], [510, 149, 846, 818], [361, 518, 497, 330], [586, 159, 975, 105], [548, 662, 963, 595], [856, 194, 657, 616]] 949)," [] (getGoodIndices [[49, 533, 715, 737], [924, 897, 615, 101], [260, 131, 150, 918], [339, 462, 654, 276], [32, 767, 733, 978], [67, 883, 686, 626], [405, 321, 514, 716], [632, 376, 761, 338], [439, 1000, 156, 528], [87, 697, 84, 393], [684, 943, 837, 900], [326, 341, 868, 841], [142, 633, 342, 652], [294, 39, 296, 997], [35, 266, 62, 622], [11, 993, 775, 197], [893, 561, 863, 443], [92, 698, 743, 898], [793, 760, 708, 894], [548, 781, 487, 778], [289, 825, 321, 680], [628, 99, 912, 861], [627, 365, 475, 983], [669, 682, 681, 685], [914, 155, 752, 928], [649, 197, 921, 936], [135, 608, 32, 184], [270, 860, 434, 622], [815, 345, 501, 174], [819, 905, 643, 337], [644, 450, 22, 866], [120, 353, 623, 970], [458, 881, 872, 854], [547, 833, 855, 274], [121, 465, 388, 270], [175, 9, 815, 644], [157, 329, 216, 495], [398, 785, 529, 219], [896, 70, 244, 460], [943, 16, 568, 861], [363, 626, 973, 297], [397, 44, 92, 179], [494, 337, 729, 899], [750, 204, 840, 122], [37, 69, 68, 202], [452, 554, 248, 932], [540, 205, 629, 908], [756, 75, 973, 522], [60, 376, 810, 889], [351, 800, 930, 468], [352, 38, 789, 921], [929, 956, 909, 637], [246, 782, 974, 862], [495, 271, 475, 792], [106, 937, 243, 893], [922, 373, 956, 174], [177, 888, 611, 889], [963, 900, 153, 746], [395, 241, 550, 511], [202, 381, 700, 813], [471, 848, 331, 233], [299, 516, 910, 497], [293, 893, 784, 818], [773, 926, 287, 688], [306, 905, 694, 439], [682, 877, 886, 511], [195, 345, 401, 347], [271, 770, 84, 390], [22, 618, 595, 346], [71, 681, 146, 363], [604, 486, 669, 940], [980, 817, 838, 256], [691, 613, 458, 474], [820, 763, 708, 892], [671, 452, 760, 971], [654, 336, 997, 846], [806, 950, 694, 859], [309, 886, 76, 430], [74, 739, 871, 749], [510, 149, 846, 818], [361, 518, 497, 330], [586, 159, 975, 105], [548, 662, 963, 595], [856, 194, 657, 616]] 949))
25
+
26
+ test6 :: Test
27
+ test6 = TestCase (assertEqual "for (getGoodIndices [[81, 172, 816, 189], [809, 835, 516, 976], [397, 971, 139, 93], [681, 583, 211, 893], [280, 14, 944, 299], [376, 487, 547, 109], [967, 509, 844, 522], [50, 465, 477, 439], [816, 204, 858, 24], [909, 456, 252, 478], [696, 242, 935, 324], [917, 999, 174, 120], [852, 237, 834, 506], [296, 5, 111, 748], [706, 607, 470, 176], [511, 3, 181, 780], [104, 121, 815, 559], [30, 888, 987, 809], [980, 646, 68, 621], [151, 159, 847, 511], [216, 153, 524, 81], [232, 344, 443, 608], [613, 48, 987, 567], [482, 734, 352, 296], [150, 54, 779, 387], [53, 208, 939, 212], [999, 667, 907, 712], [527, 974, 693, 275], [589, 415, 593, 251], [817, 108, 592, 653], [925, 383, 642, 863], [409, 263, 441, 288], [524, 586, 918, 266], [248, 923, 220, 764], [936, 616, 521, 106], [599, 688, 72, 819], [762, 876, 429, 494], [353, 724, 774, 394], [449, 376, 358, 861], [223, 743, 609, 507], [279, 890, 182, 381], [407, 227, 318, 292], [282, 543, 533, 892], [821, 464, 352, 213], [294, 289, 509, 759]] 957)," [] (getGoodIndices [[81, 172, 816, 189], [809, 835, 516, 976], [397, 971, 139, 93], [681, 583, 211, 893], [280, 14, 944, 299], [376, 487, 547, 109], [967, 509, 844, 522], [50, 465, 477, 439], [816, 204, 858, 24], [909, 456, 252, 478], [696, 242, 935, 324], [917, 999, 174, 120], [852, 237, 834, 506], [296, 5, 111, 748], [706, 607, 470, 176], [511, 3, 181, 780], [104, 121, 815, 559], [30, 888, 987, 809], [980, 646, 68, 621], [151, 159, 847, 511], [216, 153, 524, 81], [232, 344, 443, 608], [613, 48, 987, 567], [482, 734, 352, 296], [150, 54, 779, 387], [53, 208, 939, 212], [999, 667, 907, 712], [527, 974, 693, 275], [589, 415, 593, 251], [817, 108, 592, 653], [925, 383, 642, 863], [409, 263, 441, 288], [524, 586, 918, 266], [248, 923, 220, 764], [936, 616, 521, 106], [599, 688, 72, 819], [762, 876, 429, 494], [353, 724, 774, 394], [449, 376, 358, 861], [223, 743, 609, 507], [279, 890, 182, 381], [407, 227, 318, 292], [282, 543, 533, 892], [821, 464, 352, 213], [294, 289, 509, 759]] 957))
28
+
29
+ test7 :: Test
30
+ test7 = TestCase (assertEqual "for (getGoodIndices [[6, 114, 977, 509], [992, 896, 940, 360], [108, 232, 245, 708], [839, 994, 876, 132], [322, 274, 923, 515], [269, 439, 946, 817], [495, 776, 365, 373], [28, 782, 83, 118], [979, 942, 907, 111], [332, 664, 757, 833], [885, 939, 68, 113], [100, 104, 441, 578], [769, 192, 680, 494], [169, 51, 884, 261], [88, 60, 678, 51], [600, 260, 945, 893], [578, 223, 333, 561], [209, 752, 843, 166], [880, 569, 698, 597], [329, 525, 407, 1], [431, 192, 711, 50], [37, 855, 590, 473], [935, 795, 85, 290], [674, 556, 171, 211], [825, 850, 418, 517], [555, 737, 950, 132], [405, 203, 554, 263], [359, 170, 215, 258], [381, 593, 785, 679], [153, 704, 754, 957], [919, 758, 73, 131], [209, 121, 633, 452], [850, 903, 831, 189], [756, 405, 232, 235], [254, 574, 70, 107], [985, 221, 949, 601], [671, 449, 108, 913], [290, 917, 148, 391], [871, 77, 224, 852], [7, 41, 760, 862], [205, 212, 549, 576], [791, 683, 877, 501], [128, 808, 94, 594], [684, 588, 547, 118], [708, 724, 428, 997], [1, 515, 617, 413], [689, 970, 677, 288], [796, 841, 983, 774], [854, 842, 649, 972], [318, 13, 692, 791], [514, 801, 601, 835], [431, 810, 912, 183], [778, 552, 326, 620], [627, 343, 412, 901], [380, 264, 962, 825], [72, 869, 314, 356], [479, 701, 720, 380], [23, 52, 949, 882], [67, 648, 120, 709], [814, 251, 484, 453], [482, 903, 374, 308], [215, 393, 68, 708], [432, 689, 907, 548], [857, 652, 902, 652], [421, 413, 237, 5], [182, 165, 186, 942], [314, 622, 884, 857], [202, 236, 606, 575], [564, 55, 87, 474], [19, 759, 536, 282], [796, 1000, 689, 798], [484, 868, 402, 964], [272, 713, 258, 838], [523, 957, 746, 397], [665, 948, 815, 727], [267, 594, 16, 190], [969, 604, 257, 608], [985, 956, 429, 633], [916, 717, 532, 947], [701, 731, 143, 346], [541, 175, 216, 703], [557, 223, 184, 755], [641, 243, 833, 33], [217, 317, 296, 763], [608, 874, 70, 716], [392, 976, 115, 953], [209, 461, 42, 352]] 183)," [] (getGoodIndices [[6, 114, 977, 509], [992, 896, 940, 360], [108, 232, 245, 708], [839, 994, 876, 132], [322, 274, 923, 515], [269, 439, 946, 817], [495, 776, 365, 373], [28, 782, 83, 118], [979, 942, 907, 111], [332, 664, 757, 833], [885, 939, 68, 113], [100, 104, 441, 578], [769, 192, 680, 494], [169, 51, 884, 261], [88, 60, 678, 51], [600, 260, 945, 893], [578, 223, 333, 561], [209, 752, 843, 166], [880, 569, 698, 597], [329, 525, 407, 1], [431, 192, 711, 50], [37, 855, 590, 473], [935, 795, 85, 290], [674, 556, 171, 211], [825, 850, 418, 517], [555, 737, 950, 132], [405, 203, 554, 263], [359, 170, 215, 258], [381, 593, 785, 679], [153, 704, 754, 957], [919, 758, 73, 131], [209, 121, 633, 452], [850, 903, 831, 189], [756, 405, 232, 235], [254, 574, 70, 107], [985, 221, 949, 601], [671, 449, 108, 913], [290, 917, 148, 391], [871, 77, 224, 852], [7, 41, 760, 862], [205, 212, 549, 576], [791, 683, 877, 501], [128, 808, 94, 594], [684, 588, 547, 118], [708, 724, 428, 997], [1, 515, 617, 413], [689, 970, 677, 288], [796, 841, 983, 774], [854, 842, 649, 972], [318, 13, 692, 791], [514, 801, 601, 835], [431, 810, 912, 183], [778, 552, 326, 620], [627, 343, 412, 901], [380, 264, 962, 825], [72, 869, 314, 356], [479, 701, 720, 380], [23, 52, 949, 882], [67, 648, 120, 709], [814, 251, 484, 453], [482, 903, 374, 308], [215, 393, 68, 708], [432, 689, 907, 548], [857, 652, 902, 652], [421, 413, 237, 5], [182, 165, 186, 942], [314, 622, 884, 857], [202, 236, 606, 575], [564, 55, 87, 474], [19, 759, 536, 282], [796, 1000, 689, 798], [484, 868, 402, 964], [272, 713, 258, 838], [523, 957, 746, 397], [665, 948, 815, 727], [267, 594, 16, 190], [969, 604, 257, 608], [985, 956, 429, 633], [916, 717, 532, 947], [701, 731, 143, 346], [541, 175, 216, 703], [557, 223, 184, 755], [641, 243, 833, 33], [217, 317, 296, 763], [608, 874, 70, 716], [392, 976, 115, 953], [209, 461, 42, 352]] 183))
31
+
32
+ test8 :: Test
33
+ test8 = TestCase (assertEqual "for (getGoodIndices [[856, 748, 650, 124], [599, 74, 954, 720], [116, 112, 187, 459], [428, 787, 42, 243], [878, 169, 977, 267], [351, 952, 826, 534], [730, 760, 533, 507], [612, 167, 208, 56], [349, 752, 126, 743], [33, 575, 257, 955], [815, 571, 494, 987], [88, 322, 785, 329], [892, 795, 384, 496], [797, 873, 848, 768]] 407)," [] (getGoodIndices [[856, 748, 650, 124], [599, 74, 954, 720], [116, 112, 187, 459], [428, 787, 42, 243], [878, 169, 977, 267], [351, 952, 826, 534], [730, 760, 533, 507], [612, 167, 208, 56], [349, 752, 126, 743], [33, 575, 257, 955], [815, 571, 494, 987], [88, 322, 785, 329], [892, 795, 384, 496], [797, 873, 848, 768]] 407))
34
+
35
+ test9 :: Test
36
+ test9 = TestCase (assertEqual "for (getGoodIndices [[14, 878, 402, 407], [119, 107, 486, 233], [125, 80, 792, 504], [736, 647, 638, 163], [327, 465, 694, 681], [211, 281, 165, 386], [367, 201, 826, 849], [863, 520, 722, 684], [355, 609, 311, 798], [834, 455, 902, 854], [588, 90, 135, 391], [413, 824, 59, 558], [893, 549, 420, 899], [75, 689, 403, 773], [903, 451, 775, 882], [355, 597, 223, 600], [494, 613, 819, 216], [52, 966, 966, 121], [70, 721, 779, 47], [865, 606, 604, 472], [110, 628, 751, 123], [692, 72, 982, 58], [205, 640, 791, 422], [984, 652, 511, 224], [806, 180, 445, 995], [430, 603, 598, 48], [175, 699, 700, 602], [661, 825, 406, 892], [58, 849, 434, 798], [870, 146, 948, 823], [512, 134, 216, 352], [610, 137, 125, 97], [711, 349, 103, 414], [895, 440, 653, 260], [609, 264, 3, 300], [981, 577, 365, 681], [41, 406, 773, 688], [222, 359, 450, 29], [354, 776, 679, 773], [975, 931, 142, 736], [135, 272, 914, 855], [883, 967, 239, 928], [900, 735, 587, 120], [515, 421, 809, 961], [863, 68, 310, 33], [709, 487, 972, 559], [132, 211, 686, 644], [828, 944, 653, 544], [17, 341, 781, 214], [187, 271, 354, 656], [1, 46, 897, 685], [549, 945, 952, 120], [535, 745, 438, 286], [348, 781, 265, 119], [627, 854, 993, 633], [21, 273, 451, 965], [346, 260, 623, 616], [9, 152, 906, 545], [455, 37, 410, 650], [300, 571, 685, 624], [982, 9, 26, 748]] 169)," [] (getGoodIndices [[14, 878, 402, 407], [119, 107, 486, 233], [125, 80, 792, 504], [736, 647, 638, 163], [327, 465, 694, 681], [211, 281, 165, 386], [367, 201, 826, 849], [863, 520, 722, 684], [355, 609, 311, 798], [834, 455, 902, 854], [588, 90, 135, 391], [413, 824, 59, 558], [893, 549, 420, 899], [75, 689, 403, 773], [903, 451, 775, 882], [355, 597, 223, 600], [494, 613, 819, 216], [52, 966, 966, 121], [70, 721, 779, 47], [865, 606, 604, 472], [110, 628, 751, 123], [692, 72, 982, 58], [205, 640, 791, 422], [984, 652, 511, 224], [806, 180, 445, 995], [430, 603, 598, 48], [175, 699, 700, 602], [661, 825, 406, 892], [58, 849, 434, 798], [870, 146, 948, 823], [512, 134, 216, 352], [610, 137, 125, 97], [711, 349, 103, 414], [895, 440, 653, 260], [609, 264, 3, 300], [981, 577, 365, 681], [41, 406, 773, 688], [222, 359, 450, 29], [354, 776, 679, 773], [975, 931, 142, 736], [135, 272, 914, 855], [883, 967, 239, 928], [900, 735, 587, 120], [515, 421, 809, 961], [863, 68, 310, 33], [709, 487, 972, 559], [132, 211, 686, 644], [828, 944, 653, 544], [17, 341, 781, 214], [187, 271, 354, 656], [1, 46, 897, 685], [549, 945, 952, 120], [535, 745, 438, 286], [348, 781, 265, 119], [627, 854, 993, 633], [21, 273, 451, 965], [346, 260, 623, 616], [9, 152, 906, 545], [455, 37, 410, 650], [300, 571, 685, 624], [982, 9, 26, 748]] 169))
37
+
38
+
39
+ -- Grouping test cases
40
+ tests :: Test
41
+ tests = TestList [TestLabel "Test1" test1, TestLabel "Test2" test2, TestLabel "Test3" test3, TestLabel "Test4" test4, TestLabel "Test5" test5, TestLabel "Test6" test6, TestLabel "Test7" test7, TestLabel "Test8" test8]
42
+
43
+ -- Running the tests
44
+ main :: IO Counts
45
+ main = runTestTT tests
double_modular_exponentiation/java_tests/Main.java ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ import static org.junit.jupiter.api.Assertions.*;
3
+ import org.junit.jupiter.api.Test;
4
+ import java.util.List;
5
+ import java.util.Arrays;
6
+ import java.util.ArrayList;
7
+ public class Main {
8
+ //Program start
9
+
10
+ //Program end
11
+
12
+ @Test
13
+ public void test1() {
14
+ assertEquals(new ArrayList<>(Arrays.asList(0,2)), getGoodIndices(new ArrayList<>(Arrays.asList(new ArrayList<>(Arrays.asList(2,3,3,10)),new ArrayList<>(Arrays.asList(3,3,3,1)),new ArrayList<>(Arrays.asList(6,1,1,4)))), 2));
15
+ }
16
+ @Test
17
+ public void test2() {
18
+ assertEquals(new ArrayList<>(), getGoodIndices(new ArrayList<>(Arrays.asList(new ArrayList<>(Arrays.asList(39,3,1000,1000)))), 17));
19
+ }
20
+
21
+ }
double_modular_exponentiation/meta.json ADDED
@@ -0,0 +1,2189 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "id": 3234,
3
+ "name": "double_modular_exponentiation",
4
+ "difficulty": "Medium",
5
+ "link": "https://leetcode.com/problems/double-modular-exponentiation/",
6
+ "date": "2023-12-03 00:00:00",
7
+ "task_description": "You are given a **0-indexed** 2D array `variables` where `variables[i] = [ai, bi, ci, mi]`, and an integer `target`. An index `i` is **good** if the following formula holds: `0 <= i < variables.length` `((aibi % 10)ci) % mi == target` Return _an array consisting of **good** indices in **any order**_. **Example 1:** ``` **Input:** variables = [[2,3,3,10],[3,3,3,1],[6,1,1,4]], target = 2 **Output:** [0,2] **Explanation:** For each index i in the variables array: 1) For the index 0, variables[0] = [2,3,3,10], (23 % 10)3 % 10 = 2. 2) For the index 1, variables[1] = [3,3,3,1], (33 % 10)3 % 1 = 0. 3) For the index 2, variables[2] = [6,1,1,4], (61 % 10)1 % 4 = 2. Therefore we return [0,2] as the answer. ``` **Example 2:** ``` **Input:** variables = [[39,3,1000,1000]], target = 17 **Output:** [] **Explanation:** For each index i in the variables array: 1) For the index 0, variables[0] = [39,3,1000,1000], (393 % 10)1000 % 1000 = 1. Therefore we return [] as the answer. ``` **Constraints:** `1 <= variables.length <= 100` `variables[i] == [ai, bi, ci, mi]` `1 <= ai, bi, ci, mi <= 103` `0 <= target <= 103`",
8
+ "public_test_cases": [
9
+ {
10
+ "label": "Example 1",
11
+ "input": "variables = [[2,3,3,10],[3,3,3,1],[6,1,1,4]], target = 2",
12
+ "output": "[0,2] "
13
+ },
14
+ {
15
+ "label": "Example 2",
16
+ "input": "variables = [[39,3,1000,1000]], target = 17",
17
+ "output": "[] "
18
+ }
19
+ ],
20
+ "private_test_cases": [
21
+ {
22
+ "input": [
23
+ [
24
+ [
25
+ 421,
26
+ 377,
27
+ 428,
28
+ 165
29
+ ],
30
+ [
31
+ 974,
32
+ 742,
33
+ 692,
34
+ 350
35
+ ],
36
+ [
37
+ 826,
38
+ 560,
39
+ 987,
40
+ 757
41
+ ]
42
+ ],
43
+ 143
44
+ ],
45
+ "output": []
46
+ },
47
+ {
48
+ "input": [
49
+ [
50
+ [
51
+ 765,
52
+ 245,
53
+ 442,
54
+ 420
55
+ ],
56
+ [
57
+ 531,
58
+ 902,
59
+ 782,
60
+ 675
61
+ ],
62
+ [
63
+ 598,
64
+ 622,
65
+ 462,
66
+ 829
67
+ ],
68
+ [
69
+ 519,
70
+ 17,
71
+ 285,
72
+ 454
73
+ ],
74
+ [
75
+ 754,
76
+ 818,
77
+ 264,
78
+ 34
79
+ ],
80
+ [
81
+ 267,
82
+ 54,
83
+ 632,
84
+ 323
85
+ ],
86
+ [
87
+ 101,
88
+ 332,
89
+ 820,
90
+ 72
91
+ ],
92
+ [
93
+ 76,
94
+ 579,
95
+ 390,
96
+ 12
97
+ ],
98
+ [
99
+ 904,
100
+ 523,
101
+ 796,
102
+ 307
103
+ ],
104
+ [
105
+ 821,
106
+ 209,
107
+ 540,
108
+ 668
109
+ ],
110
+ [
111
+ 25,
112
+ 603,
113
+ 985,
114
+ 140
115
+ ],
116
+ [
117
+ 213,
118
+ 823,
119
+ 566,
120
+ 823
121
+ ],
122
+ [
123
+ 640,
124
+ 78,
125
+ 110,
126
+ 6
127
+ ],
128
+ [
129
+ 329,
130
+ 508,
131
+ 158,
132
+ 997
133
+ ],
134
+ [
135
+ 405,
136
+ 840,
137
+ 31,
138
+ 104
139
+ ],
140
+ [
141
+ 814,
142
+ 139,
143
+ 138,
144
+ 447
145
+ ],
146
+ [
147
+ 919,
148
+ 935,
149
+ 522,
150
+ 626
151
+ ],
152
+ [
153
+ 49,
154
+ 25,
155
+ 510,
156
+ 236
157
+ ],
158
+ [
159
+ 846,
160
+ 119,
161
+ 183,
162
+ 956
163
+ ],
164
+ [
165
+ 272,
166
+ 849,
167
+ 513,
168
+ 91
169
+ ],
170
+ [
171
+ 543,
172
+ 726,
173
+ 744,
174
+ 269
175
+ ],
176
+ [
177
+ 316,
178
+ 561,
179
+ 932,
180
+ 235
181
+ ],
182
+ [
183
+ 953,
184
+ 843,
185
+ 235,
186
+ 320
187
+ ],
188
+ [
189
+ 381,
190
+ 895,
191
+ 788,
192
+ 480
193
+ ],
194
+ [
195
+ 69,
196
+ 477,
197
+ 845,
198
+ 383
199
+ ],
200
+ [
201
+ 270,
202
+ 102,
203
+ 830,
204
+ 266
205
+ ],
206
+ [
207
+ 886,
208
+ 406,
209
+ 890,
210
+ 315
211
+ ],
212
+ [
213
+ 392,
214
+ 835,
215
+ 522,
216
+ 614
217
+ ],
218
+ [
219
+ 287,
220
+ 313,
221
+ 368,
222
+ 775
223
+ ],
224
+ [
225
+ 558,
226
+ 67,
227
+ 693,
228
+ 344
229
+ ],
230
+ [
231
+ 723,
232
+ 564,
233
+ 90,
234
+ 381
235
+ ],
236
+ [
237
+ 950,
238
+ 571,
239
+ 341,
240
+ 775
241
+ ],
242
+ [
243
+ 531,
244
+ 909,
245
+ 325,
246
+ 713
247
+ ],
248
+ [
249
+ 165,
250
+ 201,
251
+ 661,
252
+ 21
253
+ ],
254
+ [
255
+ 301,
256
+ 689,
257
+ 994,
258
+ 518
259
+ ],
260
+ [
261
+ 501,
262
+ 132,
263
+ 116,
264
+ 180
265
+ ],
266
+ [
267
+ 39,
268
+ 232,
269
+ 723,
270
+ 753
271
+ ],
272
+ [
273
+ 646,
274
+ 578,
275
+ 353,
276
+ 71
277
+ ],
278
+ [
279
+ 738,
280
+ 287,
281
+ 759,
282
+ 385
283
+ ],
284
+ [
285
+ 777,
286
+ 553,
287
+ 68,
288
+ 238
289
+ ],
290
+ [
291
+ 677,
292
+ 13,
293
+ 894,
294
+ 297
295
+ ],
296
+ [
297
+ 723,
298
+ 155,
299
+ 139,
300
+ 792
301
+ ],
302
+ [
303
+ 891,
304
+ 272,
305
+ 196,
306
+ 568
307
+ ],
308
+ [
309
+ 156,
310
+ 356,
311
+ 185,
312
+ 499
313
+ ],
314
+ [
315
+ 34,
316
+ 756,
317
+ 406,
318
+ 15
319
+ ],
320
+ [
321
+ 190,
322
+ 243,
323
+ 107,
324
+ 252
325
+ ],
326
+ [
327
+ 662,
328
+ 547,
329
+ 649,
330
+ 666
331
+ ],
332
+ [
333
+ 363,
334
+ 726,
335
+ 406,
336
+ 953
337
+ ],
338
+ [
339
+ 379,
340
+ 496,
341
+ 477,
342
+ 453
343
+ ],
344
+ [
345
+ 552,
346
+ 954,
347
+ 484,
348
+ 732
349
+ ],
350
+ [
351
+ 548,
352
+ 238,
353
+ 505,
354
+ 45
355
+ ],
356
+ [
357
+ 113,
358
+ 679,
359
+ 987,
360
+ 145
361
+ ],
362
+ [
363
+ 975,
364
+ 463,
365
+ 317,
366
+ 692
367
+ ],
368
+ [
369
+ 746,
370
+ 540,
371
+ 632,
372
+ 772
373
+ ],
374
+ [
375
+ 492,
376
+ 257,
377
+ 198,
378
+ 980
379
+ ],
380
+ [
381
+ 802,
382
+ 838,
383
+ 416,
384
+ 782
385
+ ],
386
+ [
387
+ 88,
388
+ 315,
389
+ 34,
390
+ 395
391
+ ]
392
+ ],
393
+ 942
394
+ ],
395
+ "output": []
396
+ },
397
+ {
398
+ "input": [
399
+ [
400
+ [
401
+ 49,
402
+ 533,
403
+ 715,
404
+ 737
405
+ ],
406
+ [
407
+ 924,
408
+ 897,
409
+ 615,
410
+ 101
411
+ ],
412
+ [
413
+ 260,
414
+ 131,
415
+ 150,
416
+ 918
417
+ ],
418
+ [
419
+ 339,
420
+ 462,
421
+ 654,
422
+ 276
423
+ ],
424
+ [
425
+ 32,
426
+ 767,
427
+ 733,
428
+ 978
429
+ ],
430
+ [
431
+ 67,
432
+ 883,
433
+ 686,
434
+ 626
435
+ ],
436
+ [
437
+ 405,
438
+ 321,
439
+ 514,
440
+ 716
441
+ ],
442
+ [
443
+ 632,
444
+ 376,
445
+ 761,
446
+ 338
447
+ ],
448
+ [
449
+ 439,
450
+ 1000,
451
+ 156,
452
+ 528
453
+ ],
454
+ [
455
+ 87,
456
+ 697,
457
+ 84,
458
+ 393
459
+ ],
460
+ [
461
+ 684,
462
+ 943,
463
+ 837,
464
+ 900
465
+ ],
466
+ [
467
+ 326,
468
+ 341,
469
+ 868,
470
+ 841
471
+ ],
472
+ [
473
+ 142,
474
+ 633,
475
+ 342,
476
+ 652
477
+ ],
478
+ [
479
+ 294,
480
+ 39,
481
+ 296,
482
+ 997
483
+ ],
484
+ [
485
+ 35,
486
+ 266,
487
+ 62,
488
+ 622
489
+ ],
490
+ [
491
+ 11,
492
+ 993,
493
+ 775,
494
+ 197
495
+ ],
496
+ [
497
+ 893,
498
+ 561,
499
+ 863,
500
+ 443
501
+ ],
502
+ [
503
+ 92,
504
+ 698,
505
+ 743,
506
+ 898
507
+ ],
508
+ [
509
+ 793,
510
+ 760,
511
+ 708,
512
+ 894
513
+ ],
514
+ [
515
+ 548,
516
+ 781,
517
+ 487,
518
+ 778
519
+ ],
520
+ [
521
+ 289,
522
+ 825,
523
+ 321,
524
+ 680
525
+ ],
526
+ [
527
+ 628,
528
+ 99,
529
+ 912,
530
+ 861
531
+ ],
532
+ [
533
+ 627,
534
+ 365,
535
+ 475,
536
+ 983
537
+ ],
538
+ [
539
+ 669,
540
+ 682,
541
+ 681,
542
+ 685
543
+ ],
544
+ [
545
+ 914,
546
+ 155,
547
+ 752,
548
+ 928
549
+ ],
550
+ [
551
+ 649,
552
+ 197,
553
+ 921,
554
+ 936
555
+ ],
556
+ [
557
+ 135,
558
+ 608,
559
+ 32,
560
+ 184
561
+ ],
562
+ [
563
+ 270,
564
+ 860,
565
+ 434,
566
+ 622
567
+ ],
568
+ [
569
+ 815,
570
+ 345,
571
+ 501,
572
+ 174
573
+ ],
574
+ [
575
+ 819,
576
+ 905,
577
+ 643,
578
+ 337
579
+ ],
580
+ [
581
+ 644,
582
+ 450,
583
+ 22,
584
+ 866
585
+ ],
586
+ [
587
+ 120,
588
+ 353,
589
+ 623,
590
+ 970
591
+ ],
592
+ [
593
+ 458,
594
+ 881,
595
+ 872,
596
+ 854
597
+ ],
598
+ [
599
+ 547,
600
+ 833,
601
+ 855,
602
+ 274
603
+ ],
604
+ [
605
+ 121,
606
+ 465,
607
+ 388,
608
+ 270
609
+ ],
610
+ [
611
+ 175,
612
+ 9,
613
+ 815,
614
+ 644
615
+ ],
616
+ [
617
+ 157,
618
+ 329,
619
+ 216,
620
+ 495
621
+ ],
622
+ [
623
+ 398,
624
+ 785,
625
+ 529,
626
+ 219
627
+ ],
628
+ [
629
+ 896,
630
+ 70,
631
+ 244,
632
+ 460
633
+ ],
634
+ [
635
+ 943,
636
+ 16,
637
+ 568,
638
+ 861
639
+ ],
640
+ [
641
+ 363,
642
+ 626,
643
+ 973,
644
+ 297
645
+ ],
646
+ [
647
+ 397,
648
+ 44,
649
+ 92,
650
+ 179
651
+ ],
652
+ [
653
+ 494,
654
+ 337,
655
+ 729,
656
+ 899
657
+ ],
658
+ [
659
+ 750,
660
+ 204,
661
+ 840,
662
+ 122
663
+ ],
664
+ [
665
+ 37,
666
+ 69,
667
+ 68,
668
+ 202
669
+ ],
670
+ [
671
+ 452,
672
+ 554,
673
+ 248,
674
+ 932
675
+ ],
676
+ [
677
+ 540,
678
+ 205,
679
+ 629,
680
+ 908
681
+ ],
682
+ [
683
+ 756,
684
+ 75,
685
+ 973,
686
+ 522
687
+ ],
688
+ [
689
+ 60,
690
+ 376,
691
+ 810,
692
+ 889
693
+ ],
694
+ [
695
+ 351,
696
+ 800,
697
+ 930,
698
+ 468
699
+ ],
700
+ [
701
+ 352,
702
+ 38,
703
+ 789,
704
+ 921
705
+ ],
706
+ [
707
+ 929,
708
+ 956,
709
+ 909,
710
+ 637
711
+ ],
712
+ [
713
+ 246,
714
+ 782,
715
+ 974,
716
+ 862
717
+ ],
718
+ [
719
+ 495,
720
+ 271,
721
+ 475,
722
+ 792
723
+ ],
724
+ [
725
+ 106,
726
+ 937,
727
+ 243,
728
+ 893
729
+ ],
730
+ [
731
+ 922,
732
+ 373,
733
+ 956,
734
+ 174
735
+ ],
736
+ [
737
+ 177,
738
+ 888,
739
+ 611,
740
+ 889
741
+ ],
742
+ [
743
+ 963,
744
+ 900,
745
+ 153,
746
+ 746
747
+ ],
748
+ [
749
+ 395,
750
+ 241,
751
+ 550,
752
+ 511
753
+ ],
754
+ [
755
+ 202,
756
+ 381,
757
+ 700,
758
+ 813
759
+ ],
760
+ [
761
+ 471,
762
+ 848,
763
+ 331,
764
+ 233
765
+ ],
766
+ [
767
+ 299,
768
+ 516,
769
+ 910,
770
+ 497
771
+ ],
772
+ [
773
+ 293,
774
+ 893,
775
+ 784,
776
+ 818
777
+ ],
778
+ [
779
+ 773,
780
+ 926,
781
+ 287,
782
+ 688
783
+ ],
784
+ [
785
+ 306,
786
+ 905,
787
+ 694,
788
+ 439
789
+ ],
790
+ [
791
+ 682,
792
+ 877,
793
+ 886,
794
+ 511
795
+ ],
796
+ [
797
+ 195,
798
+ 345,
799
+ 401,
800
+ 347
801
+ ],
802
+ [
803
+ 271,
804
+ 770,
805
+ 84,
806
+ 390
807
+ ],
808
+ [
809
+ 22,
810
+ 618,
811
+ 595,
812
+ 346
813
+ ],
814
+ [
815
+ 71,
816
+ 681,
817
+ 146,
818
+ 363
819
+ ],
820
+ [
821
+ 604,
822
+ 486,
823
+ 669,
824
+ 940
825
+ ],
826
+ [
827
+ 980,
828
+ 817,
829
+ 838,
830
+ 256
831
+ ],
832
+ [
833
+ 691,
834
+ 613,
835
+ 458,
836
+ 474
837
+ ],
838
+ [
839
+ 820,
840
+ 763,
841
+ 708,
842
+ 892
843
+ ],
844
+ [
845
+ 671,
846
+ 452,
847
+ 760,
848
+ 971
849
+ ],
850
+ [
851
+ 654,
852
+ 336,
853
+ 997,
854
+ 846
855
+ ],
856
+ [
857
+ 806,
858
+ 950,
859
+ 694,
860
+ 859
861
+ ],
862
+ [
863
+ 309,
864
+ 886,
865
+ 76,
866
+ 430
867
+ ],
868
+ [
869
+ 74,
870
+ 739,
871
+ 871,
872
+ 749
873
+ ],
874
+ [
875
+ 510,
876
+ 149,
877
+ 846,
878
+ 818
879
+ ],
880
+ [
881
+ 361,
882
+ 518,
883
+ 497,
884
+ 330
885
+ ],
886
+ [
887
+ 586,
888
+ 159,
889
+ 975,
890
+ 105
891
+ ],
892
+ [
893
+ 548,
894
+ 662,
895
+ 963,
896
+ 595
897
+ ],
898
+ [
899
+ 856,
900
+ 194,
901
+ 657,
902
+ 616
903
+ ]
904
+ ],
905
+ 949
906
+ ],
907
+ "output": []
908
+ },
909
+ {
910
+ "input": [
911
+ [
912
+ [
913
+ 81,
914
+ 172,
915
+ 816,
916
+ 189
917
+ ],
918
+ [
919
+ 809,
920
+ 835,
921
+ 516,
922
+ 976
923
+ ],
924
+ [
925
+ 397,
926
+ 971,
927
+ 139,
928
+ 93
929
+ ],
930
+ [
931
+ 681,
932
+ 583,
933
+ 211,
934
+ 893
935
+ ],
936
+ [
937
+ 280,
938
+ 14,
939
+ 944,
940
+ 299
941
+ ],
942
+ [
943
+ 376,
944
+ 487,
945
+ 547,
946
+ 109
947
+ ],
948
+ [
949
+ 967,
950
+ 509,
951
+ 844,
952
+ 522
953
+ ],
954
+ [
955
+ 50,
956
+ 465,
957
+ 477,
958
+ 439
959
+ ],
960
+ [
961
+ 816,
962
+ 204,
963
+ 858,
964
+ 24
965
+ ],
966
+ [
967
+ 909,
968
+ 456,
969
+ 252,
970
+ 478
971
+ ],
972
+ [
973
+ 696,
974
+ 242,
975
+ 935,
976
+ 324
977
+ ],
978
+ [
979
+ 917,
980
+ 999,
981
+ 174,
982
+ 120
983
+ ],
984
+ [
985
+ 852,
986
+ 237,
987
+ 834,
988
+ 506
989
+ ],
990
+ [
991
+ 296,
992
+ 5,
993
+ 111,
994
+ 748
995
+ ],
996
+ [
997
+ 706,
998
+ 607,
999
+ 470,
1000
+ 176
1001
+ ],
1002
+ [
1003
+ 511,
1004
+ 3,
1005
+ 181,
1006
+ 780
1007
+ ],
1008
+ [
1009
+ 104,
1010
+ 121,
1011
+ 815,
1012
+ 559
1013
+ ],
1014
+ [
1015
+ 30,
1016
+ 888,
1017
+ 987,
1018
+ 809
1019
+ ],
1020
+ [
1021
+ 980,
1022
+ 646,
1023
+ 68,
1024
+ 621
1025
+ ],
1026
+ [
1027
+ 151,
1028
+ 159,
1029
+ 847,
1030
+ 511
1031
+ ],
1032
+ [
1033
+ 216,
1034
+ 153,
1035
+ 524,
1036
+ 81
1037
+ ],
1038
+ [
1039
+ 232,
1040
+ 344,
1041
+ 443,
1042
+ 608
1043
+ ],
1044
+ [
1045
+ 613,
1046
+ 48,
1047
+ 987,
1048
+ 567
1049
+ ],
1050
+ [
1051
+ 482,
1052
+ 734,
1053
+ 352,
1054
+ 296
1055
+ ],
1056
+ [
1057
+ 150,
1058
+ 54,
1059
+ 779,
1060
+ 387
1061
+ ],
1062
+ [
1063
+ 53,
1064
+ 208,
1065
+ 939,
1066
+ 212
1067
+ ],
1068
+ [
1069
+ 999,
1070
+ 667,
1071
+ 907,
1072
+ 712
1073
+ ],
1074
+ [
1075
+ 527,
1076
+ 974,
1077
+ 693,
1078
+ 275
1079
+ ],
1080
+ [
1081
+ 589,
1082
+ 415,
1083
+ 593,
1084
+ 251
1085
+ ],
1086
+ [
1087
+ 817,
1088
+ 108,
1089
+ 592,
1090
+ 653
1091
+ ],
1092
+ [
1093
+ 925,
1094
+ 383,
1095
+ 642,
1096
+ 863
1097
+ ],
1098
+ [
1099
+ 409,
1100
+ 263,
1101
+ 441,
1102
+ 288
1103
+ ],
1104
+ [
1105
+ 524,
1106
+ 586,
1107
+ 918,
1108
+ 266
1109
+ ],
1110
+ [
1111
+ 248,
1112
+ 923,
1113
+ 220,
1114
+ 764
1115
+ ],
1116
+ [
1117
+ 936,
1118
+ 616,
1119
+ 521,
1120
+ 106
1121
+ ],
1122
+ [
1123
+ 599,
1124
+ 688,
1125
+ 72,
1126
+ 819
1127
+ ],
1128
+ [
1129
+ 762,
1130
+ 876,
1131
+ 429,
1132
+ 494
1133
+ ],
1134
+ [
1135
+ 353,
1136
+ 724,
1137
+ 774,
1138
+ 394
1139
+ ],
1140
+ [
1141
+ 449,
1142
+ 376,
1143
+ 358,
1144
+ 861
1145
+ ],
1146
+ [
1147
+ 223,
1148
+ 743,
1149
+ 609,
1150
+ 507
1151
+ ],
1152
+ [
1153
+ 279,
1154
+ 890,
1155
+ 182,
1156
+ 381
1157
+ ],
1158
+ [
1159
+ 407,
1160
+ 227,
1161
+ 318,
1162
+ 292
1163
+ ],
1164
+ [
1165
+ 282,
1166
+ 543,
1167
+ 533,
1168
+ 892
1169
+ ],
1170
+ [
1171
+ 821,
1172
+ 464,
1173
+ 352,
1174
+ 213
1175
+ ],
1176
+ [
1177
+ 294,
1178
+ 289,
1179
+ 509,
1180
+ 759
1181
+ ]
1182
+ ],
1183
+ 957
1184
+ ],
1185
+ "output": []
1186
+ },
1187
+ {
1188
+ "input": [
1189
+ [
1190
+ [
1191
+ 6,
1192
+ 114,
1193
+ 977,
1194
+ 509
1195
+ ],
1196
+ [
1197
+ 992,
1198
+ 896,
1199
+ 940,
1200
+ 360
1201
+ ],
1202
+ [
1203
+ 108,
1204
+ 232,
1205
+ 245,
1206
+ 708
1207
+ ],
1208
+ [
1209
+ 839,
1210
+ 994,
1211
+ 876,
1212
+ 132
1213
+ ],
1214
+ [
1215
+ 322,
1216
+ 274,
1217
+ 923,
1218
+ 515
1219
+ ],
1220
+ [
1221
+ 269,
1222
+ 439,
1223
+ 946,
1224
+ 817
1225
+ ],
1226
+ [
1227
+ 495,
1228
+ 776,
1229
+ 365,
1230
+ 373
1231
+ ],
1232
+ [
1233
+ 28,
1234
+ 782,
1235
+ 83,
1236
+ 118
1237
+ ],
1238
+ [
1239
+ 979,
1240
+ 942,
1241
+ 907,
1242
+ 111
1243
+ ],
1244
+ [
1245
+ 332,
1246
+ 664,
1247
+ 757,
1248
+ 833
1249
+ ],
1250
+ [
1251
+ 885,
1252
+ 939,
1253
+ 68,
1254
+ 113
1255
+ ],
1256
+ [
1257
+ 100,
1258
+ 104,
1259
+ 441,
1260
+ 578
1261
+ ],
1262
+ [
1263
+ 769,
1264
+ 192,
1265
+ 680,
1266
+ 494
1267
+ ],
1268
+ [
1269
+ 169,
1270
+ 51,
1271
+ 884,
1272
+ 261
1273
+ ],
1274
+ [
1275
+ 88,
1276
+ 60,
1277
+ 678,
1278
+ 51
1279
+ ],
1280
+ [
1281
+ 600,
1282
+ 260,
1283
+ 945,
1284
+ 893
1285
+ ],
1286
+ [
1287
+ 578,
1288
+ 223,
1289
+ 333,
1290
+ 561
1291
+ ],
1292
+ [
1293
+ 209,
1294
+ 752,
1295
+ 843,
1296
+ 166
1297
+ ],
1298
+ [
1299
+ 880,
1300
+ 569,
1301
+ 698,
1302
+ 597
1303
+ ],
1304
+ [
1305
+ 329,
1306
+ 525,
1307
+ 407,
1308
+ 1
1309
+ ],
1310
+ [
1311
+ 431,
1312
+ 192,
1313
+ 711,
1314
+ 50
1315
+ ],
1316
+ [
1317
+ 37,
1318
+ 855,
1319
+ 590,
1320
+ 473
1321
+ ],
1322
+ [
1323
+ 935,
1324
+ 795,
1325
+ 85,
1326
+ 290
1327
+ ],
1328
+ [
1329
+ 674,
1330
+ 556,
1331
+ 171,
1332
+ 211
1333
+ ],
1334
+ [
1335
+ 825,
1336
+ 850,
1337
+ 418,
1338
+ 517
1339
+ ],
1340
+ [
1341
+ 555,
1342
+ 737,
1343
+ 950,
1344
+ 132
1345
+ ],
1346
+ [
1347
+ 405,
1348
+ 203,
1349
+ 554,
1350
+ 263
1351
+ ],
1352
+ [
1353
+ 359,
1354
+ 170,
1355
+ 215,
1356
+ 258
1357
+ ],
1358
+ [
1359
+ 381,
1360
+ 593,
1361
+ 785,
1362
+ 679
1363
+ ],
1364
+ [
1365
+ 153,
1366
+ 704,
1367
+ 754,
1368
+ 957
1369
+ ],
1370
+ [
1371
+ 919,
1372
+ 758,
1373
+ 73,
1374
+ 131
1375
+ ],
1376
+ [
1377
+ 209,
1378
+ 121,
1379
+ 633,
1380
+ 452
1381
+ ],
1382
+ [
1383
+ 850,
1384
+ 903,
1385
+ 831,
1386
+ 189
1387
+ ],
1388
+ [
1389
+ 756,
1390
+ 405,
1391
+ 232,
1392
+ 235
1393
+ ],
1394
+ [
1395
+ 254,
1396
+ 574,
1397
+ 70,
1398
+ 107
1399
+ ],
1400
+ [
1401
+ 985,
1402
+ 221,
1403
+ 949,
1404
+ 601
1405
+ ],
1406
+ [
1407
+ 671,
1408
+ 449,
1409
+ 108,
1410
+ 913
1411
+ ],
1412
+ [
1413
+ 290,
1414
+ 917,
1415
+ 148,
1416
+ 391
1417
+ ],
1418
+ [
1419
+ 871,
1420
+ 77,
1421
+ 224,
1422
+ 852
1423
+ ],
1424
+ [
1425
+ 7,
1426
+ 41,
1427
+ 760,
1428
+ 862
1429
+ ],
1430
+ [
1431
+ 205,
1432
+ 212,
1433
+ 549,
1434
+ 576
1435
+ ],
1436
+ [
1437
+ 791,
1438
+ 683,
1439
+ 877,
1440
+ 501
1441
+ ],
1442
+ [
1443
+ 128,
1444
+ 808,
1445
+ 94,
1446
+ 594
1447
+ ],
1448
+ [
1449
+ 684,
1450
+ 588,
1451
+ 547,
1452
+ 118
1453
+ ],
1454
+ [
1455
+ 708,
1456
+ 724,
1457
+ 428,
1458
+ 997
1459
+ ],
1460
+ [
1461
+ 1,
1462
+ 515,
1463
+ 617,
1464
+ 413
1465
+ ],
1466
+ [
1467
+ 689,
1468
+ 970,
1469
+ 677,
1470
+ 288
1471
+ ],
1472
+ [
1473
+ 796,
1474
+ 841,
1475
+ 983,
1476
+ 774
1477
+ ],
1478
+ [
1479
+ 854,
1480
+ 842,
1481
+ 649,
1482
+ 972
1483
+ ],
1484
+ [
1485
+ 318,
1486
+ 13,
1487
+ 692,
1488
+ 791
1489
+ ],
1490
+ [
1491
+ 514,
1492
+ 801,
1493
+ 601,
1494
+ 835
1495
+ ],
1496
+ [
1497
+ 431,
1498
+ 810,
1499
+ 912,
1500
+ 183
1501
+ ],
1502
+ [
1503
+ 778,
1504
+ 552,
1505
+ 326,
1506
+ 620
1507
+ ],
1508
+ [
1509
+ 627,
1510
+ 343,
1511
+ 412,
1512
+ 901
1513
+ ],
1514
+ [
1515
+ 380,
1516
+ 264,
1517
+ 962,
1518
+ 825
1519
+ ],
1520
+ [
1521
+ 72,
1522
+ 869,
1523
+ 314,
1524
+ 356
1525
+ ],
1526
+ [
1527
+ 479,
1528
+ 701,
1529
+ 720,
1530
+ 380
1531
+ ],
1532
+ [
1533
+ 23,
1534
+ 52,
1535
+ 949,
1536
+ 882
1537
+ ],
1538
+ [
1539
+ 67,
1540
+ 648,
1541
+ 120,
1542
+ 709
1543
+ ],
1544
+ [
1545
+ 814,
1546
+ 251,
1547
+ 484,
1548
+ 453
1549
+ ],
1550
+ [
1551
+ 482,
1552
+ 903,
1553
+ 374,
1554
+ 308
1555
+ ],
1556
+ [
1557
+ 215,
1558
+ 393,
1559
+ 68,
1560
+ 708
1561
+ ],
1562
+ [
1563
+ 432,
1564
+ 689,
1565
+ 907,
1566
+ 548
1567
+ ],
1568
+ [
1569
+ 857,
1570
+ 652,
1571
+ 902,
1572
+ 652
1573
+ ],
1574
+ [
1575
+ 421,
1576
+ 413,
1577
+ 237,
1578
+ 5
1579
+ ],
1580
+ [
1581
+ 182,
1582
+ 165,
1583
+ 186,
1584
+ 942
1585
+ ],
1586
+ [
1587
+ 314,
1588
+ 622,
1589
+ 884,
1590
+ 857
1591
+ ],
1592
+ [
1593
+ 202,
1594
+ 236,
1595
+ 606,
1596
+ 575
1597
+ ],
1598
+ [
1599
+ 564,
1600
+ 55,
1601
+ 87,
1602
+ 474
1603
+ ],
1604
+ [
1605
+ 19,
1606
+ 759,
1607
+ 536,
1608
+ 282
1609
+ ],
1610
+ [
1611
+ 796,
1612
+ 1000,
1613
+ 689,
1614
+ 798
1615
+ ],
1616
+ [
1617
+ 484,
1618
+ 868,
1619
+ 402,
1620
+ 964
1621
+ ],
1622
+ [
1623
+ 272,
1624
+ 713,
1625
+ 258,
1626
+ 838
1627
+ ],
1628
+ [
1629
+ 523,
1630
+ 957,
1631
+ 746,
1632
+ 397
1633
+ ],
1634
+ [
1635
+ 665,
1636
+ 948,
1637
+ 815,
1638
+ 727
1639
+ ],
1640
+ [
1641
+ 267,
1642
+ 594,
1643
+ 16,
1644
+ 190
1645
+ ],
1646
+ [
1647
+ 969,
1648
+ 604,
1649
+ 257,
1650
+ 608
1651
+ ],
1652
+ [
1653
+ 985,
1654
+ 956,
1655
+ 429,
1656
+ 633
1657
+ ],
1658
+ [
1659
+ 916,
1660
+ 717,
1661
+ 532,
1662
+ 947
1663
+ ],
1664
+ [
1665
+ 701,
1666
+ 731,
1667
+ 143,
1668
+ 346
1669
+ ],
1670
+ [
1671
+ 541,
1672
+ 175,
1673
+ 216,
1674
+ 703
1675
+ ],
1676
+ [
1677
+ 557,
1678
+ 223,
1679
+ 184,
1680
+ 755
1681
+ ],
1682
+ [
1683
+ 641,
1684
+ 243,
1685
+ 833,
1686
+ 33
1687
+ ],
1688
+ [
1689
+ 217,
1690
+ 317,
1691
+ 296,
1692
+ 763
1693
+ ],
1694
+ [
1695
+ 608,
1696
+ 874,
1697
+ 70,
1698
+ 716
1699
+ ],
1700
+ [
1701
+ 392,
1702
+ 976,
1703
+ 115,
1704
+ 953
1705
+ ],
1706
+ [
1707
+ 209,
1708
+ 461,
1709
+ 42,
1710
+ 352
1711
+ ]
1712
+ ],
1713
+ 183
1714
+ ],
1715
+ "output": []
1716
+ },
1717
+ {
1718
+ "input": [
1719
+ [
1720
+ [
1721
+ 856,
1722
+ 748,
1723
+ 650,
1724
+ 124
1725
+ ],
1726
+ [
1727
+ 599,
1728
+ 74,
1729
+ 954,
1730
+ 720
1731
+ ],
1732
+ [
1733
+ 116,
1734
+ 112,
1735
+ 187,
1736
+ 459
1737
+ ],
1738
+ [
1739
+ 428,
1740
+ 787,
1741
+ 42,
1742
+ 243
1743
+ ],
1744
+ [
1745
+ 878,
1746
+ 169,
1747
+ 977,
1748
+ 267
1749
+ ],
1750
+ [
1751
+ 351,
1752
+ 952,
1753
+ 826,
1754
+ 534
1755
+ ],
1756
+ [
1757
+ 730,
1758
+ 760,
1759
+ 533,
1760
+ 507
1761
+ ],
1762
+ [
1763
+ 612,
1764
+ 167,
1765
+ 208,
1766
+ 56
1767
+ ],
1768
+ [
1769
+ 349,
1770
+ 752,
1771
+ 126,
1772
+ 743
1773
+ ],
1774
+ [
1775
+ 33,
1776
+ 575,
1777
+ 257,
1778
+ 955
1779
+ ],
1780
+ [
1781
+ 815,
1782
+ 571,
1783
+ 494,
1784
+ 987
1785
+ ],
1786
+ [
1787
+ 88,
1788
+ 322,
1789
+ 785,
1790
+ 329
1791
+ ],
1792
+ [
1793
+ 892,
1794
+ 795,
1795
+ 384,
1796
+ 496
1797
+ ],
1798
+ [
1799
+ 797,
1800
+ 873,
1801
+ 848,
1802
+ 768
1803
+ ]
1804
+ ],
1805
+ 407
1806
+ ],
1807
+ "output": []
1808
+ },
1809
+ {
1810
+ "input": [
1811
+ [
1812
+ [
1813
+ 14,
1814
+ 878,
1815
+ 402,
1816
+ 407
1817
+ ],
1818
+ [
1819
+ 119,
1820
+ 107,
1821
+ 486,
1822
+ 233
1823
+ ],
1824
+ [
1825
+ 125,
1826
+ 80,
1827
+ 792,
1828
+ 504
1829
+ ],
1830
+ [
1831
+ 736,
1832
+ 647,
1833
+ 638,
1834
+ 163
1835
+ ],
1836
+ [
1837
+ 327,
1838
+ 465,
1839
+ 694,
1840
+ 681
1841
+ ],
1842
+ [
1843
+ 211,
1844
+ 281,
1845
+ 165,
1846
+ 386
1847
+ ],
1848
+ [
1849
+ 367,
1850
+ 201,
1851
+ 826,
1852
+ 849
1853
+ ],
1854
+ [
1855
+ 863,
1856
+ 520,
1857
+ 722,
1858
+ 684
1859
+ ],
1860
+ [
1861
+ 355,
1862
+ 609,
1863
+ 311,
1864
+ 798
1865
+ ],
1866
+ [
1867
+ 834,
1868
+ 455,
1869
+ 902,
1870
+ 854
1871
+ ],
1872
+ [
1873
+ 588,
1874
+ 90,
1875
+ 135,
1876
+ 391
1877
+ ],
1878
+ [
1879
+ 413,
1880
+ 824,
1881
+ 59,
1882
+ 558
1883
+ ],
1884
+ [
1885
+ 893,
1886
+ 549,
1887
+ 420,
1888
+ 899
1889
+ ],
1890
+ [
1891
+ 75,
1892
+ 689,
1893
+ 403,
1894
+ 773
1895
+ ],
1896
+ [
1897
+ 903,
1898
+ 451,
1899
+ 775,
1900
+ 882
1901
+ ],
1902
+ [
1903
+ 355,
1904
+ 597,
1905
+ 223,
1906
+ 600
1907
+ ],
1908
+ [
1909
+ 494,
1910
+ 613,
1911
+ 819,
1912
+ 216
1913
+ ],
1914
+ [
1915
+ 52,
1916
+ 966,
1917
+ 966,
1918
+ 121
1919
+ ],
1920
+ [
1921
+ 70,
1922
+ 721,
1923
+ 779,
1924
+ 47
1925
+ ],
1926
+ [
1927
+ 865,
1928
+ 606,
1929
+ 604,
1930
+ 472
1931
+ ],
1932
+ [
1933
+ 110,
1934
+ 628,
1935
+ 751,
1936
+ 123
1937
+ ],
1938
+ [
1939
+ 692,
1940
+ 72,
1941
+ 982,
1942
+ 58
1943
+ ],
1944
+ [
1945
+ 205,
1946
+ 640,
1947
+ 791,
1948
+ 422
1949
+ ],
1950
+ [
1951
+ 984,
1952
+ 652,
1953
+ 511,
1954
+ 224
1955
+ ],
1956
+ [
1957
+ 806,
1958
+ 180,
1959
+ 445,
1960
+ 995
1961
+ ],
1962
+ [
1963
+ 430,
1964
+ 603,
1965
+ 598,
1966
+ 48
1967
+ ],
1968
+ [
1969
+ 175,
1970
+ 699,
1971
+ 700,
1972
+ 602
1973
+ ],
1974
+ [
1975
+ 661,
1976
+ 825,
1977
+ 406,
1978
+ 892
1979
+ ],
1980
+ [
1981
+ 58,
1982
+ 849,
1983
+ 434,
1984
+ 798
1985
+ ],
1986
+ [
1987
+ 870,
1988
+ 146,
1989
+ 948,
1990
+ 823
1991
+ ],
1992
+ [
1993
+ 512,
1994
+ 134,
1995
+ 216,
1996
+ 352
1997
+ ],
1998
+ [
1999
+ 610,
2000
+ 137,
2001
+ 125,
2002
+ 97
2003
+ ],
2004
+ [
2005
+ 711,
2006
+ 349,
2007
+ 103,
2008
+ 414
2009
+ ],
2010
+ [
2011
+ 895,
2012
+ 440,
2013
+ 653,
2014
+ 260
2015
+ ],
2016
+ [
2017
+ 609,
2018
+ 264,
2019
+ 3,
2020
+ 300
2021
+ ],
2022
+ [
2023
+ 981,
2024
+ 577,
2025
+ 365,
2026
+ 681
2027
+ ],
2028
+ [
2029
+ 41,
2030
+ 406,
2031
+ 773,
2032
+ 688
2033
+ ],
2034
+ [
2035
+ 222,
2036
+ 359,
2037
+ 450,
2038
+ 29
2039
+ ],
2040
+ [
2041
+ 354,
2042
+ 776,
2043
+ 679,
2044
+ 773
2045
+ ],
2046
+ [
2047
+ 975,
2048
+ 931,
2049
+ 142,
2050
+ 736
2051
+ ],
2052
+ [
2053
+ 135,
2054
+ 272,
2055
+ 914,
2056
+ 855
2057
+ ],
2058
+ [
2059
+ 883,
2060
+ 967,
2061
+ 239,
2062
+ 928
2063
+ ],
2064
+ [
2065
+ 900,
2066
+ 735,
2067
+ 587,
2068
+ 120
2069
+ ],
2070
+ [
2071
+ 515,
2072
+ 421,
2073
+ 809,
2074
+ 961
2075
+ ],
2076
+ [
2077
+ 863,
2078
+ 68,
2079
+ 310,
2080
+ 33
2081
+ ],
2082
+ [
2083
+ 709,
2084
+ 487,
2085
+ 972,
2086
+ 559
2087
+ ],
2088
+ [
2089
+ 132,
2090
+ 211,
2091
+ 686,
2092
+ 644
2093
+ ],
2094
+ [
2095
+ 828,
2096
+ 944,
2097
+ 653,
2098
+ 544
2099
+ ],
2100
+ [
2101
+ 17,
2102
+ 341,
2103
+ 781,
2104
+ 214
2105
+ ],
2106
+ [
2107
+ 187,
2108
+ 271,
2109
+ 354,
2110
+ 656
2111
+ ],
2112
+ [
2113
+ 1,
2114
+ 46,
2115
+ 897,
2116
+ 685
2117
+ ],
2118
+ [
2119
+ 549,
2120
+ 945,
2121
+ 952,
2122
+ 120
2123
+ ],
2124
+ [
2125
+ 535,
2126
+ 745,
2127
+ 438,
2128
+ 286
2129
+ ],
2130
+ [
2131
+ 348,
2132
+ 781,
2133
+ 265,
2134
+ 119
2135
+ ],
2136
+ [
2137
+ 627,
2138
+ 854,
2139
+ 993,
2140
+ 633
2141
+ ],
2142
+ [
2143
+ 21,
2144
+ 273,
2145
+ 451,
2146
+ 965
2147
+ ],
2148
+ [
2149
+ 346,
2150
+ 260,
2151
+ 623,
2152
+ 616
2153
+ ],
2154
+ [
2155
+ 9,
2156
+ 152,
2157
+ 906,
2158
+ 545
2159
+ ],
2160
+ [
2161
+ 455,
2162
+ 37,
2163
+ 410,
2164
+ 650
2165
+ ],
2166
+ [
2167
+ 300,
2168
+ 571,
2169
+ 685,
2170
+ 624
2171
+ ],
2172
+ [
2173
+ 982,
2174
+ 9,
2175
+ 26,
2176
+ 748
2177
+ ]
2178
+ ],
2179
+ 169
2180
+ ],
2181
+ "output": []
2182
+ }
2183
+ ],
2184
+ "haskell_template": "getGoodIndices :: [[Int]] -> Int -> [Int]\ngetGoodIndices variables target ",
2185
+ "ocaml_template": "let getGoodIndices (variables: int list list) (target: int) : int list = ",
2186
+ "scala_template": "def getGoodIndices(variables: List[List[Int]],target: Int): List[Int] = { \n \n}",
2187
+ "java_template": "class Solution {\n public List<Integer> getGoodIndices(int[][] variables, int target) {\n \n }\n}",
2188
+ "python_template": "class Solution(object):\n def getGoodIndices(self, variables, target):\n \"\"\"\n :type variables: List[List[int]]\n :type target: int\n :rtype: List[int]\n \"\"\"\n "
2189
+ }
double_modular_exponentiation/ocaml_tests/main.ml ADDED
@@ -0,0 +1,47 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ module Main = struct
3
+ open OUnit2
4
+
5
+ (* Program start *)
6
+
7
+ (* Program end *)
8
+
9
+ (* Test cases *)
10
+
11
+ let test1 _ = assert_equal [0;2] (getGoodIndices [[2;3;3;10];[3;3;3;1];[6;1;1;4]] 2)
12
+
13
+ let test2 _ = assert_equal [] (getGoodIndices [[39;3;1000;1000]] 17)
14
+
15
+ let test3 _ = assert_equal [] (getGoodIndices [[421; 377; 428; 165]; [974; 742; 692; 350]; [826; 560; 987; 757]] 143)
16
+
17
+ let test4 _ = assert_equal [] (getGoodIndices [[765; 245; 442; 420]; [531; 902; 782; 675]; [598; 622; 462; 829]; [519; 17; 285; 454]; [754; 818; 264; 34]; [267; 54; 632; 323]; [101; 332; 820; 72]; [76; 579; 390; 12]; [904; 523; 796; 307]; [821; 209; 540; 668]; [25; 603; 985; 140]; [213; 823; 566; 823]; [640; 78; 110; 6]; [329; 508; 158; 997]; [405; 840; 31; 104]; [814; 139; 138; 447]; [919; 935; 522; 626]; [49; 25; 510; 236]; [846; 119; 183; 956]; [272; 849; 513; 91]; [543; 726; 744; 269]; [316; 561; 932; 235]; [953; 843; 235; 320]; [381; 895; 788; 480]; [69; 477; 845; 383]; [270; 102; 830; 266]; [886; 406; 890; 315]; [392; 835; 522; 614]; [287; 313; 368; 775]; [558; 67; 693; 344]; [723; 564; 90; 381]; [950; 571; 341; 775]; [531; 909; 325; 713]; [165; 201; 661; 21]; [301; 689; 994; 518]; [501; 132; 116; 180]; [39; 232; 723; 753]; [646; 578; 353; 71]; [738; 287; 759; 385]; [777; 553; 68; 238]; [677; 13; 894; 297]; [723; 155; 139; 792]; [891; 272; 196; 568]; [156; 356; 185; 499]; [34; 756; 406; 15]; [190; 243; 107; 252]; [662; 547; 649; 666]; [363; 726; 406; 953]; [379; 496; 477; 453]; [552; 954; 484; 732]; [548; 238; 505; 45]; [113; 679; 987; 145]; [975; 463; 317; 692]; [746; 540; 632; 772]; [492; 257; 198; 980]; [802; 838; 416; 782]; [88; 315; 34; 395]] 942)
18
+
19
+ let test5 _ = assert_equal [] (getGoodIndices [[49; 533; 715; 737]; [924; 897; 615; 101]; [260; 131; 150; 918]; [339; 462; 654; 276]; [32; 767; 733; 978]; [67; 883; 686; 626]; [405; 321; 514; 716]; [632; 376; 761; 338]; [439; 1000; 156; 528]; [87; 697; 84; 393]; [684; 943; 837; 900]; [326; 341; 868; 841]; [142; 633; 342; 652]; [294; 39; 296; 997]; [35; 266; 62; 622]; [11; 993; 775; 197]; [893; 561; 863; 443]; [92; 698; 743; 898]; [793; 760; 708; 894]; [548; 781; 487; 778]; [289; 825; 321; 680]; [628; 99; 912; 861]; [627; 365; 475; 983]; [669; 682; 681; 685]; [914; 155; 752; 928]; [649; 197; 921; 936]; [135; 608; 32; 184]; [270; 860; 434; 622]; [815; 345; 501; 174]; [819; 905; 643; 337]; [644; 450; 22; 866]; [120; 353; 623; 970]; [458; 881; 872; 854]; [547; 833; 855; 274]; [121; 465; 388; 270]; [175; 9; 815; 644]; [157; 329; 216; 495]; [398; 785; 529; 219]; [896; 70; 244; 460]; [943; 16; 568; 861]; [363; 626; 973; 297]; [397; 44; 92; 179]; [494; 337; 729; 899]; [750; 204; 840; 122]; [37; 69; 68; 202]; [452; 554; 248; 932]; [540; 205; 629; 908]; [756; 75; 973; 522]; [60; 376; 810; 889]; [351; 800; 930; 468]; [352; 38; 789; 921]; [929; 956; 909; 637]; [246; 782; 974; 862]; [495; 271; 475; 792]; [106; 937; 243; 893]; [922; 373; 956; 174]; [177; 888; 611; 889]; [963; 900; 153; 746]; [395; 241; 550; 511]; [202; 381; 700; 813]; [471; 848; 331; 233]; [299; 516; 910; 497]; [293; 893; 784; 818]; [773; 926; 287; 688]; [306; 905; 694; 439]; [682; 877; 886; 511]; [195; 345; 401; 347]; [271; 770; 84; 390]; [22; 618; 595; 346]; [71; 681; 146; 363]; [604; 486; 669; 940]; [980; 817; 838; 256]; [691; 613; 458; 474]; [820; 763; 708; 892]; [671; 452; 760; 971]; [654; 336; 997; 846]; [806; 950; 694; 859]; [309; 886; 76; 430]; [74; 739; 871; 749]; [510; 149; 846; 818]; [361; 518; 497; 330]; [586; 159; 975; 105]; [548; 662; 963; 595]; [856; 194; 657; 616]] 949)
20
+
21
+ let test6 _ = assert_equal [] (getGoodIndices [[81; 172; 816; 189]; [809; 835; 516; 976]; [397; 971; 139; 93]; [681; 583; 211; 893]; [280; 14; 944; 299]; [376; 487; 547; 109]; [967; 509; 844; 522]; [50; 465; 477; 439]; [816; 204; 858; 24]; [909; 456; 252; 478]; [696; 242; 935; 324]; [917; 999; 174; 120]; [852; 237; 834; 506]; [296; 5; 111; 748]; [706; 607; 470; 176]; [511; 3; 181; 780]; [104; 121; 815; 559]; [30; 888; 987; 809]; [980; 646; 68; 621]; [151; 159; 847; 511]; [216; 153; 524; 81]; [232; 344; 443; 608]; [613; 48; 987; 567]; [482; 734; 352; 296]; [150; 54; 779; 387]; [53; 208; 939; 212]; [999; 667; 907; 712]; [527; 974; 693; 275]; [589; 415; 593; 251]; [817; 108; 592; 653]; [925; 383; 642; 863]; [409; 263; 441; 288]; [524; 586; 918; 266]; [248; 923; 220; 764]; [936; 616; 521; 106]; [599; 688; 72; 819]; [762; 876; 429; 494]; [353; 724; 774; 394]; [449; 376; 358; 861]; [223; 743; 609; 507]; [279; 890; 182; 381]; [407; 227; 318; 292]; [282; 543; 533; 892]; [821; 464; 352; 213]; [294; 289; 509; 759]] 957)
22
+
23
+ let test7 _ = assert_equal [] (getGoodIndices [[6; 114; 977; 509]; [992; 896; 940; 360]; [108; 232; 245; 708]; [839; 994; 876; 132]; [322; 274; 923; 515]; [269; 439; 946; 817]; [495; 776; 365; 373]; [28; 782; 83; 118]; [979; 942; 907; 111]; [332; 664; 757; 833]; [885; 939; 68; 113]; [100; 104; 441; 578]; [769; 192; 680; 494]; [169; 51; 884; 261]; [88; 60; 678; 51]; [600; 260; 945; 893]; [578; 223; 333; 561]; [209; 752; 843; 166]; [880; 569; 698; 597]; [329; 525; 407; 1]; [431; 192; 711; 50]; [37; 855; 590; 473]; [935; 795; 85; 290]; [674; 556; 171; 211]; [825; 850; 418; 517]; [555; 737; 950; 132]; [405; 203; 554; 263]; [359; 170; 215; 258]; [381; 593; 785; 679]; [153; 704; 754; 957]; [919; 758; 73; 131]; [209; 121; 633; 452]; [850; 903; 831; 189]; [756; 405; 232; 235]; [254; 574; 70; 107]; [985; 221; 949; 601]; [671; 449; 108; 913]; [290; 917; 148; 391]; [871; 77; 224; 852]; [7; 41; 760; 862]; [205; 212; 549; 576]; [791; 683; 877; 501]; [128; 808; 94; 594]; [684; 588; 547; 118]; [708; 724; 428; 997]; [1; 515; 617; 413]; [689; 970; 677; 288]; [796; 841; 983; 774]; [854; 842; 649; 972]; [318; 13; 692; 791]; [514; 801; 601; 835]; [431; 810; 912; 183]; [778; 552; 326; 620]; [627; 343; 412; 901]; [380; 264; 962; 825]; [72; 869; 314; 356]; [479; 701; 720; 380]; [23; 52; 949; 882]; [67; 648; 120; 709]; [814; 251; 484; 453]; [482; 903; 374; 308]; [215; 393; 68; 708]; [432; 689; 907; 548]; [857; 652; 902; 652]; [421; 413; 237; 5]; [182; 165; 186; 942]; [314; 622; 884; 857]; [202; 236; 606; 575]; [564; 55; 87; 474]; [19; 759; 536; 282]; [796; 1000; 689; 798]; [484; 868; 402; 964]; [272; 713; 258; 838]; [523; 957; 746; 397]; [665; 948; 815; 727]; [267; 594; 16; 190]; [969; 604; 257; 608]; [985; 956; 429; 633]; [916; 717; 532; 947]; [701; 731; 143; 346]; [541; 175; 216; 703]; [557; 223; 184; 755]; [641; 243; 833; 33]; [217; 317; 296; 763]; [608; 874; 70; 716]; [392; 976; 115; 953]; [209; 461; 42; 352]] 183)
24
+
25
+ let test8 _ = assert_equal [] (getGoodIndices [[856; 748; 650; 124]; [599; 74; 954; 720]; [116; 112; 187; 459]; [428; 787; 42; 243]; [878; 169; 977; 267]; [351; 952; 826; 534]; [730; 760; 533; 507]; [612; 167; 208; 56]; [349; 752; 126; 743]; [33; 575; 257; 955]; [815; 571; 494; 987]; [88; 322; 785; 329]; [892; 795; 384; 496]; [797; 873; 848; 768]] 407)
26
+
27
+ let test9 _ = assert_equal [] (getGoodIndices [[14; 878; 402; 407]; [119; 107; 486; 233]; [125; 80; 792; 504]; [736; 647; 638; 163]; [327; 465; 694; 681]; [211; 281; 165; 386]; [367; 201; 826; 849]; [863; 520; 722; 684]; [355; 609; 311; 798]; [834; 455; 902; 854]; [588; 90; 135; 391]; [413; 824; 59; 558]; [893; 549; 420; 899]; [75; 689; 403; 773]; [903; 451; 775; 882]; [355; 597; 223; 600]; [494; 613; 819; 216]; [52; 966; 966; 121]; [70; 721; 779; 47]; [865; 606; 604; 472]; [110; 628; 751; 123]; [692; 72; 982; 58]; [205; 640; 791; 422]; [984; 652; 511; 224]; [806; 180; 445; 995]; [430; 603; 598; 48]; [175; 699; 700; 602]; [661; 825; 406; 892]; [58; 849; 434; 798]; [870; 146; 948; 823]; [512; 134; 216; 352]; [610; 137; 125; 97]; [711; 349; 103; 414]; [895; 440; 653; 260]; [609; 264; 3; 300]; [981; 577; 365; 681]; [41; 406; 773; 688]; [222; 359; 450; 29]; [354; 776; 679; 773]; [975; 931; 142; 736]; [135; 272; 914; 855]; [883; 967; 239; 928]; [900; 735; 587; 120]; [515; 421; 809; 961]; [863; 68; 310; 33]; [709; 487; 972; 559]; [132; 211; 686; 644]; [828; 944; 653; 544]; [17; 341; 781; 214]; [187; 271; 354; 656]; [1; 46; 897; 685]; [549; 945; 952; 120]; [535; 745; 438; 286]; [348; 781; 265; 119]; [627; 854; 993; 633]; [21; 273; 451; 965]; [346; 260; 623; 616]; [9; 152; 906; 545]; [455; 37; 410; 650]; [300; 571; 685; 624]; [982; 9; 26; 748]] 169)
28
+
29
+
30
+ (* Grouping test cases *)
31
+ let suite = "Test Suite for getGoodIndices" >::: [
32
+
33
+ "test1" >:: test1;
34
+ "test2" >:: test2;
35
+ "test3" >:: test3;
36
+ "test4" >:: test4;
37
+ "test5" >:: test5;
38
+ "test6" >:: test6;
39
+ "test7" >:: test7;
40
+ "test8" >:: test8;
41
+ "test9" >:: test9;
42
+ ]
43
+
44
+
45
+ (* Running the tests *)
46
+ let () = run_test_tt_main suite
47
+ end
double_modular_exponentiation/scala_tests/MySuite.scala ADDED
@@ -0,0 +1,40 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ class MySuite extends munit.FunSuite {
3
+
4
+ test("test1") {
5
+ assertEquals(Main.getGoodIndices(List(List(2,3,3,10),List(3,3,3,1),List(6,1,1,4)),2), List(0,2))
6
+ }
7
+
8
+ test("test2") {
9
+ assertEquals(Main.getGoodIndices(List(List(39,3,1000,1000)),17), List())
10
+ }
11
+
12
+ test("test3") {
13
+ assertEquals(Main.getGoodIndices(List(List(421, 377, 428, 165), List(974, 742, 692, 350), List(826, 560, 987, 757)),143), List())
14
+ }
15
+
16
+ test("test4") {
17
+ assertEquals(Main.getGoodIndices(List(List(765, 245, 442, 420), List(531, 902, 782, 675), List(598, 622, 462, 829), List(519, 17, 285, 454), List(754, 818, 264, 34), List(267, 54, 632, 323), List(101, 332, 820, 72), List(76, 579, 390, 12), List(904, 523, 796, 307), List(821, 209, 540, 668), List(25, 603, 985, 140), List(213, 823, 566, 823), List(640, 78, 110, 6), List(329, 508, 158, 997), List(405, 840, 31, 104), List(814, 139, 138, 447), List(919, 935, 522, 626), List(49, 25, 510, 236), List(846, 119, 183, 956), List(272, 849, 513, 91), List(543, 726, 744, 269), List(316, 561, 932, 235), List(953, 843, 235, 320), List(381, 895, 788, 480), List(69, 477, 845, 383), List(270, 102, 830, 266), List(886, 406, 890, 315), List(392, 835, 522, 614), List(287, 313, 368, 775), List(558, 67, 693, 344), List(723, 564, 90, 381), List(950, 571, 341, 775), List(531, 909, 325, 713), List(165, 201, 661, 21), List(301, 689, 994, 518), List(501, 132, 116, 180), List(39, 232, 723, 753), List(646, 578, 353, 71), List(738, 287, 759, 385), List(777, 553, 68, 238), List(677, 13, 894, 297), List(723, 155, 139, 792), List(891, 272, 196, 568), List(156, 356, 185, 499), List(34, 756, 406, 15), List(190, 243, 107, 252), List(662, 547, 649, 666), List(363, 726, 406, 953), List(379, 496, 477, 453), List(552, 954, 484, 732), List(548, 238, 505, 45), List(113, 679, 987, 145), List(975, 463, 317, 692), List(746, 540, 632, 772), List(492, 257, 198, 980), List(802, 838, 416, 782), List(88, 315, 34, 395)),942), List())
18
+ }
19
+
20
+ test("test5") {
21
+ assertEquals(Main.getGoodIndices(List(List(49, 533, 715, 737), List(924, 897, 615, 101), List(260, 131, 150, 918), List(339, 462, 654, 276), List(32, 767, 733, 978), List(67, 883, 686, 626), List(405, 321, 514, 716), List(632, 376, 761, 338), List(439, 1000, 156, 528), List(87, 697, 84, 393), List(684, 943, 837, 900), List(326, 341, 868, 841), List(142, 633, 342, 652), List(294, 39, 296, 997), List(35, 266, 62, 622), List(11, 993, 775, 197), List(893, 561, 863, 443), List(92, 698, 743, 898), List(793, 760, 708, 894), List(548, 781, 487, 778), List(289, 825, 321, 680), List(628, 99, 912, 861), List(627, 365, 475, 983), List(669, 682, 681, 685), List(914, 155, 752, 928), List(649, 197, 921, 936), List(135, 608, 32, 184), List(270, 860, 434, 622), List(815, 345, 501, 174), List(819, 905, 643, 337), List(644, 450, 22, 866), List(120, 353, 623, 970), List(458, 881, 872, 854), List(547, 833, 855, 274), List(121, 465, 388, 270), List(175, 9, 815, 644), List(157, 329, 216, 495), List(398, 785, 529, 219), List(896, 70, 244, 460), List(943, 16, 568, 861), List(363, 626, 973, 297), List(397, 44, 92, 179), List(494, 337, 729, 899), List(750, 204, 840, 122), List(37, 69, 68, 202), List(452, 554, 248, 932), List(540, 205, 629, 908), List(756, 75, 973, 522), List(60, 376, 810, 889), List(351, 800, 930, 468), List(352, 38, 789, 921), List(929, 956, 909, 637), List(246, 782, 974, 862), List(495, 271, 475, 792), List(106, 937, 243, 893), List(922, 373, 956, 174), List(177, 888, 611, 889), List(963, 900, 153, 746), List(395, 241, 550, 511), List(202, 381, 700, 813), List(471, 848, 331, 233), List(299, 516, 910, 497), List(293, 893, 784, 818), List(773, 926, 287, 688), List(306, 905, 694, 439), List(682, 877, 886, 511), List(195, 345, 401, 347), List(271, 770, 84, 390), List(22, 618, 595, 346), List(71, 681, 146, 363), List(604, 486, 669, 940), List(980, 817, 838, 256), List(691, 613, 458, 474), List(820, 763, 708, 892), List(671, 452, 760, 971), List(654, 336, 997, 846), List(806, 950, 694, 859), List(309, 886, 76, 430), List(74, 739, 871, 749), List(510, 149, 846, 818), List(361, 518, 497, 330), List(586, 159, 975, 105), List(548, 662, 963, 595), List(856, 194, 657, 616)),949), List())
22
+ }
23
+
24
+ test("test6") {
25
+ assertEquals(Main.getGoodIndices(List(List(81, 172, 816, 189), List(809, 835, 516, 976), List(397, 971, 139, 93), List(681, 583, 211, 893), List(280, 14, 944, 299), List(376, 487, 547, 109), List(967, 509, 844, 522), List(50, 465, 477, 439), List(816, 204, 858, 24), List(909, 456, 252, 478), List(696, 242, 935, 324), List(917, 999, 174, 120), List(852, 237, 834, 506), List(296, 5, 111, 748), List(706, 607, 470, 176), List(511, 3, 181, 780), List(104, 121, 815, 559), List(30, 888, 987, 809), List(980, 646, 68, 621), List(151, 159, 847, 511), List(216, 153, 524, 81), List(232, 344, 443, 608), List(613, 48, 987, 567), List(482, 734, 352, 296), List(150, 54, 779, 387), List(53, 208, 939, 212), List(999, 667, 907, 712), List(527, 974, 693, 275), List(589, 415, 593, 251), List(817, 108, 592, 653), List(925, 383, 642, 863), List(409, 263, 441, 288), List(524, 586, 918, 266), List(248, 923, 220, 764), List(936, 616, 521, 106), List(599, 688, 72, 819), List(762, 876, 429, 494), List(353, 724, 774, 394), List(449, 376, 358, 861), List(223, 743, 609, 507), List(279, 890, 182, 381), List(407, 227, 318, 292), List(282, 543, 533, 892), List(821, 464, 352, 213), List(294, 289, 509, 759)),957), List())
26
+ }
27
+
28
+ test("test7") {
29
+ assertEquals(Main.getGoodIndices(List(List(6, 114, 977, 509), List(992, 896, 940, 360), List(108, 232, 245, 708), List(839, 994, 876, 132), List(322, 274, 923, 515), List(269, 439, 946, 817), List(495, 776, 365, 373), List(28, 782, 83, 118), List(979, 942, 907, 111), List(332, 664, 757, 833), List(885, 939, 68, 113), List(100, 104, 441, 578), List(769, 192, 680, 494), List(169, 51, 884, 261), List(88, 60, 678, 51), List(600, 260, 945, 893), List(578, 223, 333, 561), List(209, 752, 843, 166), List(880, 569, 698, 597), List(329, 525, 407, 1), List(431, 192, 711, 50), List(37, 855, 590, 473), List(935, 795, 85, 290), List(674, 556, 171, 211), List(825, 850, 418, 517), List(555, 737, 950, 132), List(405, 203, 554, 263), List(359, 170, 215, 258), List(381, 593, 785, 679), List(153, 704, 754, 957), List(919, 758, 73, 131), List(209, 121, 633, 452), List(850, 903, 831, 189), List(756, 405, 232, 235), List(254, 574, 70, 107), List(985, 221, 949, 601), List(671, 449, 108, 913), List(290, 917, 148, 391), List(871, 77, 224, 852), List(7, 41, 760, 862), List(205, 212, 549, 576), List(791, 683, 877, 501), List(128, 808, 94, 594), List(684, 588, 547, 118), List(708, 724, 428, 997), List(1, 515, 617, 413), List(689, 970, 677, 288), List(796, 841, 983, 774), List(854, 842, 649, 972), List(318, 13, 692, 791), List(514, 801, 601, 835), List(431, 810, 912, 183), List(778, 552, 326, 620), List(627, 343, 412, 901), List(380, 264, 962, 825), List(72, 869, 314, 356), List(479, 701, 720, 380), List(23, 52, 949, 882), List(67, 648, 120, 709), List(814, 251, 484, 453), List(482, 903, 374, 308), List(215, 393, 68, 708), List(432, 689, 907, 548), List(857, 652, 902, 652), List(421, 413, 237, 5), List(182, 165, 186, 942), List(314, 622, 884, 857), List(202, 236, 606, 575), List(564, 55, 87, 474), List(19, 759, 536, 282), List(796, 1000, 689, 798), List(484, 868, 402, 964), List(272, 713, 258, 838), List(523, 957, 746, 397), List(665, 948, 815, 727), List(267, 594, 16, 190), List(969, 604, 257, 608), List(985, 956, 429, 633), List(916, 717, 532, 947), List(701, 731, 143, 346), List(541, 175, 216, 703), List(557, 223, 184, 755), List(641, 243, 833, 33), List(217, 317, 296, 763), List(608, 874, 70, 716), List(392, 976, 115, 953), List(209, 461, 42, 352)),183), List())
30
+ }
31
+
32
+ test("test8") {
33
+ assertEquals(Main.getGoodIndices(List(List(856, 748, 650, 124), List(599, 74, 954, 720), List(116, 112, 187, 459), List(428, 787, 42, 243), List(878, 169, 977, 267), List(351, 952, 826, 534), List(730, 760, 533, 507), List(612, 167, 208, 56), List(349, 752, 126, 743), List(33, 575, 257, 955), List(815, 571, 494, 987), List(88, 322, 785, 329), List(892, 795, 384, 496), List(797, 873, 848, 768)),407), List())
34
+ }
35
+
36
+ test("test9") {
37
+ assertEquals(Main.getGoodIndices(List(List(14, 878, 402, 407), List(119, 107, 486, 233), List(125, 80, 792, 504), List(736, 647, 638, 163), List(327, 465, 694, 681), List(211, 281, 165, 386), List(367, 201, 826, 849), List(863, 520, 722, 684), List(355, 609, 311, 798), List(834, 455, 902, 854), List(588, 90, 135, 391), List(413, 824, 59, 558), List(893, 549, 420, 899), List(75, 689, 403, 773), List(903, 451, 775, 882), List(355, 597, 223, 600), List(494, 613, 819, 216), List(52, 966, 966, 121), List(70, 721, 779, 47), List(865, 606, 604, 472), List(110, 628, 751, 123), List(692, 72, 982, 58), List(205, 640, 791, 422), List(984, 652, 511, 224), List(806, 180, 445, 995), List(430, 603, 598, 48), List(175, 699, 700, 602), List(661, 825, 406, 892), List(58, 849, 434, 798), List(870, 146, 948, 823), List(512, 134, 216, 352), List(610, 137, 125, 97), List(711, 349, 103, 414), List(895, 440, 653, 260), List(609, 264, 3, 300), List(981, 577, 365, 681), List(41, 406, 773, 688), List(222, 359, 450, 29), List(354, 776, 679, 773), List(975, 931, 142, 736), List(135, 272, 914, 855), List(883, 967, 239, 928), List(900, 735, 587, 120), List(515, 421, 809, 961), List(863, 68, 310, 33), List(709, 487, 972, 559), List(132, 211, 686, 644), List(828, 944, 653, 544), List(17, 341, 781, 214), List(187, 271, 354, 656), List(1, 46, 897, 685), List(549, 945, 952, 120), List(535, 745, 438, 286), List(348, 781, 265, 119), List(627, 854, 993, 633), List(21, 273, 451, 965), List(346, 260, 623, 616), List(9, 152, 906, 545), List(455, 37, 410, 650), List(300, 571, 685, 624), List(982, 9, 26, 748)),169), List())
38
+ }
39
+
40
+ }
earliest_possible_day_of_full_bloom/.DS_Store ADDED
Binary file (6.15 kB). View file
 
earliest_possible_day_of_full_bloom/haskell_tests/Main.hs ADDED
@@ -0,0 +1,27 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ module Main where
3
+ import Test.HUnit
4
+
5
+ --Program start
6
+
7
+ --Program end
8
+
9
+ -- Test cases
10
+
11
+ test1 :: Test
12
+ test1 = TestCase (assertEqual "for (earliestFullBloom [1,4,3] [2,3,1])," 9 (earliestFullBloom [1,4,3] [2,3,1]))
13
+
14
+ test2 :: Test
15
+ test2 = TestCase (assertEqual "for (earliestFullBloom [1,2,3,2] [2,1,2,1])," 9 (earliestFullBloom [1,2,3,2] [2,1,2,1]))
16
+
17
+ test3 :: Test
18
+ test3 = TestCase (assertEqual "for (earliestFullBloom [1] [1])," 2 (earliestFullBloom [1] [1]))
19
+
20
+
21
+ -- Grouping test cases
22
+ tests :: Test
23
+ tests = TestList [TestLabel "Test1" test1, TestLabel "Test2" test2]
24
+
25
+ -- Running the tests
26
+ main :: IO Counts
27
+ main = runTestTT tests
earliest_possible_day_of_full_bloom/java_tests/Main.java ADDED
@@ -0,0 +1,25 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ import static org.junit.jupiter.api.Assertions.*;
3
+ import org.junit.jupiter.api.Test;
4
+ import java.util.List;
5
+ import java.util.Arrays;
6
+ import java.util.ArrayList;
7
+ public class Main {
8
+ //Program start
9
+
10
+ //Program end
11
+
12
+ @Test
13
+ public void test1() {
14
+ assertEquals(9, earliestFullBloom(new ArrayList<>(Arrays.asList(1,4,3)), new ArrayList<>(Arrays.asList(2,3,1))));
15
+ }
16
+ @Test
17
+ public void test2() {
18
+ assertEquals(9, earliestFullBloom(new ArrayList<>(Arrays.asList(1,2,3,2)), new ArrayList<>(Arrays.asList(2,1,2,1))));
19
+ }
20
+ @Test
21
+ public void test3() {
22
+ assertEquals(2, earliestFullBloom(new ArrayList<>(Arrays.asList(1)), new ArrayList<>(Arrays.asList(1))));
23
+ }
24
+
25
+ }
earliest_possible_day_of_full_bloom/meta.json ADDED
@@ -0,0 +1,31 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "id": 2257,
3
+ "name": "earliest_possible_day_of_full_bloom",
4
+ "difficulty": "Hard",
5
+ "link": "https://leetcode.com/problems/earliest-possible-day-of-full-bloom/",
6
+ "date": "1641081600000",
7
+ "task_description": "You have `n` flower seeds. Every seed must be planted first before it can begin to grow, then bloom. Planting a seed takes time and so does the growth of a seed. You are given two **0-indexed** integer arrays `plantTime` and `growTime`, of length `n` each: `plantTime[i]` is the number of **full days** it takes you to **plant** the `ith` seed. Every day, you can work on planting exactly one seed. You **do not** have to work on planting the same seed on consecutive days, but the planting of a seed is not complete **until** you have worked `plantTime[i]` days on planting it in total. `growTime[i]` is the number of **full days** it takes the `ith` seed to grow after being completely planted. **After** the last day of its growth, the flower **blooms** and stays bloomed forever. From the beginning of day `0`, you can plant the seeds in **any** order. Return _the **earliest** possible day where **all** seeds are blooming_. **Example 1:** ``` **Input:** plantTime = [1,4,3], growTime = [2,3,1] **Output:** 9 **Explanation:** The grayed out pots represent planting days, colored pots represent growing days, and the flower represents the day it blooms. One optimal way is: On day 0, plant the 0th seed. The seed grows for 2 full days and blooms on day 3. On days 1, 2, 3, and 4, plant the 1st seed. The seed grows for 3 full days and blooms on day 8. On days 5, 6, and 7, plant the 2nd seed. The seed grows for 1 full day and blooms on day 9. Thus, on day 9, all the seeds are blooming. ``` **Example 2:** ``` **Input:** plantTime = [1,2,3,2], growTime = [2,1,2,1] **Output:** 9 **Explanation:** The grayed out pots represent planting days, colored pots represent growing days, and the flower represents the day it blooms. One optimal way is: On day 1, plant the 0th seed. The seed grows for 2 full days and blooms on day 4. On days 0 and 3, plant the 1st seed. The seed grows for 1 full day and blooms on day 5. On days 2, 4, and 5, plant the 2nd seed. The seed grows for 2 full days and blooms on day 8. On days 6 and 7, plant the 3rd seed. The seed grows for 1 full day and blooms on day 9. Thus, on day 9, all the seeds are blooming. ``` **Example 3:** ``` **Input:** plantTime = [1], growTime = [1] **Output:** 2 **Explanation:** On day 0, plant the 0th seed. The seed grows for 1 full day and blooms on day 2. Thus, on day 2, all the seeds are blooming. ``` **Constraints:** `n == plantTime.length == growTime.length` `1 <= n <= 105` `1 <= plantTime[i], growTime[i] <= 104`",
8
+ "public_test_cases": [
9
+ {
10
+ "label": "Example 1",
11
+ "input": "plantTime = [1,4,3], growTime = [2,3,1]",
12
+ "output": "9 "
13
+ },
14
+ {
15
+ "label": "Example 2",
16
+ "input": "plantTime = [1,2,3,2], growTime = [2,1,2,1]",
17
+ "output": "9 "
18
+ },
19
+ {
20
+ "label": "Example 3",
21
+ "input": "plantTime = [1], growTime = [1]",
22
+ "output": "2 "
23
+ }
24
+ ],
25
+ "private_test_cases": [],
26
+ "haskell_template": "earliestFullBloom :: [Int] -> [Int] -> Int\nearliestFullBloom plantTime growTime ",
27
+ "ocaml_template": "let earliestFullBloom (plantTime: int list) (growTime: int list) : int = ",
28
+ "scala_template": "def earliestFullBloom(plantTime: List[Int],growTime: List[Int]): Int = { \n \n}",
29
+ "java_template": "public static int earliestFullBloom(List<Integer> plantTime, List<Integer> growTime) {\n\n}",
30
+ "python_template": "class Solution(object):\n def earliestFullBloom(self, plantTime, growTime):\n \"\"\"\n :type plantTime: List[int]\n :type growTime: List[int]\n :rtype: int\n \"\"\"\n "
31
+ }
earliest_possible_day_of_full_bloom/ocaml_tests/main.ml ADDED
@@ -0,0 +1,29 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ module Main = struct
3
+ open OUnit2
4
+
5
+ (* Program start *)
6
+
7
+ (* Program end *)
8
+
9
+ (* Test cases *)
10
+
11
+ let test1 _ = assert_equal 9 (earliestFullBloom [1;4;3] [2;3;1])
12
+
13
+ let test2 _ = assert_equal 9 (earliestFullBloom [1;2;3;2] [2;1;2;1])
14
+
15
+ let test3 _ = assert_equal 2 (earliestFullBloom [1] [1])
16
+
17
+
18
+ (* Grouping test cases *)
19
+ let suite = "Test Suite for earliestFullBloom" >::: [
20
+
21
+ "test1" >:: test1;
22
+ "test2" >:: test2;
23
+ "test3" >:: test3;
24
+ ]
25
+
26
+
27
+ (* Running the tests *)
28
+ let () = run_test_tt_main suite
29
+ end
earliest_possible_day_of_full_bloom/scala_tests/MySuite.scala ADDED
@@ -0,0 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ class MySuite extends munit.FunSuite {
3
+
4
+ test("test1") {
5
+ assertEquals(Main.earliestFullBloom(List(1,4,3),List(2,3,1)), 9)
6
+ }
7
+
8
+ test("test2") {
9
+ assertEquals(Main.earliestFullBloom(List(1,2,3,2),List(2,1,2,1)), 9)
10
+ }
11
+
12
+ test("test3") {
13
+ assertEquals(Main.earliestFullBloom(List(1),List(1)), 2)
14
+ }
15
+
16
+ }
earliest_second_to_mark_indices_i/haskell_tests/Main.hs ADDED
The diff for this file is too large to render. See raw diff
 
earliest_second_to_mark_indices_i/java_tests/Main.java ADDED
@@ -0,0 +1,25 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ import static org.junit.jupiter.api.Assertions.*;
3
+ import org.junit.jupiter.api.Test;
4
+ import java.util.List;
5
+ import java.util.Arrays;
6
+ import java.util.ArrayList;
7
+ public class Main {
8
+ //Program start
9
+
10
+ //Program end
11
+
12
+ @Test
13
+ public void test1() {
14
+ assertEquals(8, earliestSecondToMarkIndices(new ArrayList<>(Arrays.asList(2,2,0)), new ArrayList<>(Arrays.asList(2,2,2,2,3,2,2,1))));
15
+ }
16
+ @Test
17
+ public void test2() {
18
+ assertEquals(6, earliestSecondToMarkIndices(new ArrayList<>(Arrays.asList(1,3)), new ArrayList<>(Arrays.asList(1,1,1,2,1,1,1))));
19
+ }
20
+ @Test
21
+ public void test3() {
22
+ assertEquals(-1, earliestSecondToMarkIndices(new ArrayList<>(Arrays.asList(0,1)), new ArrayList<>(Arrays.asList(2,2,2))));
23
+ }
24
+
25
+ }
earliest_second_to_mark_indices_i/meta.json ADDED
The diff for this file is too large to render. See raw diff
 
earliest_second_to_mark_indices_i/ocaml_tests/main.ml ADDED
The diff for this file is too large to render. See raw diff
 
earliest_second_to_mark_indices_i/scala_tests/MySuite.scala ADDED
The diff for this file is too large to render. See raw diff
 
earliest_second_to_mark_indices_ii/haskell_tests/Main.hs ADDED
The diff for this file is too large to render. See raw diff
 
earliest_second_to_mark_indices_ii/java_tests/Main.java ADDED
@@ -0,0 +1,25 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ import static org.junit.jupiter.api.Assertions.*;
3
+ import org.junit.jupiter.api.Test;
4
+ import java.util.List;
5
+ import java.util.Arrays;
6
+ import java.util.ArrayList;
7
+ public class Main {
8
+ //Program start
9
+
10
+ //Program end
11
+
12
+ @Test
13
+ public void test1() {
14
+ assertEquals(6, earliestSecondToMarkIndices(new ArrayList<>(Arrays.asList(3,2,3)), new ArrayList<>(Arrays.asList(1,3,2,2,2,2,3))));
15
+ }
16
+ @Test
17
+ public void test2() {
18
+ assertEquals(7, earliestSecondToMarkIndices(new ArrayList<>(Arrays.asList(0,0,1,2)), new ArrayList<>(Arrays.asList(1,2,1,2,1,2,1,2))));
19
+ }
20
+ @Test
21
+ public void test3() {
22
+ assertEquals(-1, earliestSecondToMarkIndices(new ArrayList<>(Arrays.asList(1,2,3)), new ArrayList<>(Arrays.asList(1,2,3))));
23
+ }
24
+
25
+ }
earliest_second_to_mark_indices_ii/meta.json ADDED
The diff for this file is too large to render. See raw diff
 
earliest_second_to_mark_indices_ii/ocaml_tests/main.ml ADDED
The diff for this file is too large to render. See raw diff
 
earliest_second_to_mark_indices_ii/scala_tests/MySuite.scala ADDED
The diff for this file is too large to render. See raw diff
 
eat_pizzas/haskell_tests/Main.hs ADDED
The diff for this file is too large to render. See raw diff
 
eat_pizzas/java_tests/Main.java ADDED
@@ -0,0 +1,20 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ import static org.junit.jupiter.api.Assertions.*;
3
+ import org.junit.jupiter.api.Test;
4
+ import java.util.List;
5
+ import java.util.Arrays;
6
+ public class Main {
7
+ //Program start
8
+
9
+ //Program end
10
+
11
+ @Test
12
+ public void test1() {
13
+ assertEquals(14, maxWeight(Arrays.asList(1,2,3,4,5,6,7,8)));
14
+ }
15
+ @Test
16
+ public void test2() {
17
+ assertEquals(3, maxWeight(Arrays.asList(2,1,1,1,1,1,1,1)));
18
+ }
19
+
20
+ }
eat_pizzas/meta.json ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:03bd0c9d90c7a631a88ffd2277437073ebab146a4df86ea614ca2cfc20d579d8
3
+ size 10938348
eat_pizzas/ocaml_tests/main.ml ADDED
The diff for this file is too large to render. See raw diff
 
eat_pizzas/scala_tests/MySuite.scala ADDED
The diff for this file is too large to render. See raw diff
 
equal_row_and_column_pairs/.DS_Store ADDED
Binary file (6.15 kB). View file
 
equal_row_and_column_pairs/haskell_tests/Main.hs ADDED
@@ -0,0 +1,24 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ module Main where
3
+ import Test.HUnit
4
+
5
+ --Program start
6
+
7
+ --Program end
8
+
9
+ -- Test cases
10
+
11
+ test1 :: Test
12
+ test1 = TestCase (assertEqual "for (equalPairs [[3,2,1],[1,7,6],[2,7,7]])," 1 (equalPairs [[3,2,1],[1,7,6],[2,7,7]]))
13
+
14
+ test2 :: Test
15
+ test2 = TestCase (assertEqual "for (equalPairs [[3,1,2,2],[1,4,4,5],[2,4,2,2],[2,4,2,2]])," 3 (equalPairs [[3,1,2,2],[1,4,4,5],[2,4,2,2],[2,4,2,2]]))
16
+
17
+
18
+ -- Grouping test cases
19
+ tests :: Test
20
+ tests = TestList [TestLabel "Test1" test1]
21
+
22
+ -- Running the tests
23
+ main :: IO Counts
24
+ main = runTestTT tests
equal_row_and_column_pairs/java_tests/Main.java ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ import static org.junit.jupiter.api.Assertions.*;
3
+ import org.junit.jupiter.api.Test;
4
+ import java.util.List;
5
+ import java.util.Arrays;
6
+ import java.util.ArrayList;
7
+ public class Main {
8
+ //Program start
9
+
10
+ //Program end
11
+
12
+ @Test
13
+ public void test1() {
14
+ assertEquals(1, equalPairs(new ArrayList<>(Arrays.asList(new ArrayList<>(Arrays.asList(3,2,1)),new ArrayList<>(Arrays.asList(1,7,6)),new ArrayList<>(Arrays.asList(2,7,7))))));
15
+ }
16
+ @Test
17
+ public void test2() {
18
+ assertEquals(3, equalPairs(new ArrayList<>(Arrays.asList(new ArrayList<>(Arrays.asList(3,1,2,2)),new ArrayList<>(Arrays.asList(1,4,4,5)),new ArrayList<>(Arrays.asList(2,4,2,2)),new ArrayList<>(Arrays.asList(2,4,2,2))))));
19
+ }
20
+
21
+ }
equal_row_and_column_pairs/meta.json ADDED
The diff for this file is too large to render. See raw diff