6aaf4ecffe98c75cec67053fd2414676b5b50d0f7ae22166b1300dacef6dec28
Browse filesThis view is limited to 50 files because it contains too many changes. See raw diff
- .gitattributes +9 -0
- count_unguarded_cells_in_the_grid/.DS_Store +0 -0
- count_unguarded_cells_in_the_grid/haskell_tests/Main.hs +24 -0
- count_unguarded_cells_in_the_grid/java_tests/Main.java +21 -0
- count_unguarded_cells_in_the_grid/meta.json +2173 -0
- count_unguarded_cells_in_the_grid/ocaml_tests/main.ml +26 -0
- count_unguarded_cells_in_the_grid/scala_tests/MySuite.scala +12 -0
- count_unreachable_pairs_of_nodes_in_an_undirected_graph/haskell_tests/Main.hs +3 -0
- count_unreachable_pairs_of_nodes_in_an_undirected_graph/java_tests/Main.java +21 -0
- count_unreachable_pairs_of_nodes_in_an_undirected_graph/meta.json +3 -0
- count_unreachable_pairs_of_nodes_in_an_undirected_graph/ocaml_tests/main.ml +3 -0
- count_unreachable_pairs_of_nodes_in_an_undirected_graph/scala_tests/MySuite.scala +3 -0
- count_valid_paths_in_a_tree/java_tests/Main.java +21 -0
- count_ways_to_build_good_strings/.DS_Store +0 -0
- count_ways_to_build_good_strings/haskell_tests/Main.hs +24 -0
- count_ways_to_build_good_strings/java_tests/Main.java +21 -0
- count_ways_to_build_good_strings/meta.json +117 -0
- count_ways_to_build_good_strings/ocaml_tests/main.ml +26 -0
- count_ways_to_build_good_strings/scala_tests/MySuite.scala +12 -0
- count_ways_to_group_overlapping_ranges/.DS_Store +0 -0
- count_ways_to_group_overlapping_ranges/haskell_tests/Main.hs +24 -0
- count_ways_to_group_overlapping_ranges/java_tests/Main.java +21 -0
- count_ways_to_group_overlapping_ranges/meta.json +3 -0
- count_ways_to_group_overlapping_ranges/ocaml_tests/main.ml +26 -0
- count_ways_to_group_overlapping_ranges/scala_tests/MySuite.scala +12 -0
- count_words_obtained_after_adding_a_letter/.DS_Store +0 -0
- count_words_obtained_after_adding_a_letter/haskell_tests/Main.hs +24 -0
- count_words_obtained_after_adding_a_letter/java_tests/Main.java +21 -0
- count_words_obtained_after_adding_a_letter/meta.json +26 -0
- count_words_obtained_after_adding_a_letter/ocaml_tests/main.ml +26 -0
- count_words_obtained_after_adding_a_letter/scala_tests/MySuite.scala +12 -0
- count_zero_request_servers/haskell_tests/Main.hs +3 -0
- count_zero_request_servers/java_tests/Main.java +21 -0
- count_zero_request_servers/meta.json +3 -0
- count_zero_request_servers/ocaml_tests/main.ml +3 -0
- count_zero_request_servers/scala_tests/MySuite.scala +3 -0
- counting_words_with_a_given_prefix/.DS_Store +0 -0
- counting_words_with_a_given_prefix/haskell_tests/Main.hs +24 -0
- counting_words_with_a_given_prefix/java_tests/Main.java +21 -0
- counting_words_with_a_given_prefix/meta.json +625 -0
- counting_words_with_a_given_prefix/ocaml_tests/main.ml +26 -0
- counting_words_with_a_given_prefix/scala_tests/MySuite.scala +12 -0
- create_binary_tree_from_descriptions/.DS_Store +0 -0
- create_binary_tree_from_descriptions/haskell_tests/Main.hs +24 -0
- create_binary_tree_from_descriptions/java_tests/Main.java +21 -0
- create_binary_tree_from_descriptions/meta.json +26 -0
- create_binary_tree_from_descriptions/ocaml_tests/main.ml +26 -0
- create_binary_tree_from_descriptions/scala_tests/MySuite.scala +12 -0
- create_components_with_same_value/.DS_Store +0 -0
- create_components_with_same_value/haskell_tests/Main.hs +24 -0
.gitattributes
CHANGED
|
@@ -92,3 +92,12 @@ count_the_number_of_good_nodes/haskell_tests/Main.hs filter=lfs diff=lfs merge=l
|
|
| 92 |
count_the_number_of_good_nodes/meta.json filter=lfs diff=lfs merge=lfs -text
|
| 93 |
count_the_number_of_good_subarrays/meta.json filter=lfs diff=lfs merge=lfs -text
|
| 94 |
count_the_number_of_houses_at_a_certain_distance_ii/meta.json filter=lfs diff=lfs merge=lfs -text
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 92 |
count_the_number_of_good_nodes/meta.json filter=lfs diff=lfs merge=lfs -text
|
| 93 |
count_the_number_of_good_subarrays/meta.json filter=lfs diff=lfs merge=lfs -text
|
| 94 |
count_the_number_of_houses_at_a_certain_distance_ii/meta.json filter=lfs diff=lfs merge=lfs -text
|
| 95 |
+
count_unreachable_pairs_of_nodes_in_an_undirected_graph/haskell_tests/Main.hs filter=lfs diff=lfs merge=lfs -text
|
| 96 |
+
count_unreachable_pairs_of_nodes_in_an_undirected_graph/meta.json filter=lfs diff=lfs merge=lfs -text
|
| 97 |
+
count_unreachable_pairs_of_nodes_in_an_undirected_graph/ocaml_tests/main.ml filter=lfs diff=lfs merge=lfs -text
|
| 98 |
+
count_unreachable_pairs_of_nodes_in_an_undirected_graph/scala_tests/MySuite.scala filter=lfs diff=lfs merge=lfs -text
|
| 99 |
+
count_ways_to_group_overlapping_ranges/meta.json filter=lfs diff=lfs merge=lfs -text
|
| 100 |
+
count_zero_request_servers/haskell_tests/Main.hs filter=lfs diff=lfs merge=lfs -text
|
| 101 |
+
count_zero_request_servers/meta.json filter=lfs diff=lfs merge=lfs -text
|
| 102 |
+
count_zero_request_servers/ocaml_tests/main.ml filter=lfs diff=lfs merge=lfs -text
|
| 103 |
+
count_zero_request_servers/scala_tests/MySuite.scala filter=lfs diff=lfs merge=lfs -text
|
count_unguarded_cells_in_the_grid/.DS_Store
ADDED
|
Binary file (6.15 kB). View file
|
|
|
count_unguarded_cells_in_the_grid/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 (countUnguarded 4 6 [[0,0],[1,1],[2,3]] [[0,1],[2,2],[1,4]])," 7 (countUnguarded 4 6 [[0,0],[1,1],[2,3]] [[0,1],[2,2],[1,4]]))
|
| 13 |
+
|
| 14 |
+
test2 :: Test
|
| 15 |
+
test2 = TestCase (assertEqual "for (countUnguarded 3 3 [[1,1]] [[0,1],[1,0],[2,1],[1,2]])," 4 (countUnguarded 3 3 [[1,1]] [[0,1],[1,0],[2,1],[1,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
|
count_unguarded_cells_in_the_grid/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(7, countUnguarded(4, 6, new ArrayList<>(Arrays.asList(new ArrayList<>(Arrays.asList(0,0)),new ArrayList<>(Arrays.asList(1,1)),new ArrayList<>(Arrays.asList(2,3)))), new ArrayList<>(Arrays.asList(new ArrayList<>(Arrays.asList(0,1)),new ArrayList<>(Arrays.asList(2,2)),new ArrayList<>(Arrays.asList(1,4))))));
|
| 15 |
+
}
|
| 16 |
+
@Test
|
| 17 |
+
public void test2() {
|
| 18 |
+
assertEquals(4, countUnguarded(3, 3, new ArrayList<>(Arrays.asList(new ArrayList<>(Arrays.asList(1,1)))), new ArrayList<>(Arrays.asList(new ArrayList<>(Arrays.asList(0,1)),new ArrayList<>(Arrays.asList(1,0)),new ArrayList<>(Arrays.asList(2,1)),new ArrayList<>(Arrays.asList(1,2))))));
|
| 19 |
+
}
|
| 20 |
+
|
| 21 |
+
}
|
count_unguarded_cells_in_the_grid/meta.json
ADDED
|
@@ -0,0 +1,2173 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"id": 2343,
|
| 3 |
+
"name": "count_unguarded_cells_in_the_grid",
|
| 4 |
+
"difficulty": "Medium",
|
| 5 |
+
"link": "https://leetcode.com/problems/count-unguarded-cells-in-the-grid/",
|
| 6 |
+
"date": "1650067200000",
|
| 7 |
+
"task_description": "You are given two integers `m` and `n` representing a **0-indexed** `m x n` grid. You are also given two 2D integer arrays `guards` and `walls` where `guards[i] = [rowi, coli]` and `walls[j] = [rowj, colj]` represent the positions of the `ith` guard and `jth` wall respectively. A guard can see every cell in the four cardinal directions (north, east, south, or west) starting from their position unless **obstructed** by a wall or another guard. A cell is **guarded** if there is **at least** one guard that can see it. Return_ the number of unoccupied cells that are **not** **guarded**._ **Example 1:** ``` **Input:** m = 4, n = 6, guards = [[0,0],[1,1],[2,3]], walls = [[0,1],[2,2],[1,4]] **Output:** 7 **Explanation:** The guarded and unguarded cells are shown in red and green respectively in the above diagram. There are a total of 7 unguarded cells, so we return 7. ``` **Example 2:** ``` **Input:** m = 3, n = 3, guards = [[1,1]], walls = [[0,1],[1,0],[2,1],[1,2]] **Output:** 4 **Explanation:** The unguarded cells are shown in green in the above diagram. There are a total of 4 unguarded cells, so we return 4. ``` **Constraints:** `1 <= m, n <= 105` `2 <= m * n <= 105` `1 <= guards.length, walls.length <= 5 * 104` `2 <= guards.length + walls.length <= m * n` `guards[i].length == walls[j].length == 2` `0 <= rowi, rowj < m` `0 <= coli, colj < n` All the positions in `guards` and `walls` are **unique**.",
|
| 8 |
+
"public_test_cases": [
|
| 9 |
+
{
|
| 10 |
+
"label": "Example 1",
|
| 11 |
+
"input": "m = 4, n = 6, guards = [[0,0],[1,1],[2,3]], walls = [[0,1],[2,2],[1,4]]",
|
| 12 |
+
"output": "7 "
|
| 13 |
+
},
|
| 14 |
+
{
|
| 15 |
+
"label": "Example 2",
|
| 16 |
+
"input": "m = 3, n = 3, guards = [[1,1]], walls = [[0,1],[1,0],[2,1],[1,2]]",
|
| 17 |
+
"output": "4 "
|
| 18 |
+
}
|
| 19 |
+
],
|
| 20 |
+
"private_test_cases": [
|
| 21 |
+
{
|
| 22 |
+
"input": [
|
| 23 |
+
59,
|
| 24 |
+
58,
|
| 25 |
+
[
|
| 26 |
+
[
|
| 27 |
+
42,
|
| 28 |
+
5
|
| 29 |
+
],
|
| 30 |
+
[
|
| 31 |
+
25,
|
| 32 |
+
53
|
| 33 |
+
],
|
| 34 |
+
[
|
| 35 |
+
16,
|
| 36 |
+
50
|
| 37 |
+
],
|
| 38 |
+
[
|
| 39 |
+
11,
|
| 40 |
+
5
|
| 41 |
+
],
|
| 42 |
+
[
|
| 43 |
+
48,
|
| 44 |
+
54
|
| 45 |
+
],
|
| 46 |
+
[
|
| 47 |
+
25,
|
| 48 |
+
1
|
| 49 |
+
],
|
| 50 |
+
[
|
| 51 |
+
38,
|
| 52 |
+
1
|
| 53 |
+
],
|
| 54 |
+
[
|
| 55 |
+
54,
|
| 56 |
+
52
|
| 57 |
+
],
|
| 58 |
+
[
|
| 59 |
+
7,
|
| 60 |
+
7
|
| 61 |
+
],
|
| 62 |
+
[
|
| 63 |
+
14,
|
| 64 |
+
46
|
| 65 |
+
],
|
| 66 |
+
[
|
| 67 |
+
34,
|
| 68 |
+
3
|
| 69 |
+
],
|
| 70 |
+
[
|
| 71 |
+
1,
|
| 72 |
+
36
|
| 73 |
+
],
|
| 74 |
+
[
|
| 75 |
+
52,
|
| 76 |
+
34
|
| 77 |
+
],
|
| 78 |
+
[
|
| 79 |
+
29,
|
| 80 |
+
37
|
| 81 |
+
],
|
| 82 |
+
[
|
| 83 |
+
9,
|
| 84 |
+
16
|
| 85 |
+
],
|
| 86 |
+
[
|
| 87 |
+
23,
|
| 88 |
+
36
|
| 89 |
+
],
|
| 90 |
+
[
|
| 91 |
+
35,
|
| 92 |
+
28
|
| 93 |
+
],
|
| 94 |
+
[
|
| 95 |
+
22,
|
| 96 |
+
0
|
| 97 |
+
],
|
| 98 |
+
[
|
| 99 |
+
54,
|
| 100 |
+
17
|
| 101 |
+
],
|
| 102 |
+
[
|
| 103 |
+
41,
|
| 104 |
+
13
|
| 105 |
+
],
|
| 106 |
+
[
|
| 107 |
+
8,
|
| 108 |
+
10
|
| 109 |
+
],
|
| 110 |
+
[
|
| 111 |
+
10,
|
| 112 |
+
13
|
| 113 |
+
],
|
| 114 |
+
[
|
| 115 |
+
20,
|
| 116 |
+
45
|
| 117 |
+
],
|
| 118 |
+
[
|
| 119 |
+
54,
|
| 120 |
+
47
|
| 121 |
+
],
|
| 122 |
+
[
|
| 123 |
+
7,
|
| 124 |
+
51
|
| 125 |
+
],
|
| 126 |
+
[
|
| 127 |
+
47,
|
| 128 |
+
50
|
| 129 |
+
]
|
| 130 |
+
],
|
| 131 |
+
[
|
| 132 |
+
[
|
| 133 |
+
27,
|
| 134 |
+
4
|
| 135 |
+
],
|
| 136 |
+
[
|
| 137 |
+
38,
|
| 138 |
+
50
|
| 139 |
+
],
|
| 140 |
+
[
|
| 141 |
+
6,
|
| 142 |
+
51
|
| 143 |
+
],
|
| 144 |
+
[
|
| 145 |
+
4,
|
| 146 |
+
27
|
| 147 |
+
],
|
| 148 |
+
[
|
| 149 |
+
32,
|
| 150 |
+
9
|
| 151 |
+
],
|
| 152 |
+
[
|
| 153 |
+
23,
|
| 154 |
+
34
|
| 155 |
+
],
|
| 156 |
+
[
|
| 157 |
+
38,
|
| 158 |
+
4
|
| 159 |
+
],
|
| 160 |
+
[
|
| 161 |
+
10,
|
| 162 |
+
24
|
| 163 |
+
],
|
| 164 |
+
[
|
| 165 |
+
25,
|
| 166 |
+
25
|
| 167 |
+
],
|
| 168 |
+
[
|
| 169 |
+
5,
|
| 170 |
+
55
|
| 171 |
+
],
|
| 172 |
+
[
|
| 173 |
+
19,
|
| 174 |
+
54
|
| 175 |
+
],
|
| 176 |
+
[
|
| 177 |
+
56,
|
| 178 |
+
36
|
| 179 |
+
],
|
| 180 |
+
[
|
| 181 |
+
22,
|
| 182 |
+
46
|
| 183 |
+
],
|
| 184 |
+
[
|
| 185 |
+
37,
|
| 186 |
+
32
|
| 187 |
+
],
|
| 188 |
+
[
|
| 189 |
+
50,
|
| 190 |
+
47
|
| 191 |
+
],
|
| 192 |
+
[
|
| 193 |
+
46,
|
| 194 |
+
28
|
| 195 |
+
],
|
| 196 |
+
[
|
| 197 |
+
39,
|
| 198 |
+
25
|
| 199 |
+
],
|
| 200 |
+
[
|
| 201 |
+
23,
|
| 202 |
+
14
|
| 203 |
+
],
|
| 204 |
+
[
|
| 205 |
+
34,
|
| 206 |
+
14
|
| 207 |
+
],
|
| 208 |
+
[
|
| 209 |
+
45,
|
| 210 |
+
14
|
| 211 |
+
],
|
| 212 |
+
[
|
| 213 |
+
54,
|
| 214 |
+
38
|
| 215 |
+
],
|
| 216 |
+
[
|
| 217 |
+
1,
|
| 218 |
+
7
|
| 219 |
+
],
|
| 220 |
+
[
|
| 221 |
+
55,
|
| 222 |
+
45
|
| 223 |
+
],
|
| 224 |
+
[
|
| 225 |
+
42,
|
| 226 |
+
27
|
| 227 |
+
],
|
| 228 |
+
[
|
| 229 |
+
57,
|
| 230 |
+
21
|
| 231 |
+
],
|
| 232 |
+
[
|
| 233 |
+
8,
|
| 234 |
+
34
|
| 235 |
+
]
|
| 236 |
+
]
|
| 237 |
+
],
|
| 238 |
+
"output": 1617
|
| 239 |
+
},
|
| 240 |
+
{
|
| 241 |
+
"input": [
|
| 242 |
+
64,
|
| 243 |
+
66,
|
| 244 |
+
[
|
| 245 |
+
[
|
| 246 |
+
6,
|
| 247 |
+
12
|
| 248 |
+
],
|
| 249 |
+
[
|
| 250 |
+
52,
|
| 251 |
+
52
|
| 252 |
+
],
|
| 253 |
+
[
|
| 254 |
+
1,
|
| 255 |
+
58
|
| 256 |
+
],
|
| 257 |
+
[
|
| 258 |
+
47,
|
| 259 |
+
28
|
| 260 |
+
],
|
| 261 |
+
[
|
| 262 |
+
37,
|
| 263 |
+
39
|
| 264 |
+
],
|
| 265 |
+
[
|
| 266 |
+
33,
|
| 267 |
+
29
|
| 268 |
+
],
|
| 269 |
+
[
|
| 270 |
+
4,
|
| 271 |
+
2
|
| 272 |
+
],
|
| 273 |
+
[
|
| 274 |
+
41,
|
| 275 |
+
51
|
| 276 |
+
],
|
| 277 |
+
[
|
| 278 |
+
19,
|
| 279 |
+
48
|
| 280 |
+
],
|
| 281 |
+
[
|
| 282 |
+
38,
|
| 283 |
+
55
|
| 284 |
+
],
|
| 285 |
+
[
|
| 286 |
+
63,
|
| 287 |
+
48
|
| 288 |
+
],
|
| 289 |
+
[
|
| 290 |
+
49,
|
| 291 |
+
3
|
| 292 |
+
],
|
| 293 |
+
[
|
| 294 |
+
35,
|
| 295 |
+
25
|
| 296 |
+
],
|
| 297 |
+
[
|
| 298 |
+
15,
|
| 299 |
+
16
|
| 300 |
+
],
|
| 301 |
+
[
|
| 302 |
+
30,
|
| 303 |
+
41
|
| 304 |
+
],
|
| 305 |
+
[
|
| 306 |
+
20,
|
| 307 |
+
18
|
| 308 |
+
],
|
| 309 |
+
[
|
| 310 |
+
51,
|
| 311 |
+
45
|
| 312 |
+
],
|
| 313 |
+
[
|
| 314 |
+
49,
|
| 315 |
+
27
|
| 316 |
+
],
|
| 317 |
+
[
|
| 318 |
+
32,
|
| 319 |
+
47
|
| 320 |
+
],
|
| 321 |
+
[
|
| 322 |
+
22,
|
| 323 |
+
18
|
| 324 |
+
],
|
| 325 |
+
[
|
| 326 |
+
0,
|
| 327 |
+
46
|
| 328 |
+
],
|
| 329 |
+
[
|
| 330 |
+
25,
|
| 331 |
+
45
|
| 332 |
+
],
|
| 333 |
+
[
|
| 334 |
+
27,
|
| 335 |
+
17
|
| 336 |
+
],
|
| 337 |
+
[
|
| 338 |
+
62,
|
| 339 |
+
45
|
| 340 |
+
],
|
| 341 |
+
[
|
| 342 |
+
19,
|
| 343 |
+
22
|
| 344 |
+
],
|
| 345 |
+
[
|
| 346 |
+
53,
|
| 347 |
+
48
|
| 348 |
+
],
|
| 349 |
+
[
|
| 350 |
+
57,
|
| 351 |
+
12
|
| 352 |
+
],
|
| 353 |
+
[
|
| 354 |
+
43,
|
| 355 |
+
25
|
| 356 |
+
],
|
| 357 |
+
[
|
| 358 |
+
29,
|
| 359 |
+
63
|
| 360 |
+
],
|
| 361 |
+
[
|
| 362 |
+
39,
|
| 363 |
+
55
|
| 364 |
+
]
|
| 365 |
+
],
|
| 366 |
+
[
|
| 367 |
+
[
|
| 368 |
+
9,
|
| 369 |
+
38
|
| 370 |
+
],
|
| 371 |
+
[
|
| 372 |
+
58,
|
| 373 |
+
52
|
| 374 |
+
],
|
| 375 |
+
[
|
| 376 |
+
18,
|
| 377 |
+
24
|
| 378 |
+
],
|
| 379 |
+
[
|
| 380 |
+
59,
|
| 381 |
+
53
|
| 382 |
+
]
|
| 383 |
+
]
|
| 384 |
+
],
|
| 385 |
+
"output": 1584
|
| 386 |
+
},
|
| 387 |
+
{
|
| 388 |
+
"input": [
|
| 389 |
+
40,
|
| 390 |
+
8,
|
| 391 |
+
[
|
| 392 |
+
[
|
| 393 |
+
34,
|
| 394 |
+
4
|
| 395 |
+
],
|
| 396 |
+
[
|
| 397 |
+
3,
|
| 398 |
+
7
|
| 399 |
+
],
|
| 400 |
+
[
|
| 401 |
+
0,
|
| 402 |
+
2
|
| 403 |
+
],
|
| 404 |
+
[
|
| 405 |
+
10,
|
| 406 |
+
0
|
| 407 |
+
],
|
| 408 |
+
[
|
| 409 |
+
18,
|
| 410 |
+
4
|
| 411 |
+
],
|
| 412 |
+
[
|
| 413 |
+
26,
|
| 414 |
+
5
|
| 415 |
+
],
|
| 416 |
+
[
|
| 417 |
+
7,
|
| 418 |
+
1
|
| 419 |
+
],
|
| 420 |
+
[
|
| 421 |
+
39,
|
| 422 |
+
5
|
| 423 |
+
],
|
| 424 |
+
[
|
| 425 |
+
37,
|
| 426 |
+
5
|
| 427 |
+
],
|
| 428 |
+
[
|
| 429 |
+
2,
|
| 430 |
+
4
|
| 431 |
+
],
|
| 432 |
+
[
|
| 433 |
+
33,
|
| 434 |
+
7
|
| 435 |
+
],
|
| 436 |
+
[
|
| 437 |
+
26,
|
| 438 |
+
1
|
| 439 |
+
],
|
| 440 |
+
[
|
| 441 |
+
13,
|
| 442 |
+
1
|
| 443 |
+
],
|
| 444 |
+
[
|
| 445 |
+
26,
|
| 446 |
+
7
|
| 447 |
+
],
|
| 448 |
+
[
|
| 449 |
+
6,
|
| 450 |
+
7
|
| 451 |
+
],
|
| 452 |
+
[
|
| 453 |
+
31,
|
| 454 |
+
6
|
| 455 |
+
],
|
| 456 |
+
[
|
| 457 |
+
31,
|
| 458 |
+
3
|
| 459 |
+
],
|
| 460 |
+
[
|
| 461 |
+
3,
|
| 462 |
+
2
|
| 463 |
+
],
|
| 464 |
+
[
|
| 465 |
+
9,
|
| 466 |
+
0
|
| 467 |
+
],
|
| 468 |
+
[
|
| 469 |
+
5,
|
| 470 |
+
5
|
| 471 |
+
],
|
| 472 |
+
[
|
| 473 |
+
38,
|
| 474 |
+
2
|
| 475 |
+
],
|
| 476 |
+
[
|
| 477 |
+
15,
|
| 478 |
+
6
|
| 479 |
+
],
|
| 480 |
+
[
|
| 481 |
+
21,
|
| 482 |
+
1
|
| 483 |
+
]
|
| 484 |
+
],
|
| 485 |
+
[
|
| 486 |
+
[
|
| 487 |
+
3,
|
| 488 |
+
4
|
| 489 |
+
],
|
| 490 |
+
[
|
| 491 |
+
22,
|
| 492 |
+
5
|
| 493 |
+
],
|
| 494 |
+
[
|
| 495 |
+
8,
|
| 496 |
+
0
|
| 497 |
+
],
|
| 498 |
+
[
|
| 499 |
+
27,
|
| 500 |
+
7
|
| 501 |
+
],
|
| 502 |
+
[
|
| 503 |
+
2,
|
| 504 |
+
5
|
| 505 |
+
],
|
| 506 |
+
[
|
| 507 |
+
24,
|
| 508 |
+
5
|
| 509 |
+
],
|
| 510 |
+
[
|
| 511 |
+
38,
|
| 512 |
+
4
|
| 513 |
+
],
|
| 514 |
+
[
|
| 515 |
+
38,
|
| 516 |
+
7
|
| 517 |
+
],
|
| 518 |
+
[
|
| 519 |
+
29,
|
| 520 |
+
4
|
| 521 |
+
],
|
| 522 |
+
[
|
| 523 |
+
29,
|
| 524 |
+
1
|
| 525 |
+
],
|
| 526 |
+
[
|
| 527 |
+
20,
|
| 528 |
+
1
|
| 529 |
+
],
|
| 530 |
+
[
|
| 531 |
+
34,
|
| 532 |
+
0
|
| 533 |
+
],
|
| 534 |
+
[
|
| 535 |
+
23,
|
| 536 |
+
0
|
| 537 |
+
],
|
| 538 |
+
[
|
| 539 |
+
12,
|
| 540 |
+
3
|
| 541 |
+
],
|
| 542 |
+
[
|
| 543 |
+
3,
|
| 544 |
+
0
|
| 545 |
+
],
|
| 546 |
+
[
|
| 547 |
+
17,
|
| 548 |
+
2
|
| 549 |
+
],
|
| 550 |
+
[
|
| 551 |
+
30,
|
| 552 |
+
5
|
| 553 |
+
],
|
| 554 |
+
[
|
| 555 |
+
24,
|
| 556 |
+
1
|
| 557 |
+
],
|
| 558 |
+
[
|
| 559 |
+
35,
|
| 560 |
+
7
|
| 561 |
+
],
|
| 562 |
+
[
|
| 563 |
+
39,
|
| 564 |
+
7
|
| 565 |
+
],
|
| 566 |
+
[
|
| 567 |
+
14,
|
| 568 |
+
2
|
| 569 |
+
],
|
| 570 |
+
[
|
| 571 |
+
4,
|
| 572 |
+
7
|
| 573 |
+
],
|
| 574 |
+
[
|
| 575 |
+
28,
|
| 576 |
+
1
|
| 577 |
+
],
|
| 578 |
+
[
|
| 579 |
+
10,
|
| 580 |
+
4
|
| 581 |
+
],
|
| 582 |
+
[
|
| 583 |
+
1,
|
| 584 |
+
1
|
| 585 |
+
],
|
| 586 |
+
[
|
| 587 |
+
24,
|
| 588 |
+
0
|
| 589 |
+
],
|
| 590 |
+
[
|
| 591 |
+
33,
|
| 592 |
+
6
|
| 593 |
+
],
|
| 594 |
+
[
|
| 595 |
+
13,
|
| 596 |
+
3
|
| 597 |
+
],
|
| 598 |
+
[
|
| 599 |
+
38,
|
| 600 |
+
5
|
| 601 |
+
]
|
| 602 |
+
]
|
| 603 |
+
],
|
| 604 |
+
"output": 29
|
| 605 |
+
},
|
| 606 |
+
{
|
| 607 |
+
"input": [
|
| 608 |
+
57,
|
| 609 |
+
15,
|
| 610 |
+
[
|
| 611 |
+
[
|
| 612 |
+
22,
|
| 613 |
+
8
|
| 614 |
+
],
|
| 615 |
+
[
|
| 616 |
+
17,
|
| 617 |
+
9
|
| 618 |
+
],
|
| 619 |
+
[
|
| 620 |
+
25,
|
| 621 |
+
4
|
| 622 |
+
],
|
| 623 |
+
[
|
| 624 |
+
40,
|
| 625 |
+
13
|
| 626 |
+
],
|
| 627 |
+
[
|
| 628 |
+
21,
|
| 629 |
+
3
|
| 630 |
+
],
|
| 631 |
+
[
|
| 632 |
+
45,
|
| 633 |
+
9
|
| 634 |
+
],
|
| 635 |
+
[
|
| 636 |
+
36,
|
| 637 |
+
3
|
| 638 |
+
],
|
| 639 |
+
[
|
| 640 |
+
14,
|
| 641 |
+
12
|
| 642 |
+
],
|
| 643 |
+
[
|
| 644 |
+
8,
|
| 645 |
+
11
|
| 646 |
+
],
|
| 647 |
+
[
|
| 648 |
+
26,
|
| 649 |
+
1
|
| 650 |
+
],
|
| 651 |
+
[
|
| 652 |
+
32,
|
| 653 |
+
11
|
| 654 |
+
],
|
| 655 |
+
[
|
| 656 |
+
25,
|
| 657 |
+
9
|
| 658 |
+
],
|
| 659 |
+
[
|
| 660 |
+
32,
|
| 661 |
+
14
|
| 662 |
+
],
|
| 663 |
+
[
|
| 664 |
+
2,
|
| 665 |
+
10
|
| 666 |
+
],
|
| 667 |
+
[
|
| 668 |
+
12,
|
| 669 |
+
2
|
| 670 |
+
],
|
| 671 |
+
[
|
| 672 |
+
22,
|
| 673 |
+
6
|
| 674 |
+
],
|
| 675 |
+
[
|
| 676 |
+
31,
|
| 677 |
+
12
|
| 678 |
+
],
|
| 679 |
+
[
|
| 680 |
+
12,
|
| 681 |
+
8
|
| 682 |
+
],
|
| 683 |
+
[
|
| 684 |
+
43,
|
| 685 |
+
1
|
| 686 |
+
],
|
| 687 |
+
[
|
| 688 |
+
17,
|
| 689 |
+
10
|
| 690 |
+
],
|
| 691 |
+
[
|
| 692 |
+
11,
|
| 693 |
+
9
|
| 694 |
+
],
|
| 695 |
+
[
|
| 696 |
+
46,
|
| 697 |
+
0
|
| 698 |
+
],
|
| 699 |
+
[
|
| 700 |
+
24,
|
| 701 |
+
6
|
| 702 |
+
],
|
| 703 |
+
[
|
| 704 |
+
35,
|
| 705 |
+
6
|
| 706 |
+
],
|
| 707 |
+
[
|
| 708 |
+
46,
|
| 709 |
+
3
|
| 710 |
+
],
|
| 711 |
+
[
|
| 712 |
+
26,
|
| 713 |
+
12
|
| 714 |
+
]
|
| 715 |
+
],
|
| 716 |
+
[
|
| 717 |
+
[
|
| 718 |
+
55,
|
| 719 |
+
12
|
| 720 |
+
],
|
| 721 |
+
[
|
| 722 |
+
11,
|
| 723 |
+
7
|
| 724 |
+
],
|
| 725 |
+
[
|
| 726 |
+
2,
|
| 727 |
+
7
|
| 728 |
+
],
|
| 729 |
+
[
|
| 730 |
+
49,
|
| 731 |
+
13
|
| 732 |
+
],
|
| 733 |
+
[
|
| 734 |
+
46,
|
| 735 |
+
10
|
| 736 |
+
],
|
| 737 |
+
[
|
| 738 |
+
22,
|
| 739 |
+
7
|
| 740 |
+
]
|
| 741 |
+
]
|
| 742 |
+
],
|
| 743 |
+
"output": 96
|
| 744 |
+
},
|
| 745 |
+
{
|
| 746 |
+
"input": [
|
| 747 |
+
54,
|
| 748 |
+
7,
|
| 749 |
+
[
|
| 750 |
+
[
|
| 751 |
+
12,
|
| 752 |
+
2
|
| 753 |
+
]
|
| 754 |
+
],
|
| 755 |
+
[
|
| 756 |
+
[
|
| 757 |
+
47,
|
| 758 |
+
2
|
| 759 |
+
],
|
| 760 |
+
[
|
| 761 |
+
44,
|
| 762 |
+
3
|
| 763 |
+
]
|
| 764 |
+
]
|
| 765 |
+
],
|
| 766 |
+
"output": 323
|
| 767 |
+
},
|
| 768 |
+
{
|
| 769 |
+
"input": [
|
| 770 |
+
71,
|
| 771 |
+
91,
|
| 772 |
+
[
|
| 773 |
+
[
|
| 774 |
+
47,
|
| 775 |
+
65
|
| 776 |
+
],
|
| 777 |
+
[
|
| 778 |
+
22,
|
| 779 |
+
11
|
| 780 |
+
],
|
| 781 |
+
[
|
| 782 |
+
22,
|
| 783 |
+
75
|
| 784 |
+
],
|
| 785 |
+
[
|
| 786 |
+
43,
|
| 787 |
+
61
|
| 788 |
+
],
|
| 789 |
+
[
|
| 790 |
+
58,
|
| 791 |
+
28
|
| 792 |
+
],
|
| 793 |
+
[
|
| 794 |
+
15,
|
| 795 |
+
14
|
| 796 |
+
],
|
| 797 |
+
[
|
| 798 |
+
27,
|
| 799 |
+
46
|
| 800 |
+
],
|
| 801 |
+
[
|
| 802 |
+
13,
|
| 803 |
+
26
|
| 804 |
+
],
|
| 805 |
+
[
|
| 806 |
+
16,
|
| 807 |
+
22
|
| 808 |
+
],
|
| 809 |
+
[
|
| 810 |
+
63,
|
| 811 |
+
15
|
| 812 |
+
],
|
| 813 |
+
[
|
| 814 |
+
49,
|
| 815 |
+
86
|
| 816 |
+
],
|
| 817 |
+
[
|
| 818 |
+
40,
|
| 819 |
+
22
|
| 820 |
+
],
|
| 821 |
+
[
|
| 822 |
+
16,
|
| 823 |
+
89
|
| 824 |
+
],
|
| 825 |
+
[
|
| 826 |
+
32,
|
| 827 |
+
45
|
| 828 |
+
],
|
| 829 |
+
[
|
| 830 |
+
6,
|
| 831 |
+
32
|
| 832 |
+
],
|
| 833 |
+
[
|
| 834 |
+
37,
|
| 835 |
+
63
|
| 836 |
+
],
|
| 837 |
+
[
|
| 838 |
+
47,
|
| 839 |
+
21
|
| 840 |
+
],
|
| 841 |
+
[
|
| 842 |
+
52,
|
| 843 |
+
72
|
| 844 |
+
],
|
| 845 |
+
[
|
| 846 |
+
34,
|
| 847 |
+
88
|
| 848 |
+
],
|
| 849 |
+
[
|
| 850 |
+
48,
|
| 851 |
+
1
|
| 852 |
+
],
|
| 853 |
+
[
|
| 854 |
+
40,
|
| 855 |
+
52
|
| 856 |
+
],
|
| 857 |
+
[
|
| 858 |
+
39,
|
| 859 |
+
1
|
| 860 |
+
],
|
| 861 |
+
[
|
| 862 |
+
48,
|
| 863 |
+
7
|
| 864 |
+
],
|
| 865 |
+
[
|
| 866 |
+
50,
|
| 867 |
+
38
|
| 868 |
+
],
|
| 869 |
+
[
|
| 870 |
+
65,
|
| 871 |
+
87
|
| 872 |
+
],
|
| 873 |
+
[
|
| 874 |
+
9,
|
| 875 |
+
34
|
| 876 |
+
],
|
| 877 |
+
[
|
| 878 |
+
49,
|
| 879 |
+
24
|
| 880 |
+
],
|
| 881 |
+
[
|
| 882 |
+
34,
|
| 883 |
+
69
|
| 884 |
+
],
|
| 885 |
+
[
|
| 886 |
+
10,
|
| 887 |
+
41
|
| 888 |
+
],
|
| 889 |
+
[
|
| 890 |
+
67,
|
| 891 |
+
14
|
| 892 |
+
],
|
| 893 |
+
[
|
| 894 |
+
54,
|
| 895 |
+
87
|
| 896 |
+
],
|
| 897 |
+
[
|
| 898 |
+
50,
|
| 899 |
+
16
|
| 900 |
+
],
|
| 901 |
+
[
|
| 902 |
+
58,
|
| 903 |
+
81
|
| 904 |
+
],
|
| 905 |
+
[
|
| 906 |
+
8,
|
| 907 |
+
16
|
| 908 |
+
],
|
| 909 |
+
[
|
| 910 |
+
27,
|
| 911 |
+
23
|
| 912 |
+
],
|
| 913 |
+
[
|
| 914 |
+
21,
|
| 915 |
+
44
|
| 916 |
+
],
|
| 917 |
+
[
|
| 918 |
+
4,
|
| 919 |
+
34
|
| 920 |
+
],
|
| 921 |
+
[
|
| 922 |
+
7,
|
| 923 |
+
2
|
| 924 |
+
],
|
| 925 |
+
[
|
| 926 |
+
65,
|
| 927 |
+
86
|
| 928 |
+
],
|
| 929 |
+
[
|
| 930 |
+
20,
|
| 931 |
+
60
|
| 932 |
+
]
|
| 933 |
+
],
|
| 934 |
+
[
|
| 935 |
+
[
|
| 936 |
+
27,
|
| 937 |
+
47
|
| 938 |
+
],
|
| 939 |
+
[
|
| 940 |
+
15,
|
| 941 |
+
24
|
| 942 |
+
],
|
| 943 |
+
[
|
| 944 |
+
36,
|
| 945 |
+
4
|
| 946 |
+
],
|
| 947 |
+
[
|
| 948 |
+
59,
|
| 949 |
+
58
|
| 950 |
+
],
|
| 951 |
+
[
|
| 952 |
+
24,
|
| 953 |
+
45
|
| 954 |
+
],
|
| 955 |
+
[
|
| 956 |
+
63,
|
| 957 |
+
31
|
| 958 |
+
],
|
| 959 |
+
[
|
| 960 |
+
43,
|
| 961 |
+
52
|
| 962 |
+
],
|
| 963 |
+
[
|
| 964 |
+
41,
|
| 965 |
+
6
|
| 966 |
+
],
|
| 967 |
+
[
|
| 968 |
+
21,
|
| 969 |
+
28
|
| 970 |
+
],
|
| 971 |
+
[
|
| 972 |
+
48,
|
| 973 |
+
45
|
| 974 |
+
],
|
| 975 |
+
[
|
| 976 |
+
58,
|
| 977 |
+
80
|
| 978 |
+
],
|
| 979 |
+
[
|
| 980 |
+
11,
|
| 981 |
+
60
|
| 982 |
+
],
|
| 983 |
+
[
|
| 984 |
+
15,
|
| 985 |
+
48
|
| 986 |
+
],
|
| 987 |
+
[
|
| 988 |
+
45,
|
| 989 |
+
31
|
| 990 |
+
],
|
| 991 |
+
[
|
| 992 |
+
44,
|
| 993 |
+
8
|
| 994 |
+
],
|
| 995 |
+
[
|
| 996 |
+
65,
|
| 997 |
+
15
|
| 998 |
+
],
|
| 999 |
+
[
|
| 1000 |
+
10,
|
| 1001 |
+
12
|
| 1002 |
+
],
|
| 1003 |
+
[
|
| 1004 |
+
46,
|
| 1005 |
+
11
|
| 1006 |
+
],
|
| 1007 |
+
[
|
| 1008 |
+
12,
|
| 1009 |
+
40
|
| 1010 |
+
],
|
| 1011 |
+
[
|
| 1012 |
+
2,
|
| 1013 |
+
23
|
| 1014 |
+
],
|
| 1015 |
+
[
|
| 1016 |
+
2,
|
| 1017 |
+
29
|
| 1018 |
+
],
|
| 1019 |
+
[
|
| 1020 |
+
18,
|
| 1021 |
+
19
|
| 1022 |
+
],
|
| 1023 |
+
[
|
| 1024 |
+
8,
|
| 1025 |
+
39
|
| 1026 |
+
],
|
| 1027 |
+
[
|
| 1028 |
+
33,
|
| 1029 |
+
38
|
| 1030 |
+
],
|
| 1031 |
+
[
|
| 1032 |
+
18,
|
| 1033 |
+
22
|
| 1034 |
+
],
|
| 1035 |
+
[
|
| 1036 |
+
9,
|
| 1037 |
+
53
|
| 1038 |
+
],
|
| 1039 |
+
[
|
| 1040 |
+
27,
|
| 1041 |
+
82
|
| 1042 |
+
],
|
| 1043 |
+
[
|
| 1044 |
+
48,
|
| 1045 |
+
56
|
| 1046 |
+
],
|
| 1047 |
+
[
|
| 1048 |
+
69,
|
| 1049 |
+
36
|
| 1050 |
+
],
|
| 1051 |
+
[
|
| 1052 |
+
21,
|
| 1053 |
+
51
|
| 1054 |
+
],
|
| 1055 |
+
[
|
| 1056 |
+
70,
|
| 1057 |
+
41
|
| 1058 |
+
],
|
| 1059 |
+
[
|
| 1060 |
+
2,
|
| 1061 |
+
19
|
| 1062 |
+
],
|
| 1063 |
+
[
|
| 1064 |
+
18,
|
| 1065 |
+
76
|
| 1066 |
+
],
|
| 1067 |
+
[
|
| 1068 |
+
57,
|
| 1069 |
+
86
|
| 1070 |
+
],
|
| 1071 |
+
[
|
| 1072 |
+
10,
|
| 1073 |
+
38
|
| 1074 |
+
],
|
| 1075 |
+
[
|
| 1076 |
+
46,
|
| 1077 |
+
31
|
| 1078 |
+
],
|
| 1079 |
+
[
|
| 1080 |
+
24,
|
| 1081 |
+
49
|
| 1082 |
+
],
|
| 1083 |
+
[
|
| 1084 |
+
69,
|
| 1085 |
+
69
|
| 1086 |
+
],
|
| 1087 |
+
[
|
| 1088 |
+
6,
|
| 1089 |
+
40
|
| 1090 |
+
],
|
| 1091 |
+
[
|
| 1092 |
+
43,
|
| 1093 |
+
7
|
| 1094 |
+
],
|
| 1095 |
+
[
|
| 1096 |
+
39,
|
| 1097 |
+
9
|
| 1098 |
+
]
|
| 1099 |
+
]
|
| 1100 |
+
],
|
| 1101 |
+
"output": 2961
|
| 1102 |
+
},
|
| 1103 |
+
{
|
| 1104 |
+
"input": [
|
| 1105 |
+
89,
|
| 1106 |
+
89,
|
| 1107 |
+
[
|
| 1108 |
+
[
|
| 1109 |
+
29,
|
| 1110 |
+
81
|
| 1111 |
+
],
|
| 1112 |
+
[
|
| 1113 |
+
20,
|
| 1114 |
+
78
|
| 1115 |
+
],
|
| 1116 |
+
[
|
| 1117 |
+
29,
|
| 1118 |
+
38
|
| 1119 |
+
],
|
| 1120 |
+
[
|
| 1121 |
+
30,
|
| 1122 |
+
12
|
| 1123 |
+
],
|
| 1124 |
+
[
|
| 1125 |
+
10,
|
| 1126 |
+
3
|
| 1127 |
+
],
|
| 1128 |
+
[
|
| 1129 |
+
16,
|
| 1130 |
+
53
|
| 1131 |
+
],
|
| 1132 |
+
[
|
| 1133 |
+
5,
|
| 1134 |
+
22
|
| 1135 |
+
],
|
| 1136 |
+
[
|
| 1137 |
+
75,
|
| 1138 |
+
32
|
| 1139 |
+
],
|
| 1140 |
+
[
|
| 1141 |
+
70,
|
| 1142 |
+
45
|
| 1143 |
+
],
|
| 1144 |
+
[
|
| 1145 |
+
55,
|
| 1146 |
+
56
|
| 1147 |
+
],
|
| 1148 |
+
[
|
| 1149 |
+
23,
|
| 1150 |
+
12
|
| 1151 |
+
],
|
| 1152 |
+
[
|
| 1153 |
+
45,
|
| 1154 |
+
76
|
| 1155 |
+
],
|
| 1156 |
+
[
|
| 1157 |
+
56,
|
| 1158 |
+
15
|
| 1159 |
+
],
|
| 1160 |
+
[
|
| 1161 |
+
40,
|
| 1162 |
+
46
|
| 1163 |
+
],
|
| 1164 |
+
[
|
| 1165 |
+
57,
|
| 1166 |
+
74
|
| 1167 |
+
],
|
| 1168 |
+
[
|
| 1169 |
+
65,
|
| 1170 |
+
35
|
| 1171 |
+
],
|
| 1172 |
+
[
|
| 1173 |
+
25,
|
| 1174 |
+
27
|
| 1175 |
+
],
|
| 1176 |
+
[
|
| 1177 |
+
27,
|
| 1178 |
+
57
|
| 1179 |
+
],
|
| 1180 |
+
[
|
| 1181 |
+
62,
|
| 1182 |
+
30
|
| 1183 |
+
],
|
| 1184 |
+
[
|
| 1185 |
+
14,
|
| 1186 |
+
44
|
| 1187 |
+
],
|
| 1188 |
+
[
|
| 1189 |
+
67,
|
| 1190 |
+
41
|
| 1191 |
+
]
|
| 1192 |
+
],
|
| 1193 |
+
[
|
| 1194 |
+
[
|
| 1195 |
+
68,
|
| 1196 |
+
88
|
| 1197 |
+
],
|
| 1198 |
+
[
|
| 1199 |
+
84,
|
| 1200 |
+
78
|
| 1201 |
+
],
|
| 1202 |
+
[
|
| 1203 |
+
4,
|
| 1204 |
+
3
|
| 1205 |
+
],
|
| 1206 |
+
[
|
| 1207 |
+
37,
|
| 1208 |
+
9
|
| 1209 |
+
],
|
| 1210 |
+
[
|
| 1211 |
+
61,
|
| 1212 |
+
61
|
| 1213 |
+
],
|
| 1214 |
+
[
|
| 1215 |
+
59,
|
| 1216 |
+
9
|
| 1217 |
+
],
|
| 1218 |
+
[
|
| 1219 |
+
49,
|
| 1220 |
+
32
|
| 1221 |
+
],
|
| 1222 |
+
[
|
| 1223 |
+
24,
|
| 1224 |
+
45
|
| 1225 |
+
],
|
| 1226 |
+
[
|
| 1227 |
+
33,
|
| 1228 |
+
48
|
| 1229 |
+
],
|
| 1230 |
+
[
|
| 1231 |
+
67,
|
| 1232 |
+
80
|
| 1233 |
+
],
|
| 1234 |
+
[
|
| 1235 |
+
34,
|
| 1236 |
+
22
|
| 1237 |
+
],
|
| 1238 |
+
[
|
| 1239 |
+
18,
|
| 1240 |
+
47
|
| 1241 |
+
],
|
| 1242 |
+
[
|
| 1243 |
+
9,
|
| 1244 |
+
78
|
| 1245 |
+
],
|
| 1246 |
+
[
|
| 1247 |
+
17,
|
| 1248 |
+
30
|
| 1249 |
+
],
|
| 1250 |
+
[
|
| 1251 |
+
4,
|
| 1252 |
+
39
|
| 1253 |
+
],
|
| 1254 |
+
[
|
| 1255 |
+
80,
|
| 1256 |
+
46
|
| 1257 |
+
],
|
| 1258 |
+
[
|
| 1259 |
+
62,
|
| 1260 |
+
71
|
| 1261 |
+
],
|
| 1262 |
+
[
|
| 1263 |
+
49,
|
| 1264 |
+
19
|
| 1265 |
+
],
|
| 1266 |
+
[
|
| 1267 |
+
45,
|
| 1268 |
+
70
|
| 1269 |
+
],
|
| 1270 |
+
[
|
| 1271 |
+
34,
|
| 1272 |
+
3
|
| 1273 |
+
],
|
| 1274 |
+
[
|
| 1275 |
+
47,
|
| 1276 |
+
0
|
| 1277 |
+
],
|
| 1278 |
+
[
|
| 1279 |
+
29,
|
| 1280 |
+
83
|
| 1281 |
+
],
|
| 1282 |
+
[
|
| 1283 |
+
31,
|
| 1284 |
+
74
|
| 1285 |
+
],
|
| 1286 |
+
[
|
| 1287 |
+
30,
|
| 1288 |
+
54
|
| 1289 |
+
],
|
| 1290 |
+
[
|
| 1291 |
+
46,
|
| 1292 |
+
47
|
| 1293 |
+
],
|
| 1294 |
+
[
|
| 1295 |
+
61,
|
| 1296 |
+
8
|
| 1297 |
+
],
|
| 1298 |
+
[
|
| 1299 |
+
51,
|
| 1300 |
+
9
|
| 1301 |
+
],
|
| 1302 |
+
[
|
| 1303 |
+
81,
|
| 1304 |
+
1
|
| 1305 |
+
],
|
| 1306 |
+
[
|
| 1307 |
+
2,
|
| 1308 |
+
10
|
| 1309 |
+
],
|
| 1310 |
+
[
|
| 1311 |
+
47,
|
| 1312 |
+
42
|
| 1313 |
+
],
|
| 1314 |
+
[
|
| 1315 |
+
81,
|
| 1316 |
+
74
|
| 1317 |
+
],
|
| 1318 |
+
[
|
| 1319 |
+
34,
|
| 1320 |
+
2
|
| 1321 |
+
],
|
| 1322 |
+
[
|
| 1323 |
+
24,
|
| 1324 |
+
86
|
| 1325 |
+
],
|
| 1326 |
+
[
|
| 1327 |
+
45,
|
| 1328 |
+
60
|
| 1329 |
+
],
|
| 1330 |
+
[
|
| 1331 |
+
65,
|
| 1332 |
+
38
|
| 1333 |
+
],
|
| 1334 |
+
[
|
| 1335 |
+
28,
|
| 1336 |
+
1
|
| 1337 |
+
],
|
| 1338 |
+
[
|
| 1339 |
+
23,
|
| 1340 |
+
81
|
| 1341 |
+
],
|
| 1342 |
+
[
|
| 1343 |
+
70,
|
| 1344 |
+
80
|
| 1345 |
+
],
|
| 1346 |
+
[
|
| 1347 |
+
35,
|
| 1348 |
+
58
|
| 1349 |
+
],
|
| 1350 |
+
[
|
| 1351 |
+
19,
|
| 1352 |
+
65
|
| 1353 |
+
],
|
| 1354 |
+
[
|
| 1355 |
+
74,
|
| 1356 |
+
10
|
| 1357 |
+
],
|
| 1358 |
+
[
|
| 1359 |
+
53,
|
| 1360 |
+
51
|
| 1361 |
+
],
|
| 1362 |
+
[
|
| 1363 |
+
72,
|
| 1364 |
+
3
|
| 1365 |
+
],
|
| 1366 |
+
[
|
| 1367 |
+
15,
|
| 1368 |
+
9
|
| 1369 |
+
],
|
| 1370 |
+
[
|
| 1371 |
+
40,
|
| 1372 |
+
63
|
| 1373 |
+
],
|
| 1374 |
+
[
|
| 1375 |
+
15,
|
| 1376 |
+
67
|
| 1377 |
+
],
|
| 1378 |
+
[
|
| 1379 |
+
46,
|
| 1380 |
+
21
|
| 1381 |
+
]
|
| 1382 |
+
]
|
| 1383 |
+
],
|
| 1384 |
+
"output": 5165
|
| 1385 |
+
},
|
| 1386 |
+
{
|
| 1387 |
+
"input": [
|
| 1388 |
+
30,
|
| 1389 |
+
98,
|
| 1390 |
+
[
|
| 1391 |
+
[
|
| 1392 |
+
28,
|
| 1393 |
+
62
|
| 1394 |
+
],
|
| 1395 |
+
[
|
| 1396 |
+
20,
|
| 1397 |
+
14
|
| 1398 |
+
],
|
| 1399 |
+
[
|
| 1400 |
+
18,
|
| 1401 |
+
36
|
| 1402 |
+
],
|
| 1403 |
+
[
|
| 1404 |
+
24,
|
| 1405 |
+
68
|
| 1406 |
+
],
|
| 1407 |
+
[
|
| 1408 |
+
4,
|
| 1409 |
+
83
|
| 1410 |
+
],
|
| 1411 |
+
[
|
| 1412 |
+
18,
|
| 1413 |
+
60
|
| 1414 |
+
],
|
| 1415 |
+
[
|
| 1416 |
+
7,
|
| 1417 |
+
64
|
| 1418 |
+
],
|
| 1419 |
+
[
|
| 1420 |
+
9,
|
| 1421 |
+
89
|
| 1422 |
+
],
|
| 1423 |
+
[
|
| 1424 |
+
4,
|
| 1425 |
+
89
|
| 1426 |
+
],
|
| 1427 |
+
[
|
| 1428 |
+
19,
|
| 1429 |
+
35
|
| 1430 |
+
],
|
| 1431 |
+
[
|
| 1432 |
+
5,
|
| 1433 |
+
90
|
| 1434 |
+
],
|
| 1435 |
+
[
|
| 1436 |
+
19,
|
| 1437 |
+
22
|
| 1438 |
+
],
|
| 1439 |
+
[
|
| 1440 |
+
26,
|
| 1441 |
+
48
|
| 1442 |
+
],
|
| 1443 |
+
[
|
| 1444 |
+
18,
|
| 1445 |
+
37
|
| 1446 |
+
],
|
| 1447 |
+
[
|
| 1448 |
+
25,
|
| 1449 |
+
62
|
| 1450 |
+
],
|
| 1451 |
+
[
|
| 1452 |
+
15,
|
| 1453 |
+
86
|
| 1454 |
+
],
|
| 1455 |
+
[
|
| 1456 |
+
25,
|
| 1457 |
+
42
|
| 1458 |
+
]
|
| 1459 |
+
],
|
| 1460 |
+
[
|
| 1461 |
+
[
|
| 1462 |
+
12,
|
| 1463 |
+
27
|
| 1464 |
+
],
|
| 1465 |
+
[
|
| 1466 |
+
9,
|
| 1467 |
+
61
|
| 1468 |
+
],
|
| 1469 |
+
[
|
| 1470 |
+
20,
|
| 1471 |
+
38
|
| 1472 |
+
],
|
| 1473 |
+
[
|
| 1474 |
+
13,
|
| 1475 |
+
23
|
| 1476 |
+
],
|
| 1477 |
+
[
|
| 1478 |
+
13,
|
| 1479 |
+
26
|
| 1480 |
+
],
|
| 1481 |
+
[
|
| 1482 |
+
0,
|
| 1483 |
+
34
|
| 1484 |
+
],
|
| 1485 |
+
[
|
| 1486 |
+
12,
|
| 1487 |
+
13
|
| 1488 |
+
],
|
| 1489 |
+
[
|
| 1490 |
+
7,
|
| 1491 |
+
74
|
| 1492 |
+
],
|
| 1493 |
+
[
|
| 1494 |
+
23,
|
| 1495 |
+
3
|
| 1496 |
+
],
|
| 1497 |
+
[
|
| 1498 |
+
28,
|
| 1499 |
+
3
|
| 1500 |
+
],
|
| 1501 |
+
[
|
| 1502 |
+
14,
|
| 1503 |
+
58
|
| 1504 |
+
],
|
| 1505 |
+
[
|
| 1506 |
+
26,
|
| 1507 |
+
90
|
| 1508 |
+
],
|
| 1509 |
+
[
|
| 1510 |
+
17,
|
| 1511 |
+
86
|
| 1512 |
+
],
|
| 1513 |
+
[
|
| 1514 |
+
2,
|
| 1515 |
+
70
|
| 1516 |
+
],
|
| 1517 |
+
[
|
| 1518 |
+
12,
|
| 1519 |
+
21
|
| 1520 |
+
],
|
| 1521 |
+
[
|
| 1522 |
+
24,
|
| 1523 |
+
15
|
| 1524 |
+
],
|
| 1525 |
+
[
|
| 1526 |
+
20,
|
| 1527 |
+
76
|
| 1528 |
+
]
|
| 1529 |
+
]
|
| 1530 |
+
],
|
| 1531 |
+
"output": 1637
|
| 1532 |
+
},
|
| 1533 |
+
{
|
| 1534 |
+
"input": [
|
| 1535 |
+
67,
|
| 1536 |
+
19,
|
| 1537 |
+
[
|
| 1538 |
+
[
|
| 1539 |
+
6,
|
| 1540 |
+
12
|
| 1541 |
+
],
|
| 1542 |
+
[
|
| 1543 |
+
63,
|
| 1544 |
+
16
|
| 1545 |
+
],
|
| 1546 |
+
[
|
| 1547 |
+
55,
|
| 1548 |
+
2
|
| 1549 |
+
],
|
| 1550 |
+
[
|
| 1551 |
+
21,
|
| 1552 |
+
13
|
| 1553 |
+
],
|
| 1554 |
+
[
|
| 1555 |
+
8,
|
| 1556 |
+
0
|
| 1557 |
+
],
|
| 1558 |
+
[
|
| 1559 |
+
28,
|
| 1560 |
+
6
|
| 1561 |
+
],
|
| 1562 |
+
[
|
| 1563 |
+
59,
|
| 1564 |
+
15
|
| 1565 |
+
],
|
| 1566 |
+
[
|
| 1567 |
+
27,
|
| 1568 |
+
10
|
| 1569 |
+
],
|
| 1570 |
+
[
|
| 1571 |
+
30,
|
| 1572 |
+
18
|
| 1573 |
+
],
|
| 1574 |
+
[
|
| 1575 |
+
65,
|
| 1576 |
+
15
|
| 1577 |
+
],
|
| 1578 |
+
[
|
| 1579 |
+
7,
|
| 1580 |
+
7
|
| 1581 |
+
],
|
| 1582 |
+
[
|
| 1583 |
+
55,
|
| 1584 |
+
1
|
| 1585 |
+
],
|
| 1586 |
+
[
|
| 1587 |
+
18,
|
| 1588 |
+
16
|
| 1589 |
+
],
|
| 1590 |
+
[
|
| 1591 |
+
31,
|
| 1592 |
+
16
|
| 1593 |
+
],
|
| 1594 |
+
[
|
| 1595 |
+
12,
|
| 1596 |
+
12
|
| 1597 |
+
],
|
| 1598 |
+
[
|
| 1599 |
+
61,
|
| 1600 |
+
11
|
| 1601 |
+
],
|
| 1602 |
+
[
|
| 1603 |
+
9,
|
| 1604 |
+
1
|
| 1605 |
+
],
|
| 1606 |
+
[
|
| 1607 |
+
19,
|
| 1608 |
+
5
|
| 1609 |
+
],
|
| 1610 |
+
[
|
| 1611 |
+
33,
|
| 1612 |
+
7
|
| 1613 |
+
],
|
| 1614 |
+
[
|
| 1615 |
+
16,
|
| 1616 |
+
0
|
| 1617 |
+
],
|
| 1618 |
+
[
|
| 1619 |
+
41,
|
| 1620 |
+
17
|
| 1621 |
+
],
|
| 1622 |
+
[
|
| 1623 |
+
38,
|
| 1624 |
+
0
|
| 1625 |
+
],
|
| 1626 |
+
[
|
| 1627 |
+
15,
|
| 1628 |
+
4
|
| 1629 |
+
],
|
| 1630 |
+
[
|
| 1631 |
+
39,
|
| 1632 |
+
1
|
| 1633 |
+
],
|
| 1634 |
+
[
|
| 1635 |
+
49,
|
| 1636 |
+
3
|
| 1637 |
+
],
|
| 1638 |
+
[
|
| 1639 |
+
38,
|
| 1640 |
+
3
|
| 1641 |
+
],
|
| 1642 |
+
[
|
| 1643 |
+
48,
|
| 1644 |
+
16
|
| 1645 |
+
],
|
| 1646 |
+
[
|
| 1647 |
+
39,
|
| 1648 |
+
13
|
| 1649 |
+
],
|
| 1650 |
+
[
|
| 1651 |
+
16,
|
| 1652 |
+
15
|
| 1653 |
+
],
|
| 1654 |
+
[
|
| 1655 |
+
36,
|
| 1656 |
+
2
|
| 1657 |
+
],
|
| 1658 |
+
[
|
| 1659 |
+
7,
|
| 1660 |
+
18
|
| 1661 |
+
],
|
| 1662 |
+
[
|
| 1663 |
+
12,
|
| 1664 |
+
8
|
| 1665 |
+
],
|
| 1666 |
+
[
|
| 1667 |
+
23,
|
| 1668 |
+
8
|
| 1669 |
+
],
|
| 1670 |
+
[
|
| 1671 |
+
41,
|
| 1672 |
+
1
|
| 1673 |
+
],
|
| 1674 |
+
[
|
| 1675 |
+
19,
|
| 1676 |
+
10
|
| 1677 |
+
],
|
| 1678 |
+
[
|
| 1679 |
+
44,
|
| 1680 |
+
9
|
| 1681 |
+
],
|
| 1682 |
+
[
|
| 1683 |
+
48,
|
| 1684 |
+
6
|
| 1685 |
+
],
|
| 1686 |
+
[
|
| 1687 |
+
11,
|
| 1688 |
+
15
|
| 1689 |
+
],
|
| 1690 |
+
[
|
| 1691 |
+
63,
|
| 1692 |
+
1
|
| 1693 |
+
]
|
| 1694 |
+
],
|
| 1695 |
+
[
|
| 1696 |
+
[
|
| 1697 |
+
22,
|
| 1698 |
+
5
|
| 1699 |
+
],
|
| 1700 |
+
[
|
| 1701 |
+
65,
|
| 1702 |
+
0
|
| 1703 |
+
],
|
| 1704 |
+
[
|
| 1705 |
+
66,
|
| 1706 |
+
5
|
| 1707 |
+
],
|
| 1708 |
+
[
|
| 1709 |
+
33,
|
| 1710 |
+
11
|
| 1711 |
+
],
|
| 1712 |
+
[
|
| 1713 |
+
51,
|
| 1714 |
+
16
|
| 1715 |
+
],
|
| 1716 |
+
[
|
| 1717 |
+
44,
|
| 1718 |
+
14
|
| 1719 |
+
],
|
| 1720 |
+
[
|
| 1721 |
+
11,
|
| 1722 |
+
17
|
| 1723 |
+
],
|
| 1724 |
+
[
|
| 1725 |
+
7,
|
| 1726 |
+
4
|
| 1727 |
+
],
|
| 1728 |
+
[
|
| 1729 |
+
57,
|
| 1730 |
+
17
|
| 1731 |
+
],
|
| 1732 |
+
[
|
| 1733 |
+
38,
|
| 1734 |
+
13
|
| 1735 |
+
],
|
| 1736 |
+
[
|
| 1737 |
+
22,
|
| 1738 |
+
4
|
| 1739 |
+
],
|
| 1740 |
+
[
|
| 1741 |
+
63,
|
| 1742 |
+
15
|
| 1743 |
+
],
|
| 1744 |
+
[
|
| 1745 |
+
20,
|
| 1746 |
+
16
|
| 1747 |
+
],
|
| 1748 |
+
[
|
| 1749 |
+
53,
|
| 1750 |
+
16
|
| 1751 |
+
],
|
| 1752 |
+
[
|
| 1753 |
+
58,
|
| 1754 |
+
6
|
| 1755 |
+
],
|
| 1756 |
+
[
|
| 1757 |
+
39,
|
| 1758 |
+
17
|
| 1759 |
+
],
|
| 1760 |
+
[
|
| 1761 |
+
37,
|
| 1762 |
+
11
|
| 1763 |
+
],
|
| 1764 |
+
[
|
| 1765 |
+
17,
|
| 1766 |
+
5
|
| 1767 |
+
],
|
| 1768 |
+
[
|
| 1769 |
+
3,
|
| 1770 |
+
15
|
| 1771 |
+
],
|
| 1772 |
+
[
|
| 1773 |
+
8,
|
| 1774 |
+
5
|
| 1775 |
+
],
|
| 1776 |
+
[
|
| 1777 |
+
57,
|
| 1778 |
+
1
|
| 1779 |
+
],
|
| 1780 |
+
[
|
| 1781 |
+
65,
|
| 1782 |
+
11
|
| 1783 |
+
],
|
| 1784 |
+
[
|
| 1785 |
+
57,
|
| 1786 |
+
13
|
| 1787 |
+
],
|
| 1788 |
+
[
|
| 1789 |
+
33,
|
| 1790 |
+
13
|
| 1791 |
+
],
|
| 1792 |
+
[
|
| 1793 |
+
18,
|
| 1794 |
+
9
|
| 1795 |
+
],
|
| 1796 |
+
[
|
| 1797 |
+
64,
|
| 1798 |
+
15
|
| 1799 |
+
],
|
| 1800 |
+
[
|
| 1801 |
+
52,
|
| 1802 |
+
1
|
| 1803 |
+
],
|
| 1804 |
+
[
|
| 1805 |
+
60,
|
| 1806 |
+
8
|
| 1807 |
+
],
|
| 1808 |
+
[
|
| 1809 |
+
45,
|
| 1810 |
+
17
|
| 1811 |
+
],
|
| 1812 |
+
[
|
| 1813 |
+
9,
|
| 1814 |
+
0
|
| 1815 |
+
],
|
| 1816 |
+
[
|
| 1817 |
+
3,
|
| 1818 |
+
17
|
| 1819 |
+
],
|
| 1820 |
+
[
|
| 1821 |
+
9,
|
| 1822 |
+
6
|
| 1823 |
+
],
|
| 1824 |
+
[
|
| 1825 |
+
51,
|
| 1826 |
+
11
|
| 1827 |
+
],
|
| 1828 |
+
[
|
| 1829 |
+
35,
|
| 1830 |
+
3
|
| 1831 |
+
],
|
| 1832 |
+
[
|
| 1833 |
+
15,
|
| 1834 |
+
0
|
| 1835 |
+
],
|
| 1836 |
+
[
|
| 1837 |
+
54,
|
| 1838 |
+
1
|
| 1839 |
+
]
|
| 1840 |
+
]
|
| 1841 |
+
],
|
| 1842 |
+
"output": 240
|
| 1843 |
+
},
|
| 1844 |
+
{
|
| 1845 |
+
"input": [
|
| 1846 |
+
97,
|
| 1847 |
+
4,
|
| 1848 |
+
[
|
| 1849 |
+
[
|
| 1850 |
+
80,
|
| 1851 |
+
1
|
| 1852 |
+
],
|
| 1853 |
+
[
|
| 1854 |
+
4,
|
| 1855 |
+
0
|
| 1856 |
+
],
|
| 1857 |
+
[
|
| 1858 |
+
93,
|
| 1859 |
+
1
|
| 1860 |
+
],
|
| 1861 |
+
[
|
| 1862 |
+
61,
|
| 1863 |
+
0
|
| 1864 |
+
],
|
| 1865 |
+
[
|
| 1866 |
+
83,
|
| 1867 |
+
0
|
| 1868 |
+
],
|
| 1869 |
+
[
|
| 1870 |
+
92,
|
| 1871 |
+
3
|
| 1872 |
+
],
|
| 1873 |
+
[
|
| 1874 |
+
81,
|
| 1875 |
+
2
|
| 1876 |
+
],
|
| 1877 |
+
[
|
| 1878 |
+
29,
|
| 1879 |
+
1
|
| 1880 |
+
],
|
| 1881 |
+
[
|
| 1882 |
+
54,
|
| 1883 |
+
0
|
| 1884 |
+
],
|
| 1885 |
+
[
|
| 1886 |
+
67,
|
| 1887 |
+
0
|
| 1888 |
+
],
|
| 1889 |
+
[
|
| 1890 |
+
37,
|
| 1891 |
+
2
|
| 1892 |
+
],
|
| 1893 |
+
[
|
| 1894 |
+
70,
|
| 1895 |
+
2
|
| 1896 |
+
],
|
| 1897 |
+
[
|
| 1898 |
+
80,
|
| 1899 |
+
0
|
| 1900 |
+
],
|
| 1901 |
+
[
|
| 1902 |
+
36,
|
| 1903 |
+
3
|
| 1904 |
+
],
|
| 1905 |
+
[
|
| 1906 |
+
27,
|
| 1907 |
+
3
|
| 1908 |
+
],
|
| 1909 |
+
[
|
| 1910 |
+
52,
|
| 1911 |
+
2
|
| 1912 |
+
],
|
| 1913 |
+
[
|
| 1914 |
+
74,
|
| 1915 |
+
2
|
| 1916 |
+
],
|
| 1917 |
+
[
|
| 1918 |
+
32,
|
| 1919 |
+
2
|
| 1920 |
+
],
|
| 1921 |
+
[
|
| 1922 |
+
35,
|
| 1923 |
+
1
|
| 1924 |
+
],
|
| 1925 |
+
[
|
| 1926 |
+
18,
|
| 1927 |
+
0
|
| 1928 |
+
],
|
| 1929 |
+
[
|
| 1930 |
+
82,
|
| 1931 |
+
3
|
| 1932 |
+
],
|
| 1933 |
+
[
|
| 1934 |
+
71,
|
| 1935 |
+
3
|
| 1936 |
+
],
|
| 1937 |
+
[
|
| 1938 |
+
18,
|
| 1939 |
+
3
|
| 1940 |
+
],
|
| 1941 |
+
[
|
| 1942 |
+
22,
|
| 1943 |
+
3
|
| 1944 |
+
],
|
| 1945 |
+
[
|
| 1946 |
+
91,
|
| 1947 |
+
2
|
| 1948 |
+
],
|
| 1949 |
+
[
|
| 1950 |
+
70,
|
| 1951 |
+
1
|
| 1952 |
+
],
|
| 1953 |
+
[
|
| 1954 |
+
94,
|
| 1955 |
+
1
|
| 1956 |
+
],
|
| 1957 |
+
[
|
| 1958 |
+
37,
|
| 1959 |
+
1
|
| 1960 |
+
],
|
| 1961 |
+
[
|
| 1962 |
+
52,
|
| 1963 |
+
1
|
| 1964 |
+
],
|
| 1965 |
+
[
|
| 1966 |
+
28,
|
| 1967 |
+
1
|
| 1968 |
+
],
|
| 1969 |
+
[
|
| 1970 |
+
8,
|
| 1971 |
+
1
|
| 1972 |
+
],
|
| 1973 |
+
[
|
| 1974 |
+
33,
|
| 1975 |
+
0
|
| 1976 |
+
],
|
| 1977 |
+
[
|
| 1978 |
+
46,
|
| 1979 |
+
0
|
| 1980 |
+
],
|
| 1981 |
+
[
|
| 1982 |
+
35,
|
| 1983 |
+
3
|
| 1984 |
+
],
|
| 1985 |
+
[
|
| 1986 |
+
15,
|
| 1987 |
+
0
|
| 1988 |
+
],
|
| 1989 |
+
[
|
| 1990 |
+
81,
|
| 1991 |
+
0
|
| 1992 |
+
],
|
| 1993 |
+
[
|
| 1994 |
+
86,
|
| 1995 |
+
2
|
| 1996 |
+
]
|
| 1997 |
+
],
|
| 1998 |
+
[
|
| 1999 |
+
[
|
| 2000 |
+
45,
|
| 2001 |
+
1
|
| 2002 |
+
],
|
| 2003 |
+
[
|
| 2004 |
+
91,
|
| 2005 |
+
1
|
| 2006 |
+
],
|
| 2007 |
+
[
|
| 2008 |
+
92,
|
| 2009 |
+
0
|
| 2010 |
+
],
|
| 2011 |
+
[
|
| 2012 |
+
42,
|
| 2013 |
+
2
|
| 2014 |
+
],
|
| 2015 |
+
[
|
| 2016 |
+
94,
|
| 2017 |
+
3
|
| 2018 |
+
],
|
| 2019 |
+
[
|
| 2020 |
+
8,
|
| 2021 |
+
3
|
| 2022 |
+
],
|
| 2023 |
+
[
|
| 2024 |
+
41,
|
| 2025 |
+
3
|
| 2026 |
+
],
|
| 2027 |
+
[
|
| 2028 |
+
68,
|
| 2029 |
+
2
|
| 2030 |
+
],
|
| 2031 |
+
[
|
| 2032 |
+
90,
|
| 2033 |
+
2
|
| 2034 |
+
],
|
| 2035 |
+
[
|
| 2036 |
+
95,
|
| 2037 |
+
1
|
| 2038 |
+
],
|
| 2039 |
+
[
|
| 2040 |
+
7,
|
| 2041 |
+
1
|
| 2042 |
+
],
|
| 2043 |
+
[
|
| 2044 |
+
40,
|
| 2045 |
+
1
|
| 2046 |
+
],
|
| 2047 |
+
[
|
| 2048 |
+
21,
|
| 2049 |
+
0
|
| 2050 |
+
],
|
| 2051 |
+
[
|
| 2052 |
+
18,
|
| 2053 |
+
1
|
| 2054 |
+
],
|
| 2055 |
+
[
|
| 2056 |
+
20,
|
| 2057 |
+
1
|
| 2058 |
+
],
|
| 2059 |
+
[
|
| 2060 |
+
31,
|
| 2061 |
+
1
|
| 2062 |
+
],
|
| 2063 |
+
[
|
| 2064 |
+
12,
|
| 2065 |
+
0
|
| 2066 |
+
],
|
| 2067 |
+
[
|
| 2068 |
+
47,
|
| 2069 |
+
0
|
| 2070 |
+
],
|
| 2071 |
+
[
|
| 2072 |
+
69,
|
| 2073 |
+
0
|
| 2074 |
+
],
|
| 2075 |
+
[
|
| 2076 |
+
69,
|
| 2077 |
+
3
|
| 2078 |
+
],
|
| 2079 |
+
[
|
| 2080 |
+
85,
|
| 2081 |
+
2
|
| 2082 |
+
],
|
| 2083 |
+
[
|
| 2084 |
+
75,
|
| 2085 |
+
1
|
| 2086 |
+
],
|
| 2087 |
+
[
|
| 2088 |
+
46,
|
| 2089 |
+
1
|
| 2090 |
+
],
|
| 2091 |
+
[
|
| 2092 |
+
16,
|
| 2093 |
+
3
|
| 2094 |
+
],
|
| 2095 |
+
[
|
| 2096 |
+
49,
|
| 2097 |
+
3
|
| 2098 |
+
],
|
| 2099 |
+
[
|
| 2100 |
+
29,
|
| 2101 |
+
3
|
| 2102 |
+
],
|
| 2103 |
+
[
|
| 2104 |
+
31,
|
| 2105 |
+
0
|
| 2106 |
+
],
|
| 2107 |
+
[
|
| 2108 |
+
45,
|
| 2109 |
+
2
|
| 2110 |
+
],
|
| 2111 |
+
[
|
| 2112 |
+
14,
|
| 2113 |
+
2
|
| 2114 |
+
],
|
| 2115 |
+
[
|
| 2116 |
+
3,
|
| 2117 |
+
2
|
| 2118 |
+
],
|
| 2119 |
+
[
|
| 2120 |
+
4,
|
| 2121 |
+
1
|
| 2122 |
+
],
|
| 2123 |
+
[
|
| 2124 |
+
5,
|
| 2125 |
+
2
|
| 2126 |
+
],
|
| 2127 |
+
[
|
| 2128 |
+
43,
|
| 2129 |
+
1
|
| 2130 |
+
],
|
| 2131 |
+
[
|
| 2132 |
+
11,
|
| 2133 |
+
0
|
| 2134 |
+
],
|
| 2135 |
+
[
|
| 2136 |
+
76,
|
| 2137 |
+
1
|
| 2138 |
+
],
|
| 2139 |
+
[
|
| 2140 |
+
66,
|
| 2141 |
+
0
|
| 2142 |
+
],
|
| 2143 |
+
[
|
| 2144 |
+
68,
|
| 2145 |
+
0
|
| 2146 |
+
],
|
| 2147 |
+
[
|
| 2148 |
+
68,
|
| 2149 |
+
3
|
| 2150 |
+
],
|
| 2151 |
+
[
|
| 2152 |
+
38,
|
| 2153 |
+
2
|
| 2154 |
+
],
|
| 2155 |
+
[
|
| 2156 |
+
40,
|
| 2157 |
+
2
|
| 2158 |
+
],
|
| 2159 |
+
[
|
| 2160 |
+
84,
|
| 2161 |
+
2
|
| 2162 |
+
]
|
| 2163 |
+
]
|
| 2164 |
+
],
|
| 2165 |
+
"output": 70
|
| 2166 |
+
}
|
| 2167 |
+
],
|
| 2168 |
+
"haskell_template": "countUnguarded :: Int -> Int -> [[Int]] -> [[Int]] -> Int\ncountUnguarded m n guards walls ",
|
| 2169 |
+
"ocaml_template": "let countUnguarded (m: int) (n: int) (guards: int list list) (walls: int list list) : int = ",
|
| 2170 |
+
"scala_template": "def countUnguarded(m: Int,n: Int,guards: List[List[Int]],walls: List[List[Int]]): Int = { \n \n}",
|
| 2171 |
+
"java_template": "public static int countUnguarded(int m, int n, List<List<Integer>> guards, List<List<Integer>> walls) {\n\n}",
|
| 2172 |
+
"python_template": "class Solution(object):\n def countUnguarded(self, m, n, guards, walls):\n \"\"\"\n :type m: int\n :type n: int\n :type guards: List[List[int]]\n :type walls: List[List[int]]\n :rtype: int\n \"\"\"\n "
|
| 2173 |
+
}
|
count_unguarded_cells_in_the_grid/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 7 (countUnguarded 4 6 [[0;0];[1;1];[2;3]] [[0;1];[2;2];[1;4]])
|
| 12 |
+
|
| 13 |
+
let test2 _ = assert_equal 4 (countUnguarded 3 3 [[1;1]] [[0;1];[1;0];[2;1];[1;2]])
|
| 14 |
+
|
| 15 |
+
|
| 16 |
+
(* Grouping test cases *)
|
| 17 |
+
let suite = "Test Suite for countUnguarded" >::: [
|
| 18 |
+
|
| 19 |
+
"test1" >:: test1;
|
| 20 |
+
"test2" >:: test2;
|
| 21 |
+
]
|
| 22 |
+
|
| 23 |
+
|
| 24 |
+
(* Running the tests *)
|
| 25 |
+
let () = run_test_tt_main suite
|
| 26 |
+
end
|
count_unguarded_cells_in_the_grid/scala_tests/MySuite.scala
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
|
| 2 |
+
class MySuite extends munit.FunSuite {
|
| 3 |
+
|
| 4 |
+
test("test1") {
|
| 5 |
+
assertEquals(Main.countUnguarded(4,6,List(List(0,0),List(1,1),List(2,3)),List(List(0,1),List(2,2),List(1,4))), 7)
|
| 6 |
+
}
|
| 7 |
+
|
| 8 |
+
test("test2") {
|
| 9 |
+
assertEquals(Main.countUnguarded(3,3,List(List(1,1)),List(List(0,1),List(1,0),List(2,1),List(1,2))), 4)
|
| 10 |
+
}
|
| 11 |
+
|
| 12 |
+
}
|
count_unreachable_pairs_of_nodes_in_an_undirected_graph/haskell_tests/Main.hs
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:4bed2626d3b40d27fb4e530060800812b16d269ad6a9eaf43db818a057a83d0a
|
| 3 |
+
size 30964688
|
count_unreachable_pairs_of_nodes_in_an_undirected_graph/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(0, countPairs(3, new ArrayList<>(Arrays.asList(new ArrayList<>(Arrays.asList(0,1)),new ArrayList<>(Arrays.asList(0,2)),new ArrayList<>(Arrays.asList(1,2))))));
|
| 15 |
+
}
|
| 16 |
+
@Test
|
| 17 |
+
public void test2() {
|
| 18 |
+
assertEquals(14, countPairs(7, new ArrayList<>(Arrays.asList(new ArrayList<>(Arrays.asList(0,2)),new ArrayList<>(Arrays.asList(0,5)),new ArrayList<>(Arrays.asList(2,4)),new ArrayList<>(Arrays.asList(1,6)),new ArrayList<>(Arrays.asList(5,4))))));
|
| 19 |
+
}
|
| 20 |
+
|
| 21 |
+
}
|
count_unreachable_pairs_of_nodes_in_an_undirected_graph/meta.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:a4d84dc62332a933cc05b947281440e411a662a2852d199b7f813a542ef88a25
|
| 3 |
+
size 105484709
|
count_unreachable_pairs_of_nodes_in_an_undirected_graph/ocaml_tests/main.ml
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:0034496c8035f20349a6835ce477f52814560a5b6e066876ebd7ede1125996a0
|
| 3 |
+
size 15482623
|
count_unreachable_pairs_of_nodes_in_an_undirected_graph/scala_tests/MySuite.scala
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:d08630324c4f10be2e4f6d19576beb25928ed083f7c33d1535937e556a8058c7
|
| 3 |
+
size 19482427
|
count_valid_paths_in_a_tree/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, countPaths(5, new ArrayList<>(Arrays.asList(new ArrayList<>(Arrays.asList(1,2)),new ArrayList<>(Arrays.asList(1,3)),new ArrayList<>(Arrays.asList(2,4)),new ArrayList<>(Arrays.asList(2,5))))));
|
| 15 |
+
}
|
| 16 |
+
@Test
|
| 17 |
+
public void test2() {
|
| 18 |
+
assertEquals(6, countPaths(6, new ArrayList<>(Arrays.asList(new ArrayList<>(Arrays.asList(1,2)),new ArrayList<>(Arrays.asList(1,3)),new ArrayList<>(Arrays.asList(2,4)),new ArrayList<>(Arrays.asList(3,5)),new ArrayList<>(Arrays.asList(3,6))))));
|
| 19 |
+
}
|
| 20 |
+
|
| 21 |
+
}
|
count_ways_to_build_good_strings/.DS_Store
ADDED
|
Binary file (6.15 kB). View file
|
|
|
count_ways_to_build_good_strings/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 (countGoodStrings 3 3 1 1)," 8 (countGoodStrings 3 3 1 1))
|
| 13 |
+
|
| 14 |
+
test2 :: Test
|
| 15 |
+
test2 = TestCase (assertEqual "for (countGoodStrings 2 3 1 2)," 5 (countGoodStrings 2 3 1 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
|
count_ways_to_build_good_strings/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(8, countGoodStrings(3, 3, 1, 1));
|
| 15 |
+
}
|
| 16 |
+
@Test
|
| 17 |
+
public void test2() {
|
| 18 |
+
assertEquals(5, countGoodStrings(2, 3, 1, 2));
|
| 19 |
+
}
|
| 20 |
+
|
| 21 |
+
}
|
count_ways_to_build_good_strings/meta.json
ADDED
|
@@ -0,0 +1,117 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"id": 2562,
|
| 3 |
+
"name": "count_ways_to_build_good_strings",
|
| 4 |
+
"difficulty": "Medium",
|
| 5 |
+
"link": "https://leetcode.com/problems/count-ways-to-build-good-strings/",
|
| 6 |
+
"date": "1667001600000",
|
| 7 |
+
"task_description": "Given the integers `zero`, `one`, `low`, and `high`, we can construct a string by starting with an empty string, and then at each step perform either of the following: Append the character `'0'` `zero` times. Append the character `'1'` `one` times. This can be performed any number of times. A **good** string is a string constructed by the above process having a **length** between `low` and `high` (**inclusive**). Return _the number of **different** good strings that can be constructed satisfying these properties._ Since the answer can be large, return it **modulo** `109 + 7`. **Example 1:** ``` **Input:** low = 3, high = 3, zero = 1, one = 1 **Output:** 8 **Explanation:** One possible valid good string is \"011\". It can be constructed as follows: \"\" -> \"0\" -> \"01\" -> \"011\". All binary strings from \"000\" to \"111\" are good strings in this example. ``` **Example 2:** ``` **Input:** low = 2, high = 3, zero = 1, one = 2 **Output:** 5 **Explanation:** The good strings are \"00\", \"11\", \"000\", \"110\", and \"011\". ``` **Constraints:** `1 <= low <= high <= 105` `1 <= zero, one <= low`",
|
| 8 |
+
"public_test_cases": [
|
| 9 |
+
{
|
| 10 |
+
"label": "Example 1",
|
| 11 |
+
"input": "low = 3, high = 3, zero = 1, one = 1",
|
| 12 |
+
"output": "8 "
|
| 13 |
+
},
|
| 14 |
+
{
|
| 15 |
+
"label": "Example 2",
|
| 16 |
+
"input": "low = 2, high = 3, zero = 1, one = 2",
|
| 17 |
+
"output": "5 "
|
| 18 |
+
}
|
| 19 |
+
],
|
| 20 |
+
"private_test_cases": [
|
| 21 |
+
{
|
| 22 |
+
"input": [
|
| 23 |
+
43516,
|
| 24 |
+
53594,
|
| 25 |
+
36914,
|
| 26 |
+
8563
|
| 27 |
+
],
|
| 28 |
+
"output": 3
|
| 29 |
+
},
|
| 30 |
+
{
|
| 31 |
+
"input": [
|
| 32 |
+
22795,
|
| 33 |
+
79620,
|
| 34 |
+
5950,
|
| 35 |
+
17821
|
| 36 |
+
],
|
| 37 |
+
"output": 271
|
| 38 |
+
},
|
| 39 |
+
{
|
| 40 |
+
"input": [
|
| 41 |
+
44226,
|
| 42 |
+
61537,
|
| 43 |
+
1112,
|
| 44 |
+
5820
|
| 45 |
+
],
|
| 46 |
+
"output": 6386055
|
| 47 |
+
},
|
| 48 |
+
{
|
| 49 |
+
"input": [
|
| 50 |
+
54729,
|
| 51 |
+
88024,
|
| 52 |
+
33857,
|
| 53 |
+
3651
|
| 54 |
+
],
|
| 55 |
+
"output": 165
|
| 56 |
+
},
|
| 57 |
+
{
|
| 58 |
+
"input": [
|
| 59 |
+
72028,
|
| 60 |
+
86808,
|
| 61 |
+
34039,
|
| 62 |
+
62250
|
| 63 |
+
],
|
| 64 |
+
"output": 0
|
| 65 |
+
},
|
| 66 |
+
{
|
| 67 |
+
"input": [
|
| 68 |
+
14697,
|
| 69 |
+
66644,
|
| 70 |
+
7822,
|
| 71 |
+
14370
|
| 72 |
+
],
|
| 73 |
+
"output": 110
|
| 74 |
+
},
|
| 75 |
+
{
|
| 76 |
+
"input": [
|
| 77 |
+
77737,
|
| 78 |
+
96641,
|
| 79 |
+
12337,
|
| 80 |
+
17682
|
| 81 |
+
],
|
| 82 |
+
"output": 70
|
| 83 |
+
},
|
| 84 |
+
{
|
| 85 |
+
"input": [
|
| 86 |
+
33570,
|
| 87 |
+
41074,
|
| 88 |
+
25499,
|
| 89 |
+
24258
|
| 90 |
+
],
|
| 91 |
+
"output": 0
|
| 92 |
+
},
|
| 93 |
+
{
|
| 94 |
+
"input": [
|
| 95 |
+
92099,
|
| 96 |
+
92587,
|
| 97 |
+
57439,
|
| 98 |
+
73995
|
| 99 |
+
],
|
| 100 |
+
"output": 0
|
| 101 |
+
},
|
| 102 |
+
{
|
| 103 |
+
"input": [
|
| 104 |
+
59859,
|
| 105 |
+
94179,
|
| 106 |
+
21463,
|
| 107 |
+
2717
|
| 108 |
+
],
|
| 109 |
+
"output": 2573
|
| 110 |
+
}
|
| 111 |
+
],
|
| 112 |
+
"haskell_template": "countGoodStrings :: Int -> Int -> Int -> Int -> Int\ncountGoodStrings low high zero one ",
|
| 113 |
+
"ocaml_template": "let countGoodStrings (low: int) (high: int) (zero: int) (one: int) : int = ",
|
| 114 |
+
"scala_template": "def countGoodStrings(low: Int,high: Int,zero: Int,one: Int): Int = { \n \n}",
|
| 115 |
+
"java_template": "public static int countGoodStrings(int low, int high, int zero, int one) {\n\n}",
|
| 116 |
+
"python_template": "class Solution(object):\n def countGoodStrings(self, low, high, zero, one):\n \"\"\"\n :type low: int\n :type high: int\n :type zero: int\n :type one: int\n :rtype: int\n \"\"\"\n "
|
| 117 |
+
}
|
count_ways_to_build_good_strings/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 8 (countGoodStrings 3 3 1 1)
|
| 12 |
+
|
| 13 |
+
let test2 _ = assert_equal 5 (countGoodStrings 2 3 1 2)
|
| 14 |
+
|
| 15 |
+
|
| 16 |
+
(* Grouping test cases *)
|
| 17 |
+
let suite = "Test Suite for countGoodStrings" >::: [
|
| 18 |
+
|
| 19 |
+
"test1" >:: test1;
|
| 20 |
+
"test2" >:: test2;
|
| 21 |
+
]
|
| 22 |
+
|
| 23 |
+
|
| 24 |
+
(* Running the tests *)
|
| 25 |
+
let () = run_test_tt_main suite
|
| 26 |
+
end
|
count_ways_to_build_good_strings/scala_tests/MySuite.scala
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
|
| 2 |
+
class MySuite extends munit.FunSuite {
|
| 3 |
+
|
| 4 |
+
test("test1") {
|
| 5 |
+
assertEquals(Main.countGoodStrings(3,3,1,1), 8)
|
| 6 |
+
}
|
| 7 |
+
|
| 8 |
+
test("test2") {
|
| 9 |
+
assertEquals(Main.countGoodStrings(2,3,1,2), 5)
|
| 10 |
+
}
|
| 11 |
+
|
| 12 |
+
}
|
count_ways_to_group_overlapping_ranges/.DS_Store
ADDED
|
Binary file (6.15 kB). View file
|
|
|
count_ways_to_group_overlapping_ranges/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 (countWays [[6,10],[5,15]])," 2 (countWays [[6,10],[5,15]]))
|
| 13 |
+
|
| 14 |
+
test2 :: Test
|
| 15 |
+
test2 = TestCase (assertEqual "for (countWays [[1,3],[10,20],[2,5],[4,8]])," 4 (countWays [[1,3],[10,20],[2,5],[4,8]]))
|
| 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
|
count_ways_to_group_overlapping_ranges/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(2, countWays(new ArrayList<>(Arrays.asList(new ArrayList<>(Arrays.asList(6,10)),new ArrayList<>(Arrays.asList(5,15))))));
|
| 15 |
+
}
|
| 16 |
+
@Test
|
| 17 |
+
public void test2() {
|
| 18 |
+
assertEquals(4, countWays(new ArrayList<>(Arrays.asList(new ArrayList<>(Arrays.asList(1,3)),new ArrayList<>(Arrays.asList(10,20)),new ArrayList<>(Arrays.asList(2,5)),new ArrayList<>(Arrays.asList(4,8))))));
|
| 19 |
+
}
|
| 20 |
+
|
| 21 |
+
}
|
count_ways_to_group_overlapping_ranges/meta.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:c45ef151455e14c4ff6bf7c3b9b2e0e2a6b82af112a48c330f54eb720ba14000
|
| 3 |
+
size 47568545
|
count_ways_to_group_overlapping_ranges/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 2 (countWays [[6;10];[5;15]])
|
| 12 |
+
|
| 13 |
+
let test2 _ = assert_equal 4 (countWays [[1;3];[10;20];[2;5];[4;8]])
|
| 14 |
+
|
| 15 |
+
|
| 16 |
+
(* Grouping test cases *)
|
| 17 |
+
let suite = "Test Suite for countWays" >::: [
|
| 18 |
+
|
| 19 |
+
"test1" >:: test1;
|
| 20 |
+
"test2" >:: test2;
|
| 21 |
+
]
|
| 22 |
+
|
| 23 |
+
|
| 24 |
+
(* Running the tests *)
|
| 25 |
+
let () = run_test_tt_main suite
|
| 26 |
+
end
|
count_ways_to_group_overlapping_ranges/scala_tests/MySuite.scala
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
|
| 2 |
+
class MySuite extends munit.FunSuite {
|
| 3 |
+
|
| 4 |
+
test("test1") {
|
| 5 |
+
assertEquals(Main.countWays(List(List(6,10),List(5,15))), 2)
|
| 6 |
+
}
|
| 7 |
+
|
| 8 |
+
test("test2") {
|
| 9 |
+
assertEquals(Main.countWays(List(List(1,3),List(10,20),List(2,5),List(4,8))), 4)
|
| 10 |
+
}
|
| 11 |
+
|
| 12 |
+
}
|
count_words_obtained_after_adding_a_letter/.DS_Store
ADDED
|
Binary file (6.15 kB). View file
|
|
|
count_words_obtained_after_adding_a_letter/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 (wordCount [ \"ant \", \"act \", \"tack \"] [ \"tack \", \"act \", \"acti \"])," 2 (wordCount ["ant","act","tack"] ["tack","act","acti"]))
|
| 13 |
+
|
| 14 |
+
test2 :: Test
|
| 15 |
+
test2 = TestCase (assertEqual "for (wordCount [ \"ab \", \"a \"] [ \"abc \", \"abcd \"])," 1 (wordCount ["ab","a"] ["abc","abcd"]))
|
| 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
|
count_words_obtained_after_adding_a_letter/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(2, wordCount(new ArrayList<>(Arrays.asList("ant","act","tack")), new ArrayList<>(Arrays.asList("tack","act","acti"))));
|
| 15 |
+
}
|
| 16 |
+
@Test
|
| 17 |
+
public void test2() {
|
| 18 |
+
assertEquals(1, wordCount(new ArrayList<>(Arrays.asList("ab","a")), new ArrayList<>(Arrays.asList("abc","abcd"))));
|
| 19 |
+
}
|
| 20 |
+
|
| 21 |
+
}
|
count_words_obtained_after_adding_a_letter/meta.json
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"id": 2256,
|
| 3 |
+
"name": "count_words_obtained_after_adding_a_letter",
|
| 4 |
+
"difficulty": "Medium",
|
| 5 |
+
"link": "https://leetcode.com/problems/count-words-obtained-after-adding-a-letter/",
|
| 6 |
+
"date": "1641081600000",
|
| 7 |
+
"task_description": "You are given two **0-indexed** arrays of strings `startWords` and `targetWords`. Each string consists of **lowercase English letters** only. For each string in `targetWords`, check if it is possible to choose a string from `startWords` and perform a **conversion operation** on it to be equal to that from `targetWords`. The **conversion operation** is described in the following two steps: **Append** any lowercase letter that is **not present** in the string to its end. For example, if the string is `\"abc\"`, the letters `'d'`, `'e'`, or `'y'` can be added to it, but not `'a'`. If `'d'` is added, the resulting string will be `\"abcd\"`. **Rearrange** the letters of the new string in **any** arbitrary order. For example, `\"abcd\"` can be rearranged to `\"acbd\"`, `\"bacd\"`, `\"cbda\"`, and so on. Note that it can also be rearranged to `\"abcd\"` itself. Return _the **number of strings** in _`targetWords`_ that can be obtained by performing the operations on **any** string of _`startWords`. **Note** that you will only be verifying if the string in `targetWords` can be obtained from a string in `startWords` by performing the operations. The strings in `startWords` **do not** actually change during this process. **Example 1:** ``` **Input:** startWords = [\"ant\",\"act\",\"tack\"], targetWords = [\"tack\",\"act\",\"acti\"] **Output:** 2 **Explanation:** - In order to form targetWords[0] = \"tack\", we use startWords[1] = \"act\", append 'k' to it, and rearrange \"actk\" to \"tack\". - There is no string in startWords that can be used to obtain targetWords[1] = \"act\". Note that \"act\" does exist in startWords, but we **must** append one letter to the string before rearranging it. - In order to form targetWords[2] = \"acti\", we use startWords[1] = \"act\", append 'i' to it, and rearrange \"acti\" to \"acti\" itself. ``` **Example 2:** ``` **Input:** startWords = [\"ab\",\"a\"], targetWords = [\"abc\",\"abcd\"] **Output:** 1 **Explanation:** - In order to form targetWords[0] = \"abc\", we use startWords[0] = \"ab\", add 'c' to it, and rearrange it to \"abc\". - There is no string in startWords that can be used to obtain targetWords[1] = \"abcd\". ``` **Constraints:** `1 <= startWords.length, targetWords.length <= 5 * 104` `1 <= startWords[i].length, targetWords[j].length <= 26` Each string of `startWords` and `targetWords` consists of lowercase English letters only. No letter occurs more than once in any string of `startWords` or `targetWords`.",
|
| 8 |
+
"public_test_cases": [
|
| 9 |
+
{
|
| 10 |
+
"label": "Example 1",
|
| 11 |
+
"input": "startWords = [\"ant\",\"act\",\"tack\"], targetWords = [\"tack\",\"act\",\"acti\"]",
|
| 12 |
+
"output": "2 "
|
| 13 |
+
},
|
| 14 |
+
{
|
| 15 |
+
"label": "Example 2",
|
| 16 |
+
"input": "startWords = [\"ab\",\"a\"], targetWords = [\"abc\",\"abcd\"]",
|
| 17 |
+
"output": "1 "
|
| 18 |
+
}
|
| 19 |
+
],
|
| 20 |
+
"private_test_cases": [],
|
| 21 |
+
"haskell_template": "wordCount :: [String] -> [String] -> Int\nwordCount startWords targetWords ",
|
| 22 |
+
"ocaml_template": "let wordCount (startWords: string list) (targetWords: string list) : int = ",
|
| 23 |
+
"scala_template": "def wordCount(startWords: List[String],targetWords: List[String]): Int = { \n \n}",
|
| 24 |
+
"java_template": "public static int wordCount(List<String> startWords, List<String> targetWords) {\n\n}",
|
| 25 |
+
"python_template": "class Solution(object):\n def wordCount(self, startWords, targetWords):\n \"\"\"\n :type startWords: List[str]\n :type targetWords: List[str]\n :rtype: int\n \"\"\"\n "
|
| 26 |
+
}
|
count_words_obtained_after_adding_a_letter/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 2 (wordCount ["ant";"act";"tack"] ["tack";"act";"acti"])
|
| 12 |
+
|
| 13 |
+
let test2 _ = assert_equal 1 (wordCount ["ab";"a"] ["abc";"abcd"])
|
| 14 |
+
|
| 15 |
+
|
| 16 |
+
(* Grouping test cases *)
|
| 17 |
+
let suite = "Test Suite for wordCount" >::: [
|
| 18 |
+
|
| 19 |
+
"test1" >:: test1;
|
| 20 |
+
"test2" >:: test2;
|
| 21 |
+
]
|
| 22 |
+
|
| 23 |
+
|
| 24 |
+
(* Running the tests *)
|
| 25 |
+
let () = run_test_tt_main suite
|
| 26 |
+
end
|
count_words_obtained_after_adding_a_letter/scala_tests/MySuite.scala
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
|
| 2 |
+
class MySuite extends munit.FunSuite {
|
| 3 |
+
|
| 4 |
+
test("test1") {
|
| 5 |
+
assertEquals(Main.wordCount(List("ant","act","tack"),List("tack","act","acti")), 2)
|
| 6 |
+
}
|
| 7 |
+
|
| 8 |
+
test("test2") {
|
| 9 |
+
assertEquals(Main.wordCount(List("ab","a"),List("abc","abcd")), 1)
|
| 10 |
+
}
|
| 11 |
+
|
| 12 |
+
}
|
count_zero_request_servers/haskell_tests/Main.hs
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:03613e04bcb7cfbbe2af922d150bafe8b405ed8d1f6183e05891a9846912a4df
|
| 3 |
+
size 22255905
|
count_zero_request_servers/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(1,2)), countServers(3, new ArrayList<>(Arrays.asList(new ArrayList<>(Arrays.asList(1,3)),new ArrayList<>(Arrays.asList(2,6)),new ArrayList<>(Arrays.asList(1,5)))), 5, new ArrayList<>(Arrays.asList(10,11))));
|
| 15 |
+
}
|
| 16 |
+
@Test
|
| 17 |
+
public void test2() {
|
| 18 |
+
assertEquals(new ArrayList<>(Arrays.asList(0,1)), countServers(3, new ArrayList<>(Arrays.asList(new ArrayList<>(Arrays.asList(2,4)),new ArrayList<>(Arrays.asList(2,1)),new ArrayList<>(Arrays.asList(1,2)),new ArrayList<>(Arrays.asList(3,1)))), 2, new ArrayList<>(Arrays.asList(3,4))));
|
| 19 |
+
}
|
| 20 |
+
|
| 21 |
+
}
|
count_zero_request_servers/meta.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:6f246dde58ebed5b34fb5ed4b64c144bd03d73f0c19e68bfad1be0e45eab3ea8
|
| 3 |
+
size 65688202
|
count_zero_request_servers/ocaml_tests/main.ml
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:78a861dfef73b9fe7a0b979e83984e983204f1485ab438466a8464687b661b40
|
| 3 |
+
size 12018501
|
count_zero_request_servers/scala_tests/MySuite.scala
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:ad10a84c44e53d1df36dd92df6c1f1019a27759228ebc9488444d29fc49cd942
|
| 3 |
+
size 13915553
|
counting_words_with_a_given_prefix/.DS_Store
ADDED
|
Binary file (6.15 kB). View file
|
|
|
counting_words_with_a_given_prefix/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 (prefixCount [ \"pay \", \" at tention \", \"practice \", \" at tend \"] \"at \")," 2 (prefixCount ["pay"," at tention","practice"," at tend"] "at"))
|
| 13 |
+
|
| 14 |
+
test2 :: Test
|
| 15 |
+
test2 = TestCase (assertEqual "for (prefixCount [ \"leetcode \", \"win \", \"loops \", \"success \"] \"code \")," 0 (prefixCount ["leetcode","win","loops","success"] "code"))
|
| 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
|
counting_words_with_a_given_prefix/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(2, prefixCount(new ArrayList<>(Arrays.asList("pay"," at tention","practice"," at tend")), "at"));
|
| 15 |
+
}
|
| 16 |
+
@Test
|
| 17 |
+
public void test2() {
|
| 18 |
+
assertEquals(0, prefixCount(new ArrayList<>(Arrays.asList("leetcode","win","loops","success")), "code"));
|
| 19 |
+
}
|
| 20 |
+
|
| 21 |
+
}
|
counting_words_with_a_given_prefix/meta.json
ADDED
|
@@ -0,0 +1,625 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"id": 2292,
|
| 3 |
+
"name": "counting_words_with_a_given_prefix",
|
| 4 |
+
"difficulty": "Easy",
|
| 5 |
+
"link": "https://leetcode.com/problems/counting-words-with-a-given-prefix/",
|
| 6 |
+
"date": "1645315200000",
|
| 7 |
+
"task_description": "You are given an array of strings `words` and a string `pref`. Return _the number of strings in _`words`_ that contain _`pref`_ as a **prefix**_. A **prefix** of a string `s` is any leading contiguous substring of `s`. **Example 1:** ``` **Input:** words = [\"pay\",\"**at**tention\",\"practice\",\"**at**tend\"], `pref `= \"at\" **Output:** 2 **Explanation:** The 2 strings that contain \"at\" as a prefix are: \"**at**tention\" and \"**at**tend\". ``` **Example 2:** ``` **Input:** words = [\"leetcode\",\"win\",\"loops\",\"success\"], `pref `= \"code\" **Output:** 0 **Explanation:** There are no strings that contain \"code\" as a prefix. ``` **Constraints:** `1 <= words.length <= 100` `1 <= words[i].length, pref.length <= 100` `words[i]` and `pref` consist of lowercase English letters.",
|
| 8 |
+
"public_test_cases": [
|
| 9 |
+
{
|
| 10 |
+
"label": "Example 1",
|
| 11 |
+
"input": "words = [\"pay\",\" at tention\",\"practice\",\" at tend\"], pref = \"at\"",
|
| 12 |
+
"output": "2 "
|
| 13 |
+
},
|
| 14 |
+
{
|
| 15 |
+
"label": "Example 2",
|
| 16 |
+
"input": "words = [\"leetcode\",\"win\",\"loops\",\"success\"], pref = \"code\"",
|
| 17 |
+
"output": "0 "
|
| 18 |
+
}
|
| 19 |
+
],
|
| 20 |
+
"private_test_cases": [
|
| 21 |
+
{
|
| 22 |
+
"input": [
|
| 23 |
+
[
|
| 24 |
+
"areelhzwwfib",
|
| 25 |
+
"okjyaddpudwnathmfivjfhdhwisjkzji",
|
| 26 |
+
"uhtlifquxtwyoekuizzfhgtinttuylfjxpgubvbibsjerlpeverdxrmnuapdnwxssxvmwoswicxebniujtsrvykrjprdvhg",
|
| 27 |
+
"vjlmcqvodzkc",
|
| 28 |
+
"tunrnoazkqiojaesevvysbyvxppftmrmifelpkkpdflcsmwhpvdnkzwojkdkzjtncsrrgdizaugocmlboggd",
|
| 29 |
+
"zmpjqdjmpsmieijdblicagjtvfkrnheltzebhozaoyglcpcuuzghydtvtncmxhskjxgzcmef",
|
| 30 |
+
"mpqvquwxbjsrbhwweuuzxupzsiavolclqbjmmenfvrwppeohuklijjrsyfacaqljqsmt",
|
| 31 |
+
"zmpkieitzixiznidatflckkfbkoalurwisakvjl",
|
| 32 |
+
"qaiycridyxruraqirjkimoup",
|
| 33 |
+
"clzimkytyabronuaetuxsprikvclm",
|
| 34 |
+
"cqmdqahpziypvghmwnpwdjkldkxndiojfdycbhlxkxuyqdcjajwnumutrvyserwcddjjcicpxhowuokmmykvpcjghbperns",
|
| 35 |
+
"bizmbjlng",
|
| 36 |
+
"pmunkheivawafwzsracr",
|
| 37 |
+
"emzc",
|
| 38 |
+
"tocxx",
|
| 39 |
+
"shsucqdzpynwrvxoktusfmmhzitoydxdmkzpaqvkejqlmvazhblqzzjvspwnneysindiblqyxrlsktrpmulvjfoztrymvtoohk",
|
| 40 |
+
"eocjerwldjnamitmwajweailoqvpyzuavzuafolqxbehkesbgkzklwwcjmdxxytwdhlhdjsynaexyojoozfccimxsotyceh",
|
| 41 |
+
"pvvmprqnbalzjdxzqfmcvgrdhsx",
|
| 42 |
+
"ptvujlujetmcl",
|
| 43 |
+
"abeccxkndqnxsxfpvb",
|
| 44 |
+
"wlcbgbvffznhajveuaggdbe",
|
| 45 |
+
"mjgzaxrbxqjheioqmbnsuutykajasmglmafjllfg",
|
| 46 |
+
"akckfdtpumijpmzeirfidweozwdfajvvbvqellevfrqvarxrrgorsufhsiagylmbsldojrbhtivmuthijvsfqfdp",
|
| 47 |
+
"sutuisinxzhotswuydvjsxvuzwtzuqfvirjytnnvxgjregf",
|
| 48 |
+
"ufxjzhjhobnybzdpnhrc",
|
| 49 |
+
"jorvnyojqfstmvaxqvdzxknvceepldypsoousfefcidkbh",
|
| 50 |
+
"innkjimkozxtohaherycnvxyyxawjgkrjtwgsbdmkkccuaubeagtrtkaipefcfbwyrmmljnladigwvxhnfhdopbcabbugx",
|
| 51 |
+
"feuzvudcgissyqsebtbbuemzhbqsipptlkccjlrozdpwdlgxahsweraaajxfxbyskaovsiuturesf",
|
| 52 |
+
"ysvwkjxgnzuepqkklvdlatysmqcewmcdxspeduixsjnnehochlltewkymispczfqdxehzuktpontsibzmuotycvxjlluihtahisd",
|
| 53 |
+
"htovsaaoggndtuymppjyrrshbfjmqatnpqncuiqewhxqanuiejtiybvlpnaootzzdylhobhyryraiyqxzwhhatpqudhzqdmqa",
|
| 54 |
+
"izdkqpvfldbbnatflfossmrapporuqyrypys",
|
| 55 |
+
"yazhqbvqvbhrgb",
|
| 56 |
+
"nymhfjpxkgebvrgkkownziqmiwkqelhlflhkouirjfmbptgscivrcmhkzwwqxjillumbrtcztjectyeurrxztbarjerpudanshei",
|
| 57 |
+
"bngytmuzarbcxtnxgqitashqauzezmdpjqtjvhkxykpqqjinfjtdlcegmpvxylgrtksh",
|
| 58 |
+
"hjpfljpdpaosymllzbgxrgjhkih",
|
| 59 |
+
"vusnqubjzfhlbgvtnrthwlerofiipukvnzwbxpmeunzsbkoqclnkxxsxgizbkmiagmm",
|
| 60 |
+
"zevruhhkfmiagyuvxxrcumdlsaacymwztlhiwgkvwzgdqubdzjqkqxpcatpuavmxugwgywlvigpjtv",
|
| 61 |
+
"lacvcmwmxjfmhgjrosihvfchyqxldp",
|
| 62 |
+
"iofiianqwflpmubhmqskd",
|
| 63 |
+
"pvcqhxaswsnueajebvwnzxfoqlrvjrmnkewanhwpc",
|
| 64 |
+
"pxkdtnymsvqnnqvaovjoxrgebmnzrfdypxez",
|
| 65 |
+
"iupjubzkeuahkbgzbaitzazqlxbaxufvkaywfefdvixucbp",
|
| 66 |
+
"trbvkiima",
|
| 67 |
+
"bqlrlgxsqzlldhzbcxgakdhd",
|
| 68 |
+
"qbejywljsslqddeuvyturypuyebdgkz",
|
| 69 |
+
"tdxyqfxxfbrbhrr",
|
| 70 |
+
"dbry",
|
| 71 |
+
"idtkfifaonhxnfyiwgmusedzzvcmjhxhyxjrtcdzztem",
|
| 72 |
+
"dkmzhvdmfzfomclxomdhzdxvramtzfdwdnssgyjrxbyxoemcwslxrzbnuj",
|
| 73 |
+
"uujvqaiuifekfriexonmrcf",
|
| 74 |
+
"xdmsdynzflitfcewqinppbnkxeibochpvjcfvlhnajtktvhjvnfxzunkteuxqfbsljyljddmuhvxrxqwxautubfjbl",
|
| 75 |
+
"fmopaphscgbstwttbputnlhqxrlxzhgdvaxfecnfywuxgddrnxfoqtussrjzjlataitgfngsqrewntkvvrxbbfpbksbtnhsd",
|
| 76 |
+
"odtkgqdfqqyerhahvfarafvilypzotfajwbfvfahlzvpcarydssjqfkluvvmlhbeafddpfbkwqhnwnavu",
|
| 77 |
+
"iqllydvsytcqslwqycjujmilrlufrntrkuduhpfknxsdpkfbnpsakpmzwylswvrbukazzkvlaamgpfwcgmdhimpaeq",
|
| 78 |
+
"juarrxdjyvnpwxanzp",
|
| 79 |
+
"hzsgxfeegqczilffttentaaprfogjaonbvojbyrytjepvvitvfkylassactcruqsfhqadhtkpdvmgi",
|
| 80 |
+
"jkybmudfgrphvuqnhvvcbrpkmkoansifpuabbcsrzpgokzub",
|
| 81 |
+
"yvzkypegsbffyjmkcmseqzlytpilmsdzmomhsntfojwgeonmvdpcrrxk"
|
| 82 |
+
],
|
| 83 |
+
"\"hzwpplakf\""
|
| 84 |
+
],
|
| 85 |
+
"output": 0
|
| 86 |
+
},
|
| 87 |
+
{
|
| 88 |
+
"input": [
|
| 89 |
+
[
|
| 90 |
+
"kajdfarsyxu",
|
| 91 |
+
"wpdrghafywjezfehcjhcpgqywbncdehmykzmcxdcfygggkyrfybnekykfcxrcnq",
|
| 92 |
+
"blelqcrujif",
|
| 93 |
+
"toopntnsnsxtzrdtlcpshtrstaeblbqoxvrlmjfjew",
|
| 94 |
+
"egafoyuyqzriobzdxbalzvelcqejpdkkfxldacicfwxaqgzsexmyfxvpdqzqupfiktk",
|
| 95 |
+
"hlgltrxusuhisakrum",
|
| 96 |
+
"bgkjamhfrhrmhsiqlhbl",
|
| 97 |
+
"anukwgcnryjmveerzvxxxzeouxesfpkyiagnrrwlmcvfbsqoqgsudutpdiljvk",
|
| 98 |
+
"wilylanywbrjaqodfdshttsqckxautxvcsnruym",
|
| 99 |
+
"wnntznkvaqtoubkelvkbgswmnibpsnxgcczrwgjqfqievhjknoogsiqbmuwcidasfjpjssoshrnswbazjg",
|
| 100 |
+
"owuhtlkjgxsnbklpxfktmxigpfvwbqycbddqjusjomimwmyqfruqvzdq",
|
| 101 |
+
"lwlkywrvmomkyhyvojurtkfyrpvgcpxhffkrevmqyedjtcmybajtmbncqjikonovbcyafvhmdvxhvttoawlficglvwb",
|
| 102 |
+
"hlroiriirtisyzciiaediaepfwvshhcjwyltftuknweysykhic",
|
| 103 |
+
"ehuspkljoecayojddibelhdjsjipgjrppzcmtfcoudxzxmsquyvnvbkeerujcxfbyxzbkxylkxfdno",
|
| 104 |
+
"ymjdvrksfanusgclidfprhsjwsptacxddopzgsofvksa",
|
| 105 |
+
"sniytmstwwqdgnokkgijatganspteruxbzfnrivyebwuvuisfyfxgwhnhsgppstnsxqwqmkfkkiqx",
|
| 106 |
+
"pfuvfntdztosfvewxeyqumniikbxjghbjgkburzplmnovxpsmwrgltes",
|
| 107 |
+
"ntnlvexlypcyuxtqczwwiqhx",
|
| 108 |
+
"eovprrcgqingbtrpkodmti",
|
| 109 |
+
"iluwddpziaoxvdlwxhamawwpihdwnjgubvtpxupeywqrwlaoabfcvcplamkpjnzbulcv",
|
| 110 |
+
"qudvzasjicxsbgk",
|
| 111 |
+
"iyedjqoutcesbvraddyfeiuxalzmdcpphuwxsrbkjssrd",
|
| 112 |
+
"noerghjhhdwklpwnuqmvdjjosvlqzulyzevjslmvzuowiimgodnaswlidtmhsokkbvdzlssujofuhnexuulzaemvdl",
|
| 113 |
+
"fspijjektloqv",
|
| 114 |
+
"xqyhpapwpatwzlwbwvspnaibjnflwi",
|
| 115 |
+
"qcuxuncno",
|
| 116 |
+
"sankiffequzletebxrtsrqfntaszbynfeowwxwhghtktnmrvvfslkcayfitbpafpac",
|
| 117 |
+
"vvevvdpfkvafgaabdkdqdrdbhtqbcoaszzdedndpbkfkmloiqwu",
|
| 118 |
+
"dqxzjtsugaynqloxifdeimscewrrvtgmbdaunulbqukrqnpivybqigkthermyjpxvcdgvhqfdcewjyisyhvqzgwuefsfuecsv",
|
| 119 |
+
"dscnaptszjdqpaseeifjeczbztjtsvndlikwlmbblehrmmpyrbtbguneqjrtfjyyfyzxtwpcqf",
|
| 120 |
+
"kkhiwlpyudkujbbpfzjeklaofpnzdvtycdxsotnbbzkzdkkuytrfhrzorse",
|
| 121 |
+
"akwpzvnwobjfiozesjkvryyyxptspnxzneumwrnhjtfpnm",
|
| 122 |
+
"czowrlnhiksurbaauuloamwkqyrhlmfnokjdwpvldrrvfrutmgcohnaleessmmindeeonrjmzdzkhkpozlvaz",
|
| 123 |
+
"qwulczmvslinydd",
|
| 124 |
+
"pefb",
|
| 125 |
+
"hayknhkrbfrxvedzpvqahqkzmasabbmmvulgqdyqmutku",
|
| 126 |
+
"lsxfwhfmdycwkzgoiorhnudcnnolkyksrzxfjbnxrhtaxgbdhqtobeqpfxpoipgminrhmmezqzzpladpysepxfj",
|
| 127 |
+
"cyopjrppyirrlwkjtlbcrqqvdvdcazzvqnkdsodlryzhay",
|
| 128 |
+
"wpncerzfkddxzzmlqpqriedjyjvnhqvszqlbujtfqsinaqdfslfttghvhksylx",
|
| 129 |
+
"tjcbfaonbdpvmppkueqjpwteqzlyoybgicslatysdhfkk",
|
| 130 |
+
"kpv",
|
| 131 |
+
"lu",
|
| 132 |
+
"gowlajujptqhgvpzjrytadckwcvukikiobxnaowjavgsxcqulbpognhussonikhsdbpcnjcfiejbpovjqcyjwx"
|
| 133 |
+
],
|
| 134 |
+
"\"vbwwxkh\""
|
| 135 |
+
],
|
| 136 |
+
"output": 0
|
| 137 |
+
},
|
| 138 |
+
{
|
| 139 |
+
"input": [
|
| 140 |
+
[
|
| 141 |
+
"ljtsjvfmokfnmhxdewnrru",
|
| 142 |
+
"tshwxqobstwbxxnztbcxavs",
|
| 143 |
+
"zczydxwacjeysjfjxmakqghipxsexdfbzbiovqrdzthpfisxegdaqyyohficmvnjxwhwqudprvlihoosc",
|
| 144 |
+
"mzrgonslmvaiduewegwlkdshknomwaxtomdkqrsfbvunuwmwccatgxifbibgxogcppgqoqseeahuroxjyzjpumnh",
|
| 145 |
+
"juzhhdfmaydmzrafgfodvohjichycxahivemsbqdnwmcafykwqwymtdngemvzwkbjsfmfbsiltjoqmsb",
|
| 146 |
+
"sqatcfbzwrgivorrncfizoykndoteynbacedyenqrcnsagiuwssenqaawrypqhltrariiahdmdggffwttxribxzrgvnhtazu",
|
| 147 |
+
"izjpkbuvbkrplvfmjlpdkfgnbgmsmlvonyvunnarrigafefkspwzhuxepkwuujiatkjokkeunegygzjixgtcztvwwbhfff",
|
| 148 |
+
"xjctrf",
|
| 149 |
+
"twayzuruahawrlmzdazdvvhonodqvrtzlowtiidrqsrmmbgjjvqssymfnpabzbelewqkiscopmynlkzsvn",
|
| 150 |
+
"wksdxkhwgyaelagewkpigzkzhqcsfpgvnqhgvbwgissikzoicfaasjfsblsdfzedzbxgferviwpwljompsgtjtm",
|
| 151 |
+
"ciypblkniivjvsdtfizudjwxqdmxlbkhazjjgiwbpmysksmttlyybh",
|
| 152 |
+
"olqbxhwwozvlodtxynamudbfwlbjfjh",
|
| 153 |
+
"igahchmzrqbqehglghofcuqhglinkkovmkhxwbjnampfecucrythkesrigbxjykqvskktztwtykzhtjifojhrbdfoqyltrwalgmj",
|
| 154 |
+
"zhzgqbd",
|
| 155 |
+
"sbapladgjlvoiujeucnbemfvsikqctyiqkefihszuobjcvbnhbnqalokwfejcgwlaygessbxnkuktmrgdxcsnfqmtqk",
|
| 156 |
+
"devwxnbotxjezioqaktlyensiociplftxnzgzbgdoaddtoqtpznrsobqweluseikeajfwmxvvuefqrlllrvcijxkbbfshnm",
|
| 157 |
+
"dri",
|
| 158 |
+
"tsvcufbkguotpdympjyromqvtccckljmvlbvfwlxohqtiztqqmzsamkemovzknakaofrgiaodojckknkjkxbmcoeojavehjyy",
|
| 159 |
+
"teimjllgacovcuelutcpmuankwevtuevhbibefurhmjfzyhwjjcksekjyqpsuhnjcwuosiiit",
|
| 160 |
+
"vnbyuiqbdapmiivaqgmhvbblxwrqoujtcztiiutqlxzpvlzahrkszov",
|
| 161 |
+
"otvinbevvbpnoxxx",
|
| 162 |
+
"ucnblwahtgeyztczafvrd",
|
| 163 |
+
"hhvqfzwtagfuaykadvcsfmxdbhopkpqffbjrqwgfjcayfl",
|
| 164 |
+
"frz",
|
| 165 |
+
"gczeardxhgdkoj",
|
| 166 |
+
"ybunplmfeheusbfcszgtjpn",
|
| 167 |
+
"lvbunqvaevmnrtwsjyixwtzrzdgjwmnjxx",
|
| 168 |
+
"tswpvzprzxpiyuxvcdoamhhakptwdqnjgjiuyipacitgkgawhaakkxurosfkdqvigvtolevbshb",
|
| 169 |
+
"pmokjzmjupspwwxktbmqxpikhvwzoengeeuvbxerbhgsvewlegamgcjeeeocssxcakpvfhcqxpstdihxdpitnipurmc",
|
| 170 |
+
"jzdvtpcuwitxihbwtreeggkqxkcstamlnznzrzglaicalv",
|
| 171 |
+
"ptdniudrhvrdwtur",
|
| 172 |
+
"lxmgiyqxrowdetmerbapeza",
|
| 173 |
+
"pfqffoukuxbjvoeldqljuckoapbsgcdarqzqpvhapnbloweglezfelmipxvxcujztbawmueefe",
|
| 174 |
+
"ufiiaolggnscavdaywwcrfdckolanfkaxzinijeomehu",
|
| 175 |
+
"dspfqjbrxhanstxtlibsqsqtedxzkwlsutcjpsktjedyrrgaauuitlzxmdsjoifkwamkoryowvantojxtvyo",
|
| 176 |
+
"bumswezyfzcowzjoxusxnwekbrferraktnzeevxhmxhlwddpdbaawjmiwvccunduxjdmtjfibu",
|
| 177 |
+
"lnemqgeebyndrgbjnpxnkxscxailee",
|
| 178 |
+
"npmzsfuezep",
|
| 179 |
+
"adoopgzzpol",
|
| 180 |
+
"ervlgqzjglwakvqmfcnnljfdplmkdltlnmwbqihitudbbrjazfwqfhjikzjgzzevulwgavzpsqssyqxsbrdzdajjkgi",
|
| 181 |
+
"emzxaldiyesbezfzugrvqqtejqblolqpvboikrzia",
|
| 182 |
+
"iblasxpcsqnlwvgbevmbmskrfhqpqt",
|
| 183 |
+
"djfswoicffpuuwxejflyclbvfpbhsylairrhclqdoodrkaxdwdryisotouvqhgvuowccalmmyomxmobhyryw",
|
| 184 |
+
"xlbqmrxihohmtjuuklqvcrsryikngioqwciduzuxgw",
|
| 185 |
+
"yttgersewzdhgeplfwtvwnncmgzgz",
|
| 186 |
+
"fvjkybtqrzdejqkwhpgeblaqtuxiapt"
|
| 187 |
+
],
|
| 188 |
+
"\"roqrhgyimftaccrfcw\""
|
| 189 |
+
],
|
| 190 |
+
"output": 0
|
| 191 |
+
},
|
| 192 |
+
{
|
| 193 |
+
"input": [
|
| 194 |
+
[
|
| 195 |
+
"xxmwbktbugvaikeuaogopiywmfeoaoqvhwpwuzmqsecxcbpzkndchnnpxzds",
|
| 196 |
+
"woqe",
|
| 197 |
+
"kzjpylutqeperjdcefzafufqdtqudhakkdbhcfandplrfgjbwfofzwhlvsdxy",
|
| 198 |
+
"kscwcyykjzcxvbefkimpsxzmxfbyfvkfkmvwtqqmtgwssurerslgmaepgmsnbiqvlc",
|
| 199 |
+
"hgudgydgymklyziacezzqneppdbvttto",
|
| 200 |
+
"bfxgyegidjomjxkwvcgsyzomgktfe",
|
| 201 |
+
"btlhmqlqqikpxqhlmxekbhnfkxclzecagsywsnjjo",
|
| 202 |
+
"fzqtlwbzludtsnhzzdtqaruvvsqhjxcmkpzspvrtlumcavtpyqrfppianqlamgmoaby",
|
| 203 |
+
"ddigouvlksthkcdaxriwcrjlcwnlkwreifiwvfmrhgnqzmiatqujnoqqarjpwdvpemmpxwpwulfhphosfnacvlhidcdxmelzysc",
|
| 204 |
+
"ynqqlgxqpiyhyjesxvqgeybzrbrdvrzlogrpjuiovibelplzgqgkrhrsnvitvgiilnlrymizzduofzn",
|
| 205 |
+
"qmalhnzxkw",
|
| 206 |
+
"tpwtocuckibxgyanuvahoexpjxlpkoochmgummszrlfvblniubkstpyy",
|
| 207 |
+
"xmcocpsgazubmrrojjjdkxtgnhlwjkbeymhqevojbpmevltynlhcxkxdievufokqydxfyxxx",
|
| 208 |
+
"tvrmwwqbrlzbwihtlvieubhubrh",
|
| 209 |
+
"cikbpfkkuatykddpbstuvvilyriydsqvmznaflmzfbhmluuazlbuseuibaqfpcjlo",
|
| 210 |
+
"nyxbkqebsingbqvrtqpytvjrewevvvbjohhoi",
|
| 211 |
+
"yxfucgbdkhjhagnocrlvydpuiwrrxkbuaopxpnmcbkdjyco",
|
| 212 |
+
"uirhvraybhmffjvywqcpjmuxjhwrsdployvjianpfxtocfjmtsbhrirocaspyjtxxdiiknqfnduiindsulzonxtndimtyqtz",
|
| 213 |
+
"qfypzofxpqbnmferptluwrcgfhuhlulrppicpijrxdetrzlouduutnsmzqtuq",
|
| 214 |
+
"wk",
|
| 215 |
+
"lekucyac",
|
| 216 |
+
"mxtlpqqaujnypgklewvldbjk",
|
| 217 |
+
"jkytzomcbflmrhpuippkihlsgwomfmaztrutfhbpeylnfslnmftbzrps",
|
| 218 |
+
"jhvevsuzxyqukcndmhgvltfwykztpnjoabojmqxgjidhsqbojipsggadldtyvwxnhud",
|
| 219 |
+
"vttxpkmrysyomzsrqftaluuljtehmwvtuveyiqnkjbmuzcqjhmhkqvktoumjnxgznhkgrkdug",
|
| 220 |
+
"fpldvshojeuukpeigbkkwstjnitxcaabfinaazv",
|
| 221 |
+
"vtzozglqmqrtkvjveoailfnbgccuhdeezccqfcvbtevaeiedoqyimvafjkdpmtwupcivqegkxmkezbovgsm",
|
| 222 |
+
"reuewaxvekmolarumplvgavgeqgwswjcggonjnozduikspxyzhpzaevqujivmpaospwzstkwrqslfqszukzvxav",
|
| 223 |
+
"hdrvcazbrnbjjlfqgypcukgfjbgdjayuw",
|
| 224 |
+
"whclhtthrxbwnmttmxvmkladecfwwcxgistuyhvyfbr",
|
| 225 |
+
"tuerdmfmzfllaluprhrccotwuvecnlryfsyhmunsmyegrmxrutklknfcgyjjbwojo",
|
| 226 |
+
"xhyezmtqwalfauesbjjaliohthbfdjzefpfnjuvrpyhuzlhhx",
|
| 227 |
+
"vezokypfkmfployzycqua",
|
| 228 |
+
"nq",
|
| 229 |
+
"fkjplcgxphfmrjumydybkacfhsmrdvufsnekuzotvizennqioslioknxxpaohgyzlvwmvtcrmoqfxoydbkzm",
|
| 230 |
+
"fqicorjznifggcsaxugeyhbcbsxqaulojxmegxsohwqjxwktvxwb",
|
| 231 |
+
"rfwqbolsdxlomdwpjfvsfmlklesneiqxkupizoguyzdxgddmgaapnlzbzioyjzmz",
|
| 232 |
+
"pemmbqfbgxioeuudtlumbemmevdmmgbzmclfuqusijnmtzqxkaujupdnufqqlfncyqxmyscmnceoadcdgrollwrbtoxtljvhbct",
|
| 233 |
+
"dxzfmqutnbitjfarfqyhtjokfaifjbehaetkmqwwrpckdvovnhxdwpherruhunkoziqrhnnrnledyijztkynhbxvc",
|
| 234 |
+
"vodgpkstsklypgemoopbdbavhedwvk",
|
| 235 |
+
"ntmfowlzgfehtiyeqomstdezprlscajvnymvvxwlk",
|
| 236 |
+
"jitcliafyzepzpwmgglxbwxzzngrbrqayfirjtzdmgurccwvnffyiufzfxajuzetyfgomnowueawgfyzotrhdfqwmpdputqrm",
|
| 237 |
+
"skqnbkeiduhnadxezo",
|
| 238 |
+
"ylgemdrpuwuoeobzrdwrxqwgiywavuhfajsmkegfkbzjbzetjdssjzumgmryikyettkuhewt",
|
| 239 |
+
"xpaxiwdoluzeccayeewkdpzvqlqioniinngwrmlftkjzlpicfpdhfcqlpieugepfsaozisxal",
|
| 240 |
+
"ftamngiimowhqttkzyqyolgxzgazwatrmjquiwiqwwirshgxaubrd",
|
| 241 |
+
"kwijkdjybpvjrpewkjzghdxkdyngtfvxzlllanbikpbmoa",
|
| 242 |
+
"ffmgeyxxmnyoosnylzbkjotdmxqazyqzbupdjhjmbzohljvvalcwghmdbejicxcipcjbjeqyeasgacvveadmmqkqhfmqgctydjo",
|
| 243 |
+
"gevknzsrksglgmwrxwbtwmsqm",
|
| 244 |
+
"kfryudxxawnzuisggjgtzxxgjmkjrqjwdnxpgiufbkbefendgcxykguukvggtofhqwriookernydlrxwja",
|
| 245 |
+
"fctolseyotttrcerwheziaolswnimalkcrrpuyovbzobyqvybhrcdmiydgsvafhutvoulf",
|
| 246 |
+
"nkmayzbhqqqglfebtecxdjphfeqyvdfnzkeathwphjiosqylazvgkgsderwbx",
|
| 247 |
+
"ajcteuahwfthzluowwwhrfbxlxeyicutejgciafexbgugxboajhvopbetuvuoodlkemhvarxhimnuuidnxrzubygenncvrrx",
|
| 248 |
+
"ygnvmdqeqsxioifoimtmxnyvdhdheikeffvifcvorplfvzzxgintvtaxcaekpszyxaxpmtcsmmwfvjdby",
|
| 249 |
+
"drbpwbdpbvoyjqnwliktfcddjttwdmkvtsncdnkxrbgfbxfbvsqevpkqiflaplmnlnegthmhpfnfgdjxuhlpuk",
|
| 250 |
+
"ehnlomdcixdkzjvaabb",
|
| 251 |
+
"kunydpzrqscjzbrgjpghtquaifgjiegmsnuqgbnqpgkhmnfxwryqplssomemkzkbjnhvwhidnjasmzas",
|
| 252 |
+
"gcvwgaiobjatetybkmsfupfmncdmbhkvfrcmuondyn",
|
| 253 |
+
"uagqzbbqnqmkwvkwukuczrbvbaysgxdeuyphtujdtmcfzyhiyohfkylgfdgeaqtwtgbhotnadzambhwdqitbfnswbgskpyxeu",
|
| 254 |
+
"dgcxsotvyzrdnunqnxvadphesjtxybqjiinaxeugs",
|
| 255 |
+
"nyttzvlpfshcffchfupotxbetfsenxukwkmk",
|
| 256 |
+
"teudacodaacxijrnwnxggumjpptaowoizrofpugobvtoukveaoyufpsmvbpmokzfxghcaept",
|
| 257 |
+
"pawawkvzoqtaplnhffkvaspeaogfrjlmk",
|
| 258 |
+
"drztkjuhlcjvajejaukbbwvwagqzkdqmbnhiwwphyvrpecukeorbjxpegkydgbxihebsasgk",
|
| 259 |
+
"afmvaieayxypuadvkjzhufpeykwwggnpi",
|
| 260 |
+
"jsalfrpzm",
|
| 261 |
+
"yxegyyxlnkscccagbnk"
|
| 262 |
+
],
|
| 263 |
+
"\"phfcjfk\""
|
| 264 |
+
],
|
| 265 |
+
"output": 0
|
| 266 |
+
},
|
| 267 |
+
{
|
| 268 |
+
"input": [
|
| 269 |
+
[
|
| 270 |
+
"mxkln",
|
| 271 |
+
"wdurbtyzyiioqforitufxsirdwdmynobswjvwenwhmipueujodfugjdrktuzrylkesjgrthegjyujezhqjmngupporjvipwmna",
|
| 272 |
+
"mnguiwfsqvrapiqlwlkqeipztcgyyvetslkfjavdpir",
|
| 273 |
+
"xbjnvtrakwalkommpfrphhanbqsyjuimpszncixmeyigqxihecborr",
|
| 274 |
+
"onsinjmgzcvnttoqyitxkedmebniqtoswhzuagatgwattzcsiqlnynzaomnxkfki",
|
| 275 |
+
"nfdymvovyhkfykukqnnvwpubpbbzzucdmrprbffixzvruzwgcyyhezp",
|
| 276 |
+
"tnkwfqwpezyifyfkgxzcmbudcveghaulyiuzcpprfyuplyhggnvmbdbnsyfmgua",
|
| 277 |
+
"qutxqdcxvtulnanlmoanmwnkgqsktryerskvojjvxvttoaozetzbnyxhgmjmysdyxfcgtgssx",
|
| 278 |
+
"xkddttwgphbtlplpqlqsjuznkohdltkjuetcvqnxqafnuicqnjnwgesapehcph",
|
| 279 |
+
"oqvsyikrxxluolcgcsvhzdvnmvxpozrvgydilsmmjluccnfszeksjirkucbnvgjlapd",
|
| 280 |
+
"pjlqjjmkzonkcglumwtgaeuuubsxdpxwj",
|
| 281 |
+
"snxolbmgtmbyhawjrxmtxjxtmqaesvwyeuwngcyvpjjxiadvqfzo",
|
| 282 |
+
"illlyujylsydobipocpeqxpvirqxifjnsszjsurbpoldcwyyhsdmagedmvlaohwlfxystyts",
|
| 283 |
+
"lpdzoimcdexuyosahhqdfzpqguvqgghprizjwhsjuefdj",
|
| 284 |
+
"nbwtgdviiekvnnzdlczrkdwfzjpovmuwiwnbcgoqzxkahppxohaytpjgkgbgezcuscfi",
|
| 285 |
+
"ubtssvcayyxbazvfzxfwrmtnlxpfzkmqrpaaxbmroiwgnyuslvypxykqsodmjgkdayzhwoqatmxkfjdoclbfwc",
|
| 286 |
+
"dxbtekyqomtptkkugmmuoxezkjhsvfivtolwrlemlwogzkfqlzzqgucxtvgzwidruwlkbsqildturacouhdkwrhgbwdzpvlsyj",
|
| 287 |
+
"zjjhxsijeobmcogutruyzetruuccocdiitvn",
|
| 288 |
+
"xnwjnfvfbubdptjzmnmxlxwchnegasqjpvqyxjgqkhkatuwyjzx",
|
| 289 |
+
"nvqkjzydtdxieqladhf",
|
| 290 |
+
"ojppunxwyvitqitlhuwpmujctbkeopxrratenvkho",
|
| 291 |
+
"ipkukmbffuuyuidfajhwacruxepjgbhdvkeuyvsutpbxmclywrecfsteattesujbphqhrqafnnavnw",
|
| 292 |
+
"ymoidvowckyynzomoblpxskmrzthfrlculhgugsbccaebxjjadcnt",
|
| 293 |
+
"clevzdcnxnjtgomaayjwtzcaynwomkeccykogvtzjdlbekvwkidqowjpbbyj",
|
| 294 |
+
"t",
|
| 295 |
+
"gpxeckodkkozeubbsqicsllffnbmviyxusvgrumgsycopebzvpvoumwrsghoxtafjrdubgojt",
|
| 296 |
+
"rgsbhtyzjhxcanuyfowbfloznaygfcmloahghffdvoqwkdsf",
|
| 297 |
+
"xowiafbklibwzpwfcxlxfksgmd",
|
| 298 |
+
"phjnxurhmftrrzcscojhtihbzwtgiqonxnvidjmqqgwdtolbpjhvgmnuourjrzzdjrkornpowmaubkmghdavappjfdgaqens",
|
| 299 |
+
"edfhtrbdpvcbrlthrmjzjxucmhfsrvoeywotyyzdiiozzdqrmmecyyrnacociuvnffoqxtnfmnhziwkvnhqusu",
|
| 300 |
+
"ssizmappvvpiasuzolsccyqgsqlrgzuzqzcljzrmvvbdytlwqscgxehqigsxzmxxyl",
|
| 301 |
+
"exdrzomoncynbitvdsmtpleucbzngeqchqzimakhuqxy",
|
| 302 |
+
"evopbyngsigahnzkkioerhrfkzrfryg",
|
| 303 |
+
"lmvjzkwhpmcgoskgpvnhkpsaiqssxelopvdqffgzswglyngssqflkgogetsiggmhadoexsqfs",
|
| 304 |
+
"jkkliiqiyeqoshwotosamxmi",
|
| 305 |
+
"alhlecsshkxbedwvcojhvlxrmhscxxjapwmiimwcrhrfrjbtdxozuqsrqiecmpzxhehmgaivzxroj",
|
| 306 |
+
"tctiapqwsqzsewekeowxplxbfswpkakjzdonvjuseoygekhn",
|
| 307 |
+
"prtfvbbnymwguzwhpjrrlpbgvstzrwc",
|
| 308 |
+
"bpqvzvhvizkjaizobild",
|
| 309 |
+
"hqrwgkckolibmjusrejbofvqcpnzlqflydbtcrwfqimfcfuxdfvamicly",
|
| 310 |
+
"qqfpaeybeipmgjsolsjsjpzpqyvwl",
|
| 311 |
+
"xnhmoniicqzdohtlbsdqvlufjooakvioyltpnxlzjwjhkgyxeselmjftuqoiwayoeiyxpnavhlr",
|
| 312 |
+
"pbpapgmhfctakmohwdjwqgpdwuzkzjtudfrhrmekyffypbgvovrocggtyratsqqbashroisqryadgusxuhxxrewciza",
|
| 313 |
+
"cavfjwbhdbuhqjxnwctsiftvymfxwedipessypaeifbwekbghwbkmwscuynhlggpmldqzkdecsxzmw"
|
| 314 |
+
],
|
| 315 |
+
"\"e\""
|
| 316 |
+
],
|
| 317 |
+
"output": 3
|
| 318 |
+
},
|
| 319 |
+
{
|
| 320 |
+
"input": [
|
| 321 |
+
[
|
| 322 |
+
"qdbolpxebyubdhzzqjoprdlyjnholqepduhkgcfqxgfwrmimztqlsbcslfjrhtwangbpzbbdmc",
|
| 323 |
+
"dtdearpufjeegycauduylshdjiebwhifsyykgqzmlqotnysvcxiorhxmqpufrjopsvvbhozeirye",
|
| 324 |
+
"cresbbzpxkerdpgpxaihdfmruoopellhatvnshcibexhoml",
|
| 325 |
+
"poomxkxhhwlrzadedr",
|
| 326 |
+
"mtqpgepavtrddkwlbsqqkcgwsvvjszuavxvkagmdacqhtmakvzn",
|
| 327 |
+
"xclmzgicyrrmavomezwmwosryokpyxtaaybhgidmplvhjvmjpnmnzkxbmpsjhqhjhiqcxtskvqmtuburmpgo",
|
| 328 |
+
"icazrcutugqjbmjujhycmecgenuk",
|
| 329 |
+
"heekxmokmulmcmzvwbrmybhdvlxacykxved",
|
| 330 |
+
"kynrpdthawxqaufgicsyiegksdohajnyfsmcueslqcperqtxcgpoeropklxmwzsz",
|
| 331 |
+
"mzhhdvqejl",
|
| 332 |
+
"konvfsuhyskitkkudnunwhmfcurbpvriafaifzwkifoaseimxwrchziuwvzoozxqefeewhnteeltftyyclalqi",
|
| 333 |
+
"nphhlntgsfvos",
|
| 334 |
+
"fofdbqxvatrqdhhzukqzwaxkyaxpdjgtcghenhfpjupkesyjcnifbwnawhyuwtyjvufuqwexanevhbwpmwftbby",
|
| 335 |
+
"wvnsarwjx",
|
| 336 |
+
"empopwloqaomckrfbnfapqbkrqbxgekmfywzviblvbakvtnpzwaaqlgdqrsxckwrighqangfmsbjcheaqtdauhvbfecftn",
|
| 337 |
+
"nszvgahgjeslfrrgcviqowishpcqzpfecyofqnjjehwdilcrvuhtfpiyrtkeopmvthitqqxgfwrhkf",
|
| 338 |
+
"rpojkucybjveuxqegulkabdqiagmoirainhbtyq",
|
| 339 |
+
"cweujbdmrchqqoiupgmtzjftpurvnygdrhccjydltjnux",
|
| 340 |
+
"sqrdgujrnyvadamymwdlsfqlzenteucnaxlmdpytommuwvpv",
|
| 341 |
+
"vzgzdxfujvalfhttpgrrzrcwdbjiijxtejhaao",
|
| 342 |
+
"svfjxocenlfsnywckuwcfnainhtjer",
|
| 343 |
+
"aumfcdesocalvlwpviamvtpjptshdwyqpbpuuzritsjggcucpmtq",
|
| 344 |
+
"vqeujeqjnvjmecgyxgg",
|
| 345 |
+
"iswnbeylfspcxvartcrbyvwsdidpyhafbfefpwewhtxkutjdjsfejsnbtzscegcipiwwywqfigxqrkofsh",
|
| 346 |
+
"fzblzuvykonuwybx",
|
| 347 |
+
"iedujpmnirugqochyqnzfnojlvjqjarmwynidbpzhaelfocrlmjtpbnacyuxyedoewgeubpxdlxnfavlztohuxi",
|
| 348 |
+
"jrprolseezacblatfzoyzsvixavtzlpugrbweevxvqitqhphqmxncndbgwpdtf",
|
| 349 |
+
"dsueadpbkdcbwuzytdadmewhpvlehpl",
|
| 350 |
+
"ovgcpgpnyflgxcqaxtgcatmihupsemkerkfideszinusjjevq",
|
| 351 |
+
"otndcnlcqvmbngkzsuwvsualuxtgaljefbsaacnkvnxhvcxqzrlpbdaujnkaswrfvolvmfmrxslkxgevqsytooijmxlxvtj",
|
| 352 |
+
"ntttbisxhumjhfjvzrrcsxnybxpktscnfnekkgbfgejsdqydujijgbudunwebyukxjreymeshifurlo",
|
| 353 |
+
"zbktqobjxzsxbpxbnlhgurvuieijdrfwbzymptypovjywcxbbcicgrgnowsxdzqgbaprbhopmqtgsyy",
|
| 354 |
+
"rrzlcdlqziilqiqndcvxfyqcatpqzerzxxscaizeyevzsmdhdugwvvncaitclilbxiftaoexctmtxugwnuhvfwpqgtdwvjjtjoe",
|
| 355 |
+
"tejkrpnfnrnxjxujusjuvawoyhmcqqsrcnjgfvfexgjpbaxenhsrtawurxiynhguagwz",
|
| 356 |
+
"dajsqeiwwkdwmfwneunwsqdpafczwrkrbsky",
|
| 357 |
+
"xybesydjzoiokkyauk",
|
| 358 |
+
"fubewtwyirfobyfvmiubecspjoizknkhludeunvzsrzskeauaoccudualilff",
|
| 359 |
+
"nuxrcmhcudhraztaouewqfsvnpbngqizcregtuaslyzqlpbynxnbirqktvhosuqunmutxjavdgqannhtzwmypwwxqo",
|
| 360 |
+
"yayxdalyqdfmvpritzpgjaydznzcwxdsuhyserunljycgwacnmcvefohzuxefvijutjgakcd",
|
| 361 |
+
"bwzzsodagbesxsaiyvlflhghbxpfmvqfozqnclitxaajzsewnygatdjgeascaqjfwjaoqjfydcofisgvvzkovauzcgwsecm",
|
| 362 |
+
"fzptuguxfkifslcfpxnyukkkcdivgjvzegupfpaomivsvysgjbrzekzzluvlxzzugxxookia",
|
| 363 |
+
"ufgzunifzopphxwflwhkdowlewvtuiekmgreojgsmkljqnhvdzf",
|
| 364 |
+
"trlxgyhnralalvwkpktnfqkskwjxwjdvnyjkotmgs",
|
| 365 |
+
"pxuizvomcvv",
|
| 366 |
+
"ynvakiiamjxxipbvxlciyffcrysojhasbpeajowxjhgkelevqycnysanzuthuplxncvpdwh",
|
| 367 |
+
"vplqgfbqdrkqeqbqgsqoscqgpukoqypvayzxxp",
|
| 368 |
+
"dkxkfbclhwiuxavdayqyrfnxjzqjgfalfrpclhnkffacbbwiyvbyzqetfdhouzqhqgvtgdhnxbznaj",
|
| 369 |
+
"peodqhucjqexxrmdofjznyncbllspqdnnqimxesufnmgmt",
|
| 370 |
+
"vfvdhgpxamektgwrplzhiwxckcndfjdrnbxzejxkjtamduuilblwqtrlorgxoesybrjkaxhkmxxxfebldiw",
|
| 371 |
+
"diksjsgodtlwfoeddujavacrgwpmjzynbpgigkavkoqzdbiarvvnbsadzmabnhsgeegposfpqmttxlbirwsxseorhczudijwlq",
|
| 372 |
+
"eist",
|
| 373 |
+
"eir",
|
| 374 |
+
"camyzxcvveowikozeledwunlfiyzbkenfkirlblvcsrhzyiehclssyrydywqoghe",
|
| 375 |
+
"hkwfblfutrnskxyaxclqmwmdatafvalrsnamigxvwnzqhpjvglvxrllffvgpxqwcgalqgqla",
|
| 376 |
+
"zjufutwatnnstqqpmhqvnpyczhtiiujtiqbwenlfytaekusiuvvqr",
|
| 377 |
+
"jqyttiqsktpoaeypdzeovutcmefvirofxblopbqptutswkuxaqpvjvrluuhfgpdmque",
|
| 378 |
+
"dawrxj",
|
| 379 |
+
"gzjgohharlvnlaekxrqxnbueytabxmrvluodftjwalmlamrmrunapilavmkgolsqu",
|
| 380 |
+
"ivnhbenvbgertlfwyzevervmfkaxifksjbqkfhomeaiftgpopuwbhzeavdilfaqhxsptiiknarvcaxdbpdmffipxtuxdvi",
|
| 381 |
+
"xuxkvu",
|
| 382 |
+
"wkmwigmddlivnezgyboryefsehrebyyftnurzhiytijyuesnmnbsvybmlcfmvhcksmzdjmoychry",
|
| 383 |
+
"ncgdvkxobosmxutnn",
|
| 384 |
+
"rrxjsipw",
|
| 385 |
+
"qjtlsytztimpluzxwahjzmculiipxkidzeyvbuvkajbhvlbmcrjjzvti",
|
| 386 |
+
"efvlccvetmxcc",
|
| 387 |
+
"kjojpnbxz",
|
| 388 |
+
"bvdmzesnudkfkocjygecfvcgecpdttiwzmxnmsbfrfwrvuzndquxhcjg",
|
| 389 |
+
"oucneodyjksrxerbmdobjfgxqmlwzsaxznurkmckiughwjgats",
|
| 390 |
+
"jbej",
|
| 391 |
+
"cywljpjsixuavixuxyhoglaocdablnaauajknwghlyzgpwifnkqssfzrgtqvbjpdqmrefmhzudenp",
|
| 392 |
+
"jpkxhinuubuqlkorbczwcclpbbziukziwnsuxmgyjxxoabmtlsvmxysgumgucedntzfxhteyzbofuqtllehttk",
|
| 393 |
+
"rxdwwqlmuvhxnllhbfuisrpppfffyhbmwlubqbzlqysmuk",
|
| 394 |
+
"b",
|
| 395 |
+
"gyfocqdizpblvfvsddgozylskuswmncaelcoyiqsaqixtozdvgwvuhbwuzsdkpysmfaaxzifgckstbozwx",
|
| 396 |
+
"fxqjladbnqarlnxnpkjmkdbyrllwfikaadycevfneyttnzmtoxqhnxafmxsxxqhksfcioxxrhxrvq",
|
| 397 |
+
"dylcikjyeiulhzfhhvlwkifwzvbchaowufgymmwhjycofh",
|
| 398 |
+
"fconurbgvbrfuqeyyetmbhxvwv",
|
| 399 |
+
"pimmqfdqfgkuuweuxsqwfhgabofvqekfvvqlmjtigshjixwudiswzjsfibpnkvqlmffskqitzqxiullwhwyshtp",
|
| 400 |
+
"nnlrhglwhkgthrcyuhqzzhfnehofunrkgjypjkaayptpkuxq",
|
| 401 |
+
"pzbrddcgrxakgzbiuvnyowmfpadhhbyghvhkkfimxymxbwkmriiqaugjotjesigftltqhirilw",
|
| 402 |
+
"cfuwftlugnkacugtmcmdpgpoglvaqprqasqejghlifz",
|
| 403 |
+
"unmjsnshitf",
|
| 404 |
+
"etzkkatcojxektbytebqxhrhcsljmrxfnffwvbgwufygwgynmkkvpixkjlyhkgohtwakhtdtdjoijcghtvsnsdqlqtkvvbd",
|
| 405 |
+
"dlytijthl",
|
| 406 |
+
"utfjuiqopvxwdpafqjkqdoxldxfvssvhqgpipmcrbsrupcwpqznrhjdqbi",
|
| 407 |
+
"juvkwpvumcwdkewergzcahverjqqnaxiqaftqjequdhqaibgsfzvkklrgkiegqjb",
|
| 408 |
+
"qzaxlfmsvadopjycfuftohjsfhimzcxglwwubqvrljohxhsmmerntzgmbpibolxknbyzatwixrkkemchirnbzfnwemnbuwaqqy",
|
| 409 |
+
"kfgjfgkdutsupscvzzohytzfdnwwnejgvlaxqdkda"
|
| 410 |
+
],
|
| 411 |
+
"\"rmn\""
|
| 412 |
+
],
|
| 413 |
+
"output": 0
|
| 414 |
+
},
|
| 415 |
+
{
|
| 416 |
+
"input": [
|
| 417 |
+
[
|
| 418 |
+
"jyfqgskwdphrogtdtotgdegdulezrvqhdihusldloryqqjxtlst",
|
| 419 |
+
"bffnqjgpjxbwspjlekbvdabmncsgmypjudjgxf",
|
| 420 |
+
"gwfvpkcazzwynxcnkdywjdtpwogebejtetuknh",
|
| 421 |
+
"ebfctazlpvzfbsdzpoaeghvgubvnwfzznbzkuaalqjr",
|
| 422 |
+
"q",
|
| 423 |
+
"xvnmqxqajprxgflgnauindmzwefijhpuydztvgycmveqvnhpudcmsnezwxthiql",
|
| 424 |
+
"lvjclxyxqltdkjvscfugoitjbdoeurlxakfuxmuzzvyzjwgqtyr",
|
| 425 |
+
"xwncxviyqvjymqjucfnmcdnkauqnexuxoheudtwirjyizaxegwxrnmqcaknosseudtnasjtznmffxfihbnww",
|
| 426 |
+
"nzgcekrlyxvrfjxgishxjcmteclnqkjjz",
|
| 427 |
+
"pedclbczcfttdvvxkgqwypjaxgx",
|
| 428 |
+
"cjrezfsaskfrkgsvylqyusrxdnszelwxtfzdosabrctavzjccebunfyrjdglqcpbbqtwwm",
|
| 429 |
+
"vbhgyzgmtmeifzfqigytatlkraimnvokizdjddqziezbjjikxqdijplxmamobckawlzwcghvdbsrjlfmwny",
|
| 430 |
+
"xvhmprvgdlqxfxpuwpzfanuhyasetxfhnrbaeugbrssinivieormxqcnyutjjnpsudmvaujqn",
|
| 431 |
+
"jduqkuolerqoma",
|
| 432 |
+
"wieywwvdflpgdvseaqmudaqwxerkdmcdglinwszhnatbytktruzrafmzkxtvdesmredtouomksumsrgaouqtzhkslrpqe",
|
| 433 |
+
"yozrmfhgqiutqpsxutiimjmskvuhzsphkosjjdttoaziznhfozrdvdtbeawbgnghgxmwnfsvuaggd",
|
| 434 |
+
"spucznafxpnkhneptfsapezvzqzbvfwcopdxpffvwflbdt",
|
| 435 |
+
"nyxlbzjqsgenbzndsvhclranibbiexnxkgoezwolatnmptqjmvtulytexdw",
|
| 436 |
+
"xjw",
|
| 437 |
+
"auatusqsitbfkexcqjqxlhamtzoruqphjdede",
|
| 438 |
+
"dpvwtcvziuqxcunpswjdmnvdpivgyxaicgclwwnrrezlg",
|
| 439 |
+
"wwoukb",
|
| 440 |
+
"fehqmczotunlfnoxwtfwpmctnhzkfnuq",
|
| 441 |
+
"yatcleoxmhtztyktdtlotuwlqaidfilgymamuypwikqbtcvkuchdmqhbrxiitgumjshusvpuefreodhkuf",
|
| 442 |
+
"epkyizvnbywympiurwbbfhtobzqwwstiwcfvgmkujcyguuntevwkea",
|
| 443 |
+
"hqbqlunungjquerwujkyjboleuswuiiiroskzms",
|
| 444 |
+
"rebzwcxyxuvhqqyzhcxlbvrldflvaaoalnpmxij",
|
| 445 |
+
"iqm",
|
| 446 |
+
"svsdgoxukvpuveijeseiprynxqosjxygxikvnafyfiq",
|
| 447 |
+
"qtoomkyplsvmvalmvwomethtlukdzjjlevucjmgtabzeekhqafayojavkmprowjkssrxavpm",
|
| 448 |
+
"svvickuobbrkorspsppivro",
|
| 449 |
+
"cmkeaiwthqaqlysyxutmielzwcsksdwvyucqdsnj",
|
| 450 |
+
"tnmeqdzzkqeqqnhjwfdtgedqmxooiawuvzygjlhdoewtonhltpsxnbtqvorxwyprybdoqfffrlonqtgkpwpnofsgqwcf",
|
| 451 |
+
"cduzhf",
|
| 452 |
+
"rdwzjiqzkzvmicbucggaejqvbrkvhzcdjyzgcnkjpttpnrdjurjcjjb",
|
| 453 |
+
"qnrvcocxhkaydiqodqvijuwdxijkimzkrctbyzfnnxhpgsjxbmurutkxjconzipvaliriessu",
|
| 454 |
+
"qqfiqjumdxeq",
|
| 455 |
+
"rgsadpidezodqfwdpjqnpmrnhpnbge",
|
| 456 |
+
"imwcycldyvbudq",
|
| 457 |
+
"deifwtypguqlboqpclcuqfeipkowptiwjnutacuaslecmmyoooqugikdjpruycatcyzijornumkfkpdoxmiqnyepddvcvhc",
|
| 458 |
+
"tihtptonldvodfplmiahfkrxjqlrfjhehtlysxbdqiwcxogzzdlmlmyeebxavkrpqemswhpokubbjjihvdnnjquuwqlbngbl",
|
| 459 |
+
"dvtiyfivmdgmamxpqwlqskrhwkuntnorcvsbgxlbtjwquaxtopbhfbugjbxkttezqvwunqvuqkcmbqgr",
|
| 460 |
+
"jwfpkqswgauijatytvnystxnyrwuuozlabuukgvvokbrhbozpwgdzelywnoijfdykuc",
|
| 461 |
+
"tzpykighbhmqfmcidrmropihxvtgfjlvfkiuvsmkbqwrbxxffuwbrc",
|
| 462 |
+
"fabmxqceiukhgqshenvvahzhvdzxmtkvdgoozksptzvnaiifpcl",
|
| 463 |
+
"vhugctpwmkohxyaqendzytpuzlhshrapmybbjtsfcmtingflcdyvaltlzpjrfg",
|
| 464 |
+
"ciklrzgqxuozskcpgnvnbdxjonjizcpzouaigpsuzybfoifihcosyonoeyfalmuqjhgnoahjxrhmyvxilphmtxa",
|
| 465 |
+
"bgnbulousaxjltyfescyxnpzyoqwrxyfhaazhgxksghwajwdgozcdanmtatnvlkfdl",
|
| 466 |
+
"tfqvkcpstwffhjdfogllerddrxgapdwwuumlgyooywebvhxiiyjydywurefopcfzkhnuxpzmdwbxgjiscdmyupfpohpqlxgpg",
|
| 467 |
+
"tepruozxyheklhlkdszvnknouczbmtimxzdiolmpjhczthfwsmbbfgdtmcgqnegyfcmhdnkd",
|
| 468 |
+
"hzhidpmuzxldgkfuzsekwvvtihrvqehjyvlzezeuyemlzkqnruwnraomuysaqysj",
|
| 469 |
+
"ilzqrukrxvkjokrdsmr",
|
| 470 |
+
"vvovfcyekgbecefwfzjscemrzmgrnlwvqnjaiyrlbdvp",
|
| 471 |
+
"sxxkirmkbwshvghdurogkmtqkzvwyucmwygvzwhnxafwzwetdkxorqkxgdbxpehfuhgtypaka",
|
| 472 |
+
"ibctejmzapmfukym",
|
| 473 |
+
"dbodjmtnlfsfuqgellevxcxljbkvgzhkjpzzrxewhonpavhpkoiujsm",
|
| 474 |
+
"joeqbknsqssyearaopipppzzbdzrbuytrzcsbwjvnymfcglqrtbsrgtgxgcpduhjhzkitczqairtqrlmvmxojmgjmyqyhonyi",
|
| 475 |
+
"rrpfmavoyeiqjktjssbolnxhhsvdznnficnwjgvtikauxgymfrtcwkzlpuxanihnfslshryuchrujtjwwvuqddao",
|
| 476 |
+
"ifgokyxytjmybzfyavfyoh",
|
| 477 |
+
"vsypkpkzovlkathobmnxoilvvmqkbauigjhnrfhqjltdkbd",
|
| 478 |
+
"frjsuiwqdoy",
|
| 479 |
+
"ocbuwegbgjdhdlwrxxncmlnfcgpuratmwhrvqvugcidjiyvxwhktbjmrlodoofwjlnhdanfnxwinyvxp",
|
| 480 |
+
"lexzmpdiuqkuzqopvfq",
|
| 481 |
+
"qofhjulfjhztjrkhse",
|
| 482 |
+
"czlrqoqcjiiflsnftorlyozfcmmxfjzyvbjvwkboqyqcybntbmdxveklktrouognnwkpwt",
|
| 483 |
+
"odlnxgnpdibjzsjhwpewqsqoytntlfapottjelltclfnvduywpccqzognyfjeleqrtwetacxexwcwongmmlerxuutmc",
|
| 484 |
+
"nsezqfgcdxfamzhogvinrihfkiiqzreojkldbwtnfrzyfzhiwkqkvhbookgnrivwekclbwzvjsaopqoxlgt",
|
| 485 |
+
"ycbjrwxepvyqkuacsnlbqxjrqcexjbcvuwvbkfjrlebjkqspytvfyygnmdxxefqldmizvstxsbyshoajjxz",
|
| 486 |
+
"ypcimafrdbrrsnrdkligwmgekiirfqhalllhwwlavctqbgqovh",
|
| 487 |
+
"slykzmnjwbpiidqbwurkrokmttrkdnsejjvhrjr",
|
| 488 |
+
"uwjqyuiccpaecbfwiszgxnbjuyytpdmgyxhdfrchadhhzaramhykmtax",
|
| 489 |
+
"tgflylkwmohfhxeycveyrnzppcorayaexeaxffjwuefqebgvpe",
|
| 490 |
+
"afmtcfktphzkvbooyxvdbqtdaqgyalhbyt",
|
| 491 |
+
"sfbagvagasmlvjvrqnrnyvpxmzwkblbgjnlovdyitnhdoyqfdhhnctfxyvvsedjgetsiltxacl",
|
| 492 |
+
"xxxwkntgfmjqqznjppupvjmcauzyd",
|
| 493 |
+
"rbyjsphwrngduwupubcuzxguvarjgmvnobfoektqjlahhgefr",
|
| 494 |
+
"hfgrhimsuopsiionftygezedeotuwhofzgbetssegupyamjt",
|
| 495 |
+
"saktkwrpsderyhghycsffktddgdxcyveewcacxhszrzskckxtelwbuuvzz",
|
| 496 |
+
"weeudpbabzr",
|
| 497 |
+
"qmyplppukemajyrrhnjkxjctcajcknawjjqndwginagq",
|
| 498 |
+
"qseutctfgngdwocgfscsejkmtjyyvdwasdqksykswslgmmnuovuzrqaupmsokxmmxodpmbevnxxywxrcrpfyumnvlemuhdg",
|
| 499 |
+
"rtbbjhmaymnoyzzstw",
|
| 500 |
+
"dtivunnvcrjuixlrjsposhaaeozjumlashazcnuqdahjnwxkndkjr",
|
| 501 |
+
"tjtvtrauxypjpahjgxrgunncckendizgrdvhwszrlwdljedfnvzninllmigygordaxwfktgzzwmunqmbirahnkjwlxkevfi",
|
| 502 |
+
"dpqblepcilajtcbcnklkwsjrmjbikbxynzfddyerhqhhbpgcqilpqqbhtnbjehshskamcayd",
|
| 503 |
+
"ngjmaahswzfsdvyqufwwyjojpfpgrngjjgzqgsvdqxejybhlhqkwloxzgadxvwktxcqumwwysen",
|
| 504 |
+
"oxzirhbooobgjerezoqahmhkfodlqkuksztxtmewbowhrsncbaftby",
|
| 505 |
+
"mwuavdtpgfzevqzylvirtzbckneqqmzwltsxszfgpefvqboswpgllsjjugcjlvanvlnybliaqnkyg",
|
| 506 |
+
"jdtetxdcbatrntrgcqkwyswlwiemqgfayirhrlvcxctqdkxefwobhpjihjzhckzmlnniidbqzugnirsgyyhegkqbudki",
|
| 507 |
+
"pramezblnufqromuwmjkjpaamhpuiuhmobmsyrtjgzdvpguuanq",
|
| 508 |
+
"grzluzpiejzdmxubtjxmhdnhsjvcrkkmmgegrdfsfdafvdxjafauvfnavocohabrzlawnzozursnctpijwdcwe",
|
| 509 |
+
"dpi",
|
| 510 |
+
"lohfbsyekyaehawcnjqmhhaaovhdsukcfphlcqosvxivsqzbgqlwglnkiwmr",
|
| 511 |
+
"btpqkxplrfviputstrbwaqhdhiawcc",
|
| 512 |
+
"qyd",
|
| 513 |
+
"pfopcaxxrggwnpqyngmnhjgsbuzrudlkzhlqefolqunxvstppoeb",
|
| 514 |
+
"ogpzsxhdlsgjqixcntuixknedrwfvoinfrhtsbnxnn",
|
| 515 |
+
"jsudmyxcdyljabuznqmzacpwcoqqiwxi",
|
| 516 |
+
"zcjdftc"
|
| 517 |
+
],
|
| 518 |
+
"\"qcbjjnmicrdid\""
|
| 519 |
+
],
|
| 520 |
+
"output": 0
|
| 521 |
+
},
|
| 522 |
+
{
|
| 523 |
+
"input": [
|
| 524 |
+
[
|
| 525 |
+
"ubnwtszuznclbwkbwvqmjrghphulsgntmvzzzrijqtebwell",
|
| 526 |
+
"zcdpxbgkdryywyjzuwvnvijgxcsphoyzpsoxdicngyyrmjhg",
|
| 527 |
+
"vasuxyngdlkjnbtsgzxywdchmkshzmlfpsuqiypihwgacjanlbvlic",
|
| 528 |
+
"nuhpobjqeoshineuiuclqlmjzmaedtzntmsjwssmoqxkqudrrrlivhefvwaehounjlwjusddrhrvtopkzjw",
|
| 529 |
+
"oldqbyvjvhmyxnstgggskesiybydixeiwbtlkgfvfkbhrcpqzclcfz",
|
| 530 |
+
"sjjvilstddxcppj",
|
| 531 |
+
"hvgvyglxligmukspzajjwahgayfsrkhknubjhtlhecshvmownlhtrphxhivwnlbusnspwdfuzjtr",
|
| 532 |
+
"cggaqzddhyyzv",
|
| 533 |
+
"clmfbkikwdqekumczrwqczywhzlseuhyqqoevlknxmudlisqqjnxasvjfq",
|
| 534 |
+
"rzbzklxomzuqmfbatpzygh",
|
| 535 |
+
"fywfcodufmjslzahtfcprkdaewokefwircbtxggmzptexoxncmikstkbvjf",
|
| 536 |
+
"jcezhbgcfjqlolqkbcalaahnxckhqinnquppywgndvwtyfgsmnnjgywzpmhvgzlsyljhvutynfionndeqhqevskabrkyb",
|
| 537 |
+
"wnoiynnlwswkinbitjucymwfihybojhdjqobueqyqdlwgz",
|
| 538 |
+
"utdsgtmduhcunklhdtqrsbxubknwbuuokivvdmgwbxtikyysrauhbxtysmsvgzvem",
|
| 539 |
+
"shulvhvzjvgpfjbefzmbbwrxjgpwvjzylfjjwbqfxsoqyugemhqmoegacpokmrwfaphitxxthfqvuaabsevs",
|
| 540 |
+
"rfdedcnzendrewqtggwcbtkleafphyuurxbpdjbrimrpyor",
|
| 541 |
+
"hodtjsvywwuvrlajrtmfboegrgymhpcaszjjadqjzcdenkgmuxumlhzdbjakejoarstikruahildwasjbmszntboklzoxkq",
|
| 542 |
+
"oziijpnyhjbanubiorqypjbebaasockpmjeiusahdjnljfhlymqywoyneotbsobseqekmvpmvopymklagulgya",
|
| 543 |
+
"juaxmfhstxzmzvcnodzsyaloatquzniiqwfifih",
|
| 544 |
+
"mpppytaeyoqsrudr",
|
| 545 |
+
"nnujbibkmfwbpretpvduoblssjsahzasnkhfadskbzyphwnbuqlytznvrqyyzfntaypfagiemhghmasiessvdoghsdvrhlxzlk",
|
| 546 |
+
"zhbeqaszmunuaogcfggpbto",
|
| 547 |
+
"rjbozrkmwkqwznyxsujhhhrmvnphqlanhubpsdbimkiwkorzatckxtaebtrktlvvkptqvsw",
|
| 548 |
+
"ablhcyhwjahdbqemcjgaerwotxjbkfkzfpfapsbxc",
|
| 549 |
+
"kpykxsixatzuevuhfumlewjughjcwttffweljktrmurbwhshdoecmihmrinuyuqfeywmxlfegwlsslnvvyfyv",
|
| 550 |
+
"dptsukx",
|
| 551 |
+
"jwfvnygwrzsnzhwmsdhyxekucrmgqvxyfglabtsmpyfnsnrhzvvsmdn",
|
| 552 |
+
"ishbgsdtimdmqcjcykjtvhujfrkakq",
|
| 553 |
+
"mzupxgbwwzjkjwhpwukcksotnrynuokuckbbsovecxyir",
|
| 554 |
+
"djnugtsalopjbiydzhxydyddobglmauwktlnxworvivujljebmohmdbylwztbqhditxjptgkumzexppnurwlt",
|
| 555 |
+
"yxzjfkadpbwhbtwroaufpxihxoyhttywppeacrryvno",
|
| 556 |
+
"hguguinpbkhmknottpsaexrkbpmiqydxrknpqlevkvfgptxmgvdzelyekoawgwdfar",
|
| 557 |
+
"mkiebjkuusbbjpr",
|
| 558 |
+
"qghyviyhgpnbnodyzluxizjvwtgkcizpvludpfgjzhnhhtarnublqbwffostkbe",
|
| 559 |
+
"iwkuzxblxegpivqacgtoswebimdoqm",
|
| 560 |
+
"elnlsoexjfopzvhlwrzjbbqxakilipxazxmyuzekkrkcnfvquanyfgwtf"
|
| 561 |
+
],
|
| 562 |
+
"osymtnhecqtxptrntqalevqshitebb"
|
| 563 |
+
],
|
| 564 |
+
"output": 0
|
| 565 |
+
},
|
| 566 |
+
{
|
| 567 |
+
"input": [
|
| 568 |
+
[
|
| 569 |
+
"ondtjuipetmpfannrboejnotpbzdofygvocfijswetlgewetjwx",
|
| 570 |
+
"whrdxhhwbvvbnckmuvfhzwhevvpggqqnqfyxjdlljfasuypknfuryzgnmidlnoewmtijmelapxmaxqywqllruvubvcyny",
|
| 571 |
+
"hmozj",
|
| 572 |
+
"jjvsbdsimwrrydrhavngffgvhdtfxuhdgegtkkiovhncpumflmznibrdsqruovcrfezcopxqwliomgixsqmchrntohlhq",
|
| 573 |
+
"mrlxuymlozmxfmazchvzjabyhxnhdfvhohbydgcgovgxaadagjchvfnmooaiuoe",
|
| 574 |
+
"hareystxqwudfzsazzbtvpzyyvjlsrycxzhewqnudgmvfbheizmisktxgdpfk",
|
| 575 |
+
"dptnnaghvjlvkjksgsyfover",
|
| 576 |
+
"vwnhuwhlopixz",
|
| 577 |
+
"bhzjcdjnrfmmjfvmlxcpvyvgwygqbhmvpgdeirc",
|
| 578 |
+
"hjuerinnwt",
|
| 579 |
+
"slgsozchvisoxymplffvuxdqcluoabmitxytgixxhhoedbbqgvh",
|
| 580 |
+
"xcdltrmjwtjrigqhnajhvvidwcccdaemgaaejjtbpbckrdbmhofqqjjhuhhdrbpjsfjzkbnlgoaicmcjijgmriiucaa",
|
| 581 |
+
"qxitlhholjfbtscmilwl",
|
| 582 |
+
"pvwxodivjydffgcyghghnbempcdyadnakhxcwxkaxpqcfgbletuugjdxhhpva"
|
| 583 |
+
],
|
| 584 |
+
"ikirwouzclvjgphnesvvtbcezrxpczwkcdmzhxkvgrkmjzwwdq"
|
| 585 |
+
],
|
| 586 |
+
"output": 0
|
| 587 |
+
},
|
| 588 |
+
{
|
| 589 |
+
"input": [
|
| 590 |
+
[
|
| 591 |
+
"nxy",
|
| 592 |
+
"tsuxesjbfuntioremylymeikzecnqfnokgtbggoiwjfvrmnlgiawxavpxfllqtqfpiledpibtgjreoosdrd",
|
| 593 |
+
"mnhqjtdaseajtvvpridhtwdenxlhrlhbnvqtdxkyzogapqrqwzpmayoa",
|
| 594 |
+
"mgszoyffycbkbzpqzucbllabtshdmwflluxvdqrngslrfs",
|
| 595 |
+
"ybireohyzxflbnxlbfnsnopescnamhruqmnpvbjf",
|
| 596 |
+
"ogknvqjxjytqrfgdmvvwyanlkfvzpfkzr",
|
| 597 |
+
"lijokragqqmhhvfvigvjcppkehqzlhyvjokorbmkoyrjnulbfgdawxqcvxghfdbiuvuvvi",
|
| 598 |
+
"veablklthzbtpiphofbdbnralqxeivlkaribacoanrhk",
|
| 599 |
+
"irnovdlifhmlmnqcepojzwnqihoqwvvmrfacdljcoeuoywwlrxuyvgdhgsd",
|
| 600 |
+
"oofkasngbqqpirwlsxibi",
|
| 601 |
+
"rcdwstzcjgsbbxemyvjsyjudnngxdczmtozxdftflqsyvkuchezgrjsxumuegldzcoffnq",
|
| 602 |
+
"minhudynvqwelpvabfaawuoiaiimn",
|
| 603 |
+
"btniozvndvoeaurxtqlrpalgbilcgnmdlsqwkcifiqokakj",
|
| 604 |
+
"xyrzzwsfsyfccuwwuehybwalmqawukedxsgdcfurujpzigevzbuqelguollkqrvwhhhmbpouaeud",
|
| 605 |
+
"virukixgfszcrvypdwnjagviopjivqtvnyqrkxzpohfwapqroldghiygsrn",
|
| 606 |
+
"lzaipguij",
|
| 607 |
+
"qhsroskqzwbddmkqazyxninrqnunkorxvcfgtmjuocomsodspxxrhiqbazllhpmpwtwbisgifmpuzagkvufrzworbhvfqc",
|
| 608 |
+
"dctcl",
|
| 609 |
+
"yddwrsebivhtinvaznhipnc",
|
| 610 |
+
"xchiyffqnspyhtqrmncqmofmy",
|
| 611 |
+
"qeilvbsbmcyfbyvedoizyjzzsrlyoladikaeejfhvakzidvczltxrcxbpkyqaiuganwrghpsppfkcydgrceoywbmcuwbzkae",
|
| 612 |
+
"bxgzvityhtolj",
|
| 613 |
+
"tychxvuotelninarlkxvjdghekhgddofzcdgtpxmzwfquznyvpnuwyczcauwkuvihyadmvxfmkwmuvzdluznpnilwoftcdbayqrp"
|
| 614 |
+
],
|
| 615 |
+
"j"
|
| 616 |
+
],
|
| 617 |
+
"output": 0
|
| 618 |
+
}
|
| 619 |
+
],
|
| 620 |
+
"haskell_template": "prefixCount :: [String] -> String -> Int\nprefixCount words pref ",
|
| 621 |
+
"ocaml_template": "let prefixCount (words: string list) (pref: string) : int = ",
|
| 622 |
+
"scala_template": "def prefixCount(words: List[String],pref: String): Int = { \n \n}",
|
| 623 |
+
"java_template": "public static int prefixCount(List<String> words, String pref) {\n\n}",
|
| 624 |
+
"python_template": "class Solution(object):\n def prefixCount(self, words, pref):\n \"\"\"\n :type words: List[str]\n :type pref: str\n :rtype: int\n \"\"\"\n "
|
| 625 |
+
}
|
counting_words_with_a_given_prefix/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 2 (prefixCount ["pay";" at tention";"practice";" at tend"] "at")
|
| 12 |
+
|
| 13 |
+
let test2 _ = assert_equal 0 (prefixCount ["leetcode";"win";"loops";"success"] "code")
|
| 14 |
+
|
| 15 |
+
|
| 16 |
+
(* Grouping test cases *)
|
| 17 |
+
let suite = "Test Suite for prefixCount" >::: [
|
| 18 |
+
|
| 19 |
+
"test1" >:: test1;
|
| 20 |
+
"test2" >:: test2;
|
| 21 |
+
]
|
| 22 |
+
|
| 23 |
+
|
| 24 |
+
(* Running the tests *)
|
| 25 |
+
let () = run_test_tt_main suite
|
| 26 |
+
end
|
counting_words_with_a_given_prefix/scala_tests/MySuite.scala
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
|
| 2 |
+
class MySuite extends munit.FunSuite {
|
| 3 |
+
|
| 4 |
+
test("test1") {
|
| 5 |
+
assertEquals(Main.prefixCount(List("pay"," at tention","practice"," at tend"),"at"), 2)
|
| 6 |
+
}
|
| 7 |
+
|
| 8 |
+
test("test2") {
|
| 9 |
+
assertEquals(Main.prefixCount(List("leetcode","win","loops","success"),"code"), 0)
|
| 10 |
+
}
|
| 11 |
+
|
| 12 |
+
}
|
create_binary_tree_from_descriptions/.DS_Store
ADDED
|
Binary file (6.15 kB). View file
|
|
|
create_binary_tree_from_descriptions/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 (createBinaryTree [[20,15,1],[20,17,0],[50,20,1],[50,80,0],[80,19,1]])," [50,20,80,15,17,19] (createBinaryTree [[20,15,1],[20,17,0],[50,20,1],[50,80,0],[80,19,1]]))
|
| 13 |
+
|
| 14 |
+
test2 :: Test
|
| 15 |
+
test2 = TestCase (assertEqual "for (createBinaryTree [[1,2,1],[2,3,0],[3,4,1]])," [1,2,null,null,3,4] (createBinaryTree [[1,2,1],[2,3,0],[3,4,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
|
create_binary_tree_from_descriptions/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(50,20,80,15,17,19)), createBinaryTree(new ArrayList<>(Arrays.asList(new ArrayList<>(Arrays.asList(20,15,1)),new ArrayList<>(Arrays.asList(20,17,0)),new ArrayList<>(Arrays.asList(50,20,1)),new ArrayList<>(Arrays.asList(50,80,0)),new ArrayList<>(Arrays.asList(80,19,1))))));
|
| 15 |
+
}
|
| 16 |
+
@Test
|
| 17 |
+
public void test2() {
|
| 18 |
+
assertEquals(new ArrayList<>(Arrays.asList(1,2,null,null,3,4)), createBinaryTree(new ArrayList<>(Arrays.asList(new ArrayList<>(Arrays.asList(1,2,1)),new ArrayList<>(Arrays.asList(2,3,0)),new ArrayList<>(Arrays.asList(3,4,1))))));
|
| 19 |
+
}
|
| 20 |
+
|
| 21 |
+
}
|
create_binary_tree_from_descriptions/meta.json
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"id": 2306,
|
| 3 |
+
"name": "create_binary_tree_from_descriptions",
|
| 4 |
+
"difficulty": "Medium",
|
| 5 |
+
"link": "https://leetcode.com/problems/create-binary-tree-from-descriptions/",
|
| 6 |
+
"date": "1645920000000",
|
| 7 |
+
"task_description": "You are given a 2D integer array `descriptions` where `descriptions[i] = [parenti, childi, isLefti]` indicates that `parenti` is the **parent** of `childi` in a **binary** tree of **unique** values. Furthermore, If `isLefti == 1`, then `childi` is the left child of `parenti`. If `isLefti == 0`, then `childi` is the right child of `parenti`. Construct the binary tree described by `descriptions` and return _its **root**_. The test cases will be generated such that the binary tree is **valid**. **Example 1:** ``` **Input:** descriptions = [[20,15,1],[20,17,0],[50,20,1],[50,80,0],[80,19,1]] **Output:** [50,20,80,15,17,19] **Explanation:** The root node is the node with value 50 since it has no parent. The resulting binary tree is shown in the diagram. ``` **Example 2:** ``` **Input:** descriptions = [[1,2,1],[2,3,0],[3,4,1]] **Output:** [1,2,null,null,3,4] **Explanation:** The root node is the node with value 1 since it has no parent. The resulting binary tree is shown in the diagram. ``` **Constraints:** `1 <= descriptions.length <= 104` `descriptions[i].length == 3` `1 <= parenti, childi <= 105` `0 <= isLefti <= 1` The binary tree described by `descriptions` is valid.",
|
| 8 |
+
"public_test_cases": [
|
| 9 |
+
{
|
| 10 |
+
"label": "Example 1",
|
| 11 |
+
"input": "descriptions = [[20,15,1],[20,17,0],[50,20,1],[50,80,0],[80,19,1]]",
|
| 12 |
+
"output": "[50,20,80,15,17,19] "
|
| 13 |
+
},
|
| 14 |
+
{
|
| 15 |
+
"label": "Example 2",
|
| 16 |
+
"input": "descriptions = [[1,2,1],[2,3,0],[3,4,1]]",
|
| 17 |
+
"output": "[1,2,null,null,3,4] "
|
| 18 |
+
}
|
| 19 |
+
],
|
| 20 |
+
"private_test_cases": [],
|
| 21 |
+
"haskell_template": "__init__ :: [[Int]] -> Unknown\n__init__ descriptions ",
|
| 22 |
+
"ocaml_template": "let __init__ (descriptions: int list list) : unknown = ",
|
| 23 |
+
"scala_template": "def __init__(descriptions: List[List[Int]]): unknown = { \n \n}",
|
| 24 |
+
"java_template": "public static Object __init__(List<List<Integer>> descriptions) {\n\n}",
|
| 25 |
+
"python_template": "# Definition for a binary tree node.\n# class TreeNode(object):\n# def __init__(self, val=0, left=None, right=None):\n# self.val = val\n# self.left = left\n# self.right = right\nclass Solution(object):\n def createBinaryTree(self, descriptions):\n \"\"\"\n :type descriptions: List[List[int]]\n :rtype: Optional[TreeNode]\n \"\"\"\n "
|
| 26 |
+
}
|
create_binary_tree_from_descriptions/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 [50;20;80;15;17;19] (createBinaryTree [[20;15;1];[20;17;0];[50;20;1];[50;80;0];[80;19;1]])
|
| 12 |
+
|
| 13 |
+
let test2 _ = assert_equal [1;2;null;null;3;4] (createBinaryTree [[1;2;1];[2;3;0];[3;4;1]])
|
| 14 |
+
|
| 15 |
+
|
| 16 |
+
(* Grouping test cases *)
|
| 17 |
+
let suite = "Test Suite for createBinaryTree" >::: [
|
| 18 |
+
|
| 19 |
+
"test1" >:: test1;
|
| 20 |
+
"test2" >:: test2;
|
| 21 |
+
]
|
| 22 |
+
|
| 23 |
+
|
| 24 |
+
(* Running the tests *)
|
| 25 |
+
let () = run_test_tt_main suite
|
| 26 |
+
end
|
create_binary_tree_from_descriptions/scala_tests/MySuite.scala
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
|
| 2 |
+
class MySuite extends munit.FunSuite {
|
| 3 |
+
|
| 4 |
+
test("test1") {
|
| 5 |
+
assertEquals(Main.createBinaryTree(List(List(20,15,1),List(20,17,0),List(50,20,1),List(50,80,0),List(80,19,1))), List(50,20,80,15,17,19))
|
| 6 |
+
}
|
| 7 |
+
|
| 8 |
+
test("test2") {
|
| 9 |
+
assertEquals(Main.createBinaryTree(List(List(1,2,1),List(2,3,0),List(3,4,1))), List(1,2,null,null,3,4))
|
| 10 |
+
}
|
| 11 |
+
|
| 12 |
+
}
|
create_components_with_same_value/.DS_Store
ADDED
|
Binary file (6.15 kB). View file
|
|
|
create_components_with_same_value/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 (componentValue [6,2,2,2,6] [[0,1],[1,2],[1,3],[3,4]])," 2 (componentValue [6,2,2,2,6] [[0,1],[1,2],[1,3],[3,4]]))
|
| 13 |
+
|
| 14 |
+
test2 :: Test
|
| 15 |
+
test2 = TestCase (assertEqual "for (componentValue [2] [])," 0 (componentValue [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
|