DatasetRepo commited on
Commit
45d1363
·
verified ·
1 Parent(s): d52182c

7120b0e378bb716bf1a5dff04491c44220f217e0aa5932e56a6de063a41aa084

Browse files
Files changed (50) hide show
  1. count_the_number_of_incremovable_subarrays_i/ocaml_tests/main.ml +45 -0
  2. count_the_number_of_incremovable_subarrays_i/scala_tests/MySuite.scala +36 -0
  3. count_the_number_of_incremovable_subarrays_ii/.DS_Store +0 -0
  4. count_the_number_of_incremovable_subarrays_ii/haskell_tests/Main.hs +44 -0
  5. count_the_number_of_incremovable_subarrays_ii/java_tests/Main.java +24 -0
  6. count_the_number_of_incremovable_subarrays_ii/meta.json +609 -0
  7. count_the_number_of_incremovable_subarrays_ii/ocaml_tests/main.ml +45 -0
  8. count_the_number_of_incremovable_subarrays_ii/scala_tests/MySuite.scala +36 -0
  9. count_the_number_of_infection_sequences/haskell_tests/Main.hs +0 -0
  10. count_the_number_of_infection_sequences/java_tests/Main.java +21 -0
  11. count_the_number_of_infection_sequences/meta.json +0 -0
  12. count_the_number_of_infection_sequences/ocaml_tests/main.ml +0 -0
  13. count_the_number_of_infection_sequences/scala_tests/MySuite.scala +0 -0
  14. count_the_number_of_inversions/haskell_tests/Main.hs +45 -0
  15. count_the_number_of_inversions/java_tests/Main.java +25 -0
  16. count_the_number_of_inversions/meta.json +2432 -0
  17. count_the_number_of_inversions/ocaml_tests/main.ml +47 -0
  18. count_the_number_of_inversions/scala_tests/MySuite.scala +40 -0
  19. count_the_number_of_powerful_integers/haskell_tests/Main.hs +45 -0
  20. count_the_number_of_powerful_integers/java_tests/Main.java +25 -0
  21. count_the_number_of_powerful_integers/meta.json +122 -0
  22. count_the_number_of_powerful_integers/ocaml_tests/main.ml +50 -0
  23. count_the_number_of_powerful_integers/scala_tests/MySuite.scala +44 -0
  24. count_the_number_of_special_characters_i/haskell_tests/Main.hs +44 -0
  25. count_the_number_of_special_characters_i/java_tests/Main.java +24 -0
  26. count_the_number_of_special_characters_i/meta.json +52 -0
  27. count_the_number_of_special_characters_i/ocaml_tests/main.ml +45 -0
  28. count_the_number_of_special_characters_i/scala_tests/MySuite.scala +36 -0
  29. count_the_number_of_special_characters_ii/haskell_tests/Main.hs +0 -0
  30. count_the_number_of_special_characters_ii/java_tests/Main.java +24 -0
  31. count_the_number_of_special_characters_ii/meta.json +0 -0
  32. count_the_number_of_special_characters_ii/ocaml_tests/main.ml +0 -0
  33. count_the_number_of_special_characters_ii/scala_tests/MySuite.scala +0 -0
  34. count_the_number_of_square_free_subsets/.DS_Store +0 -0
  35. count_the_number_of_square_free_subsets/haskell_tests/Main.hs +24 -0
  36. count_the_number_of_square_free_subsets/java_tests/Main.java +21 -0
  37. count_the_number_of_square_free_subsets/meta.json +0 -0
  38. count_the_number_of_square_free_subsets/ocaml_tests/main.ml +26 -0
  39. count_the_number_of_square_free_subsets/scala_tests/MySuite.scala +12 -0
  40. count_the_number_of_substrings_with_dominant_ones/haskell_tests/Main.hs +41 -0
  41. count_the_number_of_substrings_with_dominant_ones/java_tests/Main.java +20 -0
  42. count_the_number_of_substrings_with_dominant_ones/meta.json +47 -0
  43. count_the_number_of_substrings_with_dominant_ones/ocaml_tests/main.ml +42 -0
  44. count_the_number_of_substrings_with_dominant_ones/scala_tests/MySuite.scala +32 -0
  45. count_the_number_of_vowel_strings_in_range/.DS_Store +0 -0
  46. count_the_number_of_vowel_strings_in_range/haskell_tests/Main.hs +24 -0
  47. count_the_number_of_vowel_strings_in_range/java_tests/Main.java +21 -0
  48. count_the_number_of_vowel_strings_in_range/meta.json +0 -0
  49. count_the_number_of_vowel_strings_in_range/ocaml_tests/main.ml +26 -0
  50. count_the_number_of_vowel_strings_in_range/scala_tests/MySuite.scala +12 -0
count_the_number_of_incremovable_subarrays_i/ocaml_tests/main.ml ADDED
@@ -0,0 +1,45 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ module Main = struct
3
+ open OUnit2
4
+
5
+ (* Program start *)
6
+ let incremovableSubarrayCount (nums: int list) : int = failwith "Not implemented"
7
+
8
+ (* Program end *)
9
+
10
+ (* Test cases *)
11
+
12
+ let test1 _ = assert_equal 10 (incremovableSubarrayCount [1;2;3;4])
13
+
14
+ let test2 _ = assert_equal 7 (incremovableSubarrayCount [6;5;7;8])
15
+
16
+ let test3 _ = assert_equal 3 (incremovableSubarrayCount [8;7;6;6])
17
+
18
+ let test4 _ = assert_equal 3 (incremovableSubarrayCount [42; 27; 47; 6; 38; 46; 32; 24; 16; 32; 45; 9; 42; 6; 33; 47; 29; 50; 4; 6; 27; 14; 5; 24; 48; 23; 31; 42; 23; 33; 33; 1; 47; 34; 46; 3; 14])
19
+
20
+ let test5 _ = assert_equal 3 (incremovableSubarrayCount [44; 26; 1; 49; 14; 18; 14; 1; 35; 39; 46; 10])
21
+
22
+ let test6 _ = assert_equal 3 (incremovableSubarrayCount [3; 34; 50; 40; 20; 11; 2; 50; 20; 33; 27; 2; 27; 39; 37; 15; 30; 27; 11; 2; 27; 4; 34; 39; 39; 42; 2; 24; 30; 17; 7; 35; 16; 43; 32; 49; 1; 44; 39; 39; 41])
23
+
24
+ let test7 _ = assert_equal 3 (incremovableSubarrayCount [3; 48; 12; 27; 40; 35; 49; 20])
25
+
26
+ let test8 _ = assert_equal 3 (incremovableSubarrayCount [10; 24; 46; 10; 41; 6; 16; 47; 41; 25; 23; 13; 6; 43; 24; 41; 43; 36; 38; 14; 28; 46; 32; 8; 8; 24; 41; 38; 40; 13; 24; 48; 27; 36; 36; 18; 22; 34; 26; 17; 49; 34; 1; 45; 49; 7; 7; 22])
27
+
28
+
29
+ (* Grouping test cases *)
30
+ let suite = "Test Suite for incremovableSubarrayCount" >::: [
31
+
32
+ "test1" >:: test1;
33
+ "test2" >:: test2;
34
+ "test3" >:: test3;
35
+ "test4" >:: test4;
36
+ "test5" >:: test5;
37
+ "test6" >:: test6;
38
+ "test7" >:: test7;
39
+ "test8" >:: test8;
40
+ ]
41
+
42
+
43
+ (* Running the tests *)
44
+ let () = run_test_tt_main suite
45
+ end
count_the_number_of_incremovable_subarrays_i/scala_tests/MySuite.scala ADDED
@@ -0,0 +1,36 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ class MySuite extends munit.FunSuite {
3
+
4
+ test("test1") {
5
+ assertEquals(Main.incremovableSubarrayCount(List(1,2,3,4)), 10)
6
+ }
7
+
8
+ test("test2") {
9
+ assertEquals(Main.incremovableSubarrayCount(List(6,5,7,8)), 7)
10
+ }
11
+
12
+ test("test3") {
13
+ assertEquals(Main.incremovableSubarrayCount(List(8,7,6,6)), 3)
14
+ }
15
+
16
+ test("test4") {
17
+ assertEquals(Main.incremovableSubarrayCount(42,27,47,6,38,46,32,24,16,32,45,9,42,6,33,47,29,50,4,6,27,14,5,24,48,23,31,42,23,33,33,1,47,34,46,3,14), 4)
18
+ }
19
+
20
+ test("test5") {
21
+ assertEquals(Main.incremovableSubarrayCount(44,26,1,49,14,18,14,1,35,39,46,10), 3)
22
+ }
23
+
24
+ test("test6") {
25
+ assertEquals(Main.incremovableSubarrayCount(3,34,50,40,20,11,2,50,20,33,27,2,27,39,37,15,30,27,11,2,27,4,34,39,39,42,2,24,30,17,7,35,16,43,32,49,1,44,39,39,41), 10)
26
+ }
27
+
28
+ test("test7") {
29
+ assertEquals(Main.incremovableSubarrayCount(3,48,12,27,40,35,49,20), 5)
30
+ }
31
+
32
+ test("test8") {
33
+ assertEquals(Main.incremovableSubarrayCount(10,24,46,10,41,6,16,47,41,25,23,13,6,43,24,41,43,36,38,14,28,46,32,8,8,24,41,38,40,13,24,48,27,36,36,18,22,34,26,17,49,34,1,45,49,7,7,22), 7)
34
+ }
35
+
36
+ }
count_the_number_of_incremovable_subarrays_ii/.DS_Store ADDED
Binary file (6.15 kB). View file
 
count_the_number_of_incremovable_subarrays_ii/haskell_tests/Main.hs ADDED
@@ -0,0 +1,44 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ module Main where
3
+ import Test.HUnit
4
+
5
+ --Program start
6
+ incremovableSubarrayCount :: [Int] -> Int
7
+ incremovableSubarrayCount nums = undefined
8
+
9
+ --Program end
10
+
11
+ -- Test cases
12
+
13
+ test1 :: Test
14
+ test1 = TestCase (assertEqual "for (incremovableSubarrayCount [1,2,3,4])," 10 (incremovableSubarrayCount [1,2,3,4]))
15
+
16
+ test2 :: Test
17
+ test2 = TestCase (assertEqual "for (incremovableSubarrayCount [6,5,7,8])," 7 (incremovableSubarrayCount [6,5,7,8]))
18
+
19
+ test3 :: Test
20
+ test3 = TestCase (assertEqual "for (incremovableSubarrayCount [8,7,6,6])," 3 (incremovableSubarrayCount [8,7,6,6]))
21
+
22
+ test4 :: Test
23
+ test4 = TestCase (assertEqual "for (incremovableSubarrayCount [8])," 1 (incremovableSubarrayCount [8]))
24
+
25
+ test5 :: Test
26
+ test5 = TestCase (assertEqual "for (incremovableSubarrayCount [7, 26, 25, 18, 35])," 8 (incremovableSubarrayCount [7, 26, 25, 18, 35]))
27
+
28
+ test6 :: Test
29
+ test6 = TestCase (assertEqual "for (incremovableSubarrayCount [43, 16, 35, 36, 4])," 3 (incremovableSubarrayCount [43, 16, 35, 36, 4]))
30
+
31
+ test7 :: Test
32
+ test7 = TestCase (assertEqual "for (incremovableSubarrayCount [42])," 1 (incremovableSubarrayCount [42]))
33
+
34
+ test8 :: Test
35
+ test8 = TestCase (assertEqual "for (incremovableSubarrayCount [429361165, 633072753, 254547305, 642324182, 537235401, 50185202, 156234206, 785286014, 518591955, 632905691, 660493099, 178414880, 596619102, 311233782, 260317395, 250858523, 223961455, 605986151, 211222915, 221137408, 276817256, 647740310, 949238034, 153840984, 969567536, 182631178, 467038417, 108985507, 937118905, 183435061, 787452673, 841806671, 724269555, 394248007, 230340658, 977887229, 409945198, 779066563, 432822034, 868295972, 89138060, 511921599, 492514850, 172889758, 921821902, 26823963, 518063982, 232495332, 828332859, 178541766, 526881733, 443108221, 919787739, 368591651, 629963599, 402840924, 654824028, 417143012, 840945393, 210839170, 898558644, 464791988, 251782310, 387118577, 920758542, 982102788, 19117659, 238826587, 863132796, 426186995, 612682265, 144404817, 321584738, 999330341, 407758655, 979929366, 896285487, 869319901, 378606401, 924879332, 800727745, 327657863, 599386465, 425831682, 700711960, 220421211, 383284642, 962509729, 830657592, 631592036, 673209612, 969537456, 503012828, 427985999, 164948855, 303452865, 708736300, 526071395, 775805076, 266019120, 62691412, 290945061, 161110171, 417311644, 15617005, 213511650, 572351759, 926082221, 732154268, 170404272, 457588529, 690357159, 478633706, 191234635, 882832755, 301066014, 311908787, 553333018, 461486349, 18593226, 619019934, 854978075, 901788274, 921899485, 888677851, 487305376, 370117032, 549059307, 666030235, 564161097, 464098805, 495642311, 317168750, 253098316, 859838801, 811264509, 940295372, 11935149, 630942324, 690733011, 925515741, 866395151, 358154369, 883088716, 300152704, 917163569, 597676361, 663319627, 509851366, 337476044, 138615684, 963275237, 719124499, 602885775, 787083754, 244011200, 8346064, 536378196, 34372229, 683790110, 684773889, 510845473, 554795161, 818703539, 787980356, 24306796, 75613369, 295777506, 393744676, 804790371, 191056476, 439181415, 381147608, 472682258, 36866501, 322722003, 20869118, 4733237, 995707166, 229855691, 257991754, 65033116, 749757632, 384933699, 677286974, 412829499, 480086470, 841588925, 254805016, 993304096, 536638092, 877890078, 842962895, 176931657, 293168285, 303477311, 265647976, 534433394, 428552612, 583412532, 352767970, 983978517, 877559396, 913537532, 938291425, 941199418, 474282782, 694102733, 973145064, 350703257, 448205430, 270456296, 488907425, 457455578, 110773828, 72794052, 495599764, 573376730, 957969870, 48607387, 655226555, 542279922, 886648662, 322185426, 68047820, 505004413, 44355355, 949478057, 48539088, 963760873, 429032800, 261897128, 798586665, 597834989, 412661678, 689484562, 518447342, 243897077, 395320213, 518904936, 78086268, 573374308, 596227891, 124010859, 902690731, 126527103, 767024010, 732514428, 458161400, 407460252, 431936219, 347464446, 363206410, 247260413, 50586152, 271818206, 80620392, 983288788, 670925078, 688571202, 34347716, 602809230, 510574303, 47328498, 807331805, 896142309, 90026289, 885857631, 437805246, 135624048, 393235940, 129105246, 234045461, 552735165, 650891692, 452718138, 403245822, 91789303, 248760709, 840098427, 855049386, 55776250, 59884914, 197160026, 476266883, 979364871, 785656796, 578475982, 981108149, 483444623, 756783621, 860038275, 397492261, 393058194, 853492828, 137242813, 699069170, 131079204, 157852400, 519742765, 710987965, 565123589, 400810762, 247659328, 677101474, 736990099, 985943349, 53978756, 930319263, 745645873, 236842530, 359707571, 44124509, 835029568, 885647780, 823656125, 731298228, 749196032, 152375439, 10454032, 218840752, 432954714, 748984183, 897797834, 760555189, 775396842, 220460455, 410014758, 650670446, 744480256, 32121302, 402105739, 114878437, 129228983, 352004466, 898088712, 119481437, 977214918, 595703163, 938451563, 473946037, 244545000, 445259368, 651899221, 654782181, 965254048, 138578631, 351340798, 986442456, 158602984, 816802003, 7294724, 515617218, 931754163, 479684569, 435021178, 228714722, 689009583, 737862088, 785551300, 567144320, 101558298, 888704147, 44341289, 998253591, 831282523, 900209420, 935552888, 309479991, 325971990, 527821795, 397048536, 970183398, 296078137, 350128421, 956801273, 776085640, 368871679, 126894280, 529010179, 222603980, 736268607, 547015872, 114458833, 516215930, 32650509, 881900861, 497415685, 209105937, 723903782, 954458233, 877308028, 146389221, 983036758, 375100179, 389674489, 179981441, 168257250, 204408717, 360065024, 299252040, 958297033, 16722411, 502474013, 354666303, 853297693, 861916507, 810906772, 231815323, 102264424, 450971322, 91397136, 486738013, 46378192, 599451771, 112003509, 629058098, 623384006, 218349410, 782372451, 14291340, 842014403, 262859525, 569839518, 671169516, 424379906, 485741481, 677851419, 798780652, 30312391, 158624981, 734207018, 615301627, 10198877, 702208680, 530619436, 784192471, 415372942, 225874772, 531013966, 76998111, 204689428, 200495034, 661011208, 773773371, 870677104, 377751729, 116581460, 313510881, 945140707, 105746217, 73776454, 317987742, 270520852, 641698702, 937378330, 583743919, 528191133, 642573076, 176315202, 142718138, 642885770, 338962955, 45388442, 390857725, 85811109, 994179064, 557548882, 990808217, 469193071, 746232590, 334281860, 541353559, 352323111, 205527279, 597573005, 345082684, 912686233, 496987861, 497079999, 77290775, 745034340, 835069871, 108143503, 723654347, 15926011, 154063119, 435737441, 978733732, 581571364, 626830162, 780676765, 207669753, 776744027, 255172533, 657914569, 96337063, 366382830, 553063223, 228665156, 588726874, 58355939, 347453866, 771020426, 147411326, 121493913, 931548368, 247551183, 102758739, 248478496, 752867242, 317201395, 701576377, 594933976, 991133888, 391604928, 859258446, 537759368, 313918218, 248232165, 592668162, 159435171, 580077927, 520091696, 957243550, 868665699, 66492802, 966665680, 455482831, 214179937, 877686259, 382476059, 518859322, 652852374, 799707820, 825991198, 121232594, 739699517, 652829646, 414973699])," 4 (incremovableSubarrayCount [429361165, 633072753, 254547305, 642324182, 537235401, 50185202, 156234206, 785286014, 518591955, 632905691, 660493099, 178414880, 596619102, 311233782, 260317395, 250858523, 223961455, 605986151, 211222915, 221137408, 276817256, 647740310, 949238034, 153840984, 969567536, 182631178, 467038417, 108985507, 937118905, 183435061, 787452673, 841806671, 724269555, 394248007, 230340658, 977887229, 409945198, 779066563, 432822034, 868295972, 89138060, 511921599, 492514850, 172889758, 921821902, 26823963, 518063982, 232495332, 828332859, 178541766, 526881733, 443108221, 919787739, 368591651, 629963599, 402840924, 654824028, 417143012, 840945393, 210839170, 898558644, 464791988, 251782310, 387118577, 920758542, 982102788, 19117659, 238826587, 863132796, 426186995, 612682265, 144404817, 321584738, 999330341, 407758655, 979929366, 896285487, 869319901, 378606401, 924879332, 800727745, 327657863, 599386465, 425831682, 700711960, 220421211, 383284642, 962509729, 830657592, 631592036, 673209612, 969537456, 503012828, 427985999, 164948855, 303452865, 708736300, 526071395, 775805076, 266019120, 62691412, 290945061, 161110171, 417311644, 15617005, 213511650, 572351759, 926082221, 732154268, 170404272, 457588529, 690357159, 478633706, 191234635, 882832755, 301066014, 311908787, 553333018, 461486349, 18593226, 619019934, 854978075, 901788274, 921899485, 888677851, 487305376, 370117032, 549059307, 666030235, 564161097, 464098805, 495642311, 317168750, 253098316, 859838801, 811264509, 940295372, 11935149, 630942324, 690733011, 925515741, 866395151, 358154369, 883088716, 300152704, 917163569, 597676361, 663319627, 509851366, 337476044, 138615684, 963275237, 719124499, 602885775, 787083754, 244011200, 8346064, 536378196, 34372229, 683790110, 684773889, 510845473, 554795161, 818703539, 787980356, 24306796, 75613369, 295777506, 393744676, 804790371, 191056476, 439181415, 381147608, 472682258, 36866501, 322722003, 20869118, 4733237, 995707166, 229855691, 257991754, 65033116, 749757632, 384933699, 677286974, 412829499, 480086470, 841588925, 254805016, 993304096, 536638092, 877890078, 842962895, 176931657, 293168285, 303477311, 265647976, 534433394, 428552612, 583412532, 352767970, 983978517, 877559396, 913537532, 938291425, 941199418, 474282782, 694102733, 973145064, 350703257, 448205430, 270456296, 488907425, 457455578, 110773828, 72794052, 495599764, 573376730, 957969870, 48607387, 655226555, 542279922, 886648662, 322185426, 68047820, 505004413, 44355355, 949478057, 48539088, 963760873, 429032800, 261897128, 798586665, 597834989, 412661678, 689484562, 518447342, 243897077, 395320213, 518904936, 78086268, 573374308, 596227891, 124010859, 902690731, 126527103, 767024010, 732514428, 458161400, 407460252, 431936219, 347464446, 363206410, 247260413, 50586152, 271818206, 80620392, 983288788, 670925078, 688571202, 34347716, 602809230, 510574303, 47328498, 807331805, 896142309, 90026289, 885857631, 437805246, 135624048, 393235940, 129105246, 234045461, 552735165, 650891692, 452718138, 403245822, 91789303, 248760709, 840098427, 855049386, 55776250, 59884914, 197160026, 476266883, 979364871, 785656796, 578475982, 981108149, 483444623, 756783621, 860038275, 397492261, 393058194, 853492828, 137242813, 699069170, 131079204, 157852400, 519742765, 710987965, 565123589, 400810762, 247659328, 677101474, 736990099, 985943349, 53978756, 930319263, 745645873, 236842530, 359707571, 44124509, 835029568, 885647780, 823656125, 731298228, 749196032, 152375439, 10454032, 218840752, 432954714, 748984183, 897797834, 760555189, 775396842, 220460455, 410014758, 650670446, 744480256, 32121302, 402105739, 114878437, 129228983, 352004466, 898088712, 119481437, 977214918, 595703163, 938451563, 473946037, 244545000, 445259368, 651899221, 654782181, 965254048, 138578631, 351340798, 986442456, 158602984, 816802003, 7294724, 515617218, 931754163, 479684569, 435021178, 228714722, 689009583, 737862088, 785551300, 567144320, 101558298, 888704147, 44341289, 998253591, 831282523, 900209420, 935552888, 309479991, 325971990, 527821795, 397048536, 970183398, 296078137, 350128421, 956801273, 776085640, 368871679, 126894280, 529010179, 222603980, 736268607, 547015872, 114458833, 516215930, 32650509, 881900861, 497415685, 209105937, 723903782, 954458233, 877308028, 146389221, 983036758, 375100179, 389674489, 179981441, 168257250, 204408717, 360065024, 299252040, 958297033, 16722411, 502474013, 354666303, 853297693, 861916507, 810906772, 231815323, 102264424, 450971322, 91397136, 486738013, 46378192, 599451771, 112003509, 629058098, 623384006, 218349410, 782372451, 14291340, 842014403, 262859525, 569839518, 671169516, 424379906, 485741481, 677851419, 798780652, 30312391, 158624981, 734207018, 615301627, 10198877, 702208680, 530619436, 784192471, 415372942, 225874772, 531013966, 76998111, 204689428, 200495034, 661011208, 773773371, 870677104, 377751729, 116581460, 313510881, 945140707, 105746217, 73776454, 317987742, 270520852, 641698702, 937378330, 583743919, 528191133, 642573076, 176315202, 142718138, 642885770, 338962955, 45388442, 390857725, 85811109, 994179064, 557548882, 990808217, 469193071, 746232590, 334281860, 541353559, 352323111, 205527279, 597573005, 345082684, 912686233, 496987861, 497079999, 77290775, 745034340, 835069871, 108143503, 723654347, 15926011, 154063119, 435737441, 978733732, 581571364, 626830162, 780676765, 207669753, 776744027, 255172533, 657914569, 96337063, 366382830, 553063223, 228665156, 588726874, 58355939, 347453866, 771020426, 147411326, 121493913, 931548368, 247551183, 102758739, 248478496, 752867242, 317201395, 701576377, 594933976, 991133888, 391604928, 859258446, 537759368, 313918218, 248232165, 592668162, 159435171, 580077927, 520091696, 957243550, 868665699, 66492802, 966665680, 455482831, 214179937, 877686259, 382476059, 518859322, 652852374, 799707820, 825991198, 121232594, 739699517, 652829646, 414973699]))
36
+
37
+
38
+ -- Grouping test cases
39
+ tests :: Test
40
+ tests = TestList [TestLabel "Test1" test1, TestLabel "Test2" test2, TestLabel "Test3" test3, TestLabel "Test4" test4, TestLabel "Test5" test5, TestLabel "Test6" test6, TestLabel "Test7" test7]
41
+
42
+ -- Running the tests
43
+ main :: IO Counts
44
+ main = runTestTT tests
count_the_number_of_incremovable_subarrays_ii/java_tests/Main.java ADDED
@@ -0,0 +1,24 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ import static org.junit.jupiter.api.Assertions.*;
3
+ import org.junit.jupiter.api.Test;
4
+ import java.util.List;
5
+ import java.util.Arrays;
6
+ public class Main {
7
+ //Program start
8
+
9
+ //Program end
10
+
11
+ @Test
12
+ public void test1() {
13
+ assertEquals(10, incremovableSubarrayCount(Arrays.asList(1,2,3,4)));
14
+ }
15
+ @Test
16
+ public void test2() {
17
+ assertEquals(7, incremovableSubarrayCount(Arrays.asList(6,5,7,8)));
18
+ }
19
+ @Test
20
+ public void test3() {
21
+ assertEquals(3, incremovableSubarrayCount(Arrays.asList(8,7,6,6)));
22
+ }
23
+
24
+ }
count_the_number_of_incremovable_subarrays_ii/meta.json ADDED
@@ -0,0 +1,609 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 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able_subarrays_ii",
4
+ "difficulty": "Hard",
5
+ "link": "https://leetcode.com/problems/count-the-number-of-incremovable-subarrays-ii/",
6
+ "date": "2023-12-09 00:00:00",
7
+ "task_description": "You are given a **0-indexed** array of **positive** integers `nums`. A subarray of `nums` is called **incremovable** if `nums` becomes **strictly increasing** on removing the subarray. For example, the subarray `[3, 4]` is an incremovable subarray of `[5, 3, 4, 6, 7]` because removing this subarray changes the array `[5, 3, 4, 6, 7]` to `[5, 6, 7]` which is strictly increasing. Return _the total number of **incremovable** subarrays of_ `nums`. **Note** that an empty array is considered strictly increasing. A **subarray** is a contiguous non-empty sequence of elements within an array. **Example 1:** ``` **Input:** nums = [1,2,3,4] **Output:** 10 **Explanation:** The 10 incremovable subarrays are: [1], [2], [3], [4], [1,2], [2,3], [3,4], [1,2,3], [2,3,4], and [1,2,3,4], because on removing any one of these subarrays nums becomes strictly increasing. Note that you cannot select an empty subarray. ``` **Example 2:** ``` **Input:** nums = [6,5,7,8] **Output:** 7 **Explanation:** The 7 incremovable subarrays are: [5], [6], [5,7], [6,5], [5,7,8], [6,5,7] and [6,5,7,8]. It can be shown that there are only 7 incremovable subarrays in nums. ``` **Example 3:** ``` **Input:** nums = [8,7,6,6] **Output:** 3 **Explanation:** The 3 incremovable subarrays are: [8,7,6], [7,6,6], and [8,7,6,6]. Note that [8,7] is not an incremovable subarray because after removing [8,7] nums becomes [6,6], which is sorted in ascending order but not strictly increasing. ``` **Constraints:** `1 <= nums.length <= 105` `1 <= nums[i] <= 109`",
8
+ "public_test_cases": [
9
+ {
10
+ "label": "Example 1",
11
+ "input": "nums = [1,2,3,4]",
12
+ "output": "10 "
13
+ },
14
+ {
15
+ "label": "Example 2",
16
+ "input": "nums = [6,5,7,8]",
17
+ "output": "7 "
18
+ },
19
+ {
20
+ "label": "Example 3",
21
+ "input": "nums = [8,7,6,6]",
22
+ "output": "3 "
23
+ }
24
+ ],
25
+ "private_test_cases": [
26
+ {
27
+ "input": [
28
+ 8
29
+ ],
30
+ "output": 1
31
+ },
32
+ {
33
+ "input": [
34
+ 7,
35
+ 26,
36
+ 25,
37
+ 18,
38
+ 35
39
+ ],
40
+ "output": 8
41
+ },
42
+ {
43
+ "input": [
44
+ 43,
45
+ 16,
46
+ 35,
47
+ 36,
48
+ 4
49
+ ],
50
+ "output": 3
51
+ },
52
+ {
53
+ "input": [
54
+ 42
55
+ ],
56
+ "output": 1
57
+ },
58
+ {
59
+ "input": [
60
+ 429361165,
61
+ 633072753,
62
+ 254547305,
63
+ 642324182,
64
+ 537235401,
65
+ 50185202,
66
+ 156234206,
67
+ 785286014,
68
+ 518591955,
69
+ 632905691,
70
+ 660493099,
71
+ 178414880,
72
+ 596619102,
73
+ 311233782,
74
+ 260317395,
75
+ 250858523,
76
+ 223961455,
77
+ 605986151,
78
+ 211222915,
79
+ 221137408,
80
+ 276817256,
81
+ 647740310,
82
+ 949238034,
83
+ 153840984,
84
+ 969567536,
85
+ 182631178,
86
+ 467038417,
87
+ 108985507,
88
+ 937118905,
89
+ 183435061,
90
+ 787452673,
91
+ 841806671,
92
+ 724269555,
93
+ 394248007,
94
+ 230340658,
95
+ 977887229,
96
+ 409945198,
97
+ 779066563,
98
+ 432822034,
99
+ 868295972,
100
+ 89138060,
101
+ 511921599,
102
+ 492514850,
103
+ 172889758,
104
+ 921821902,
105
+ 26823963,
106
+ 518063982,
107
+ 232495332,
108
+ 828332859,
109
+ 178541766,
110
+ 526881733,
111
+ 443108221,
112
+ 919787739,
113
+ 368591651,
114
+ 629963599,
115
+ 402840924,
116
+ 654824028,
117
+ 417143012,
118
+ 840945393,
119
+ 210839170,
120
+ 898558644,
121
+ 464791988,
122
+ 251782310,
123
+ 387118577,
124
+ 920758542,
125
+ 982102788,
126
+ 19117659,
127
+ 238826587,
128
+ 863132796,
129
+ 426186995,
130
+ 612682265,
131
+ 144404817,
132
+ 321584738,
133
+ 999330341,
134
+ 407758655,
135
+ 979929366,
136
+ 896285487,
137
+ 869319901,
138
+ 378606401,
139
+ 924879332,
140
+ 800727745,
141
+ 327657863,
142
+ 599386465,
143
+ 425831682,
144
+ 700711960,
145
+ 220421211,
146
+ 383284642,
147
+ 962509729,
148
+ 830657592,
149
+ 631592036,
150
+ 673209612,
151
+ 969537456,
152
+ 503012828,
153
+ 427985999,
154
+ 164948855,
155
+ 303452865,
156
+ 708736300,
157
+ 526071395,
158
+ 775805076,
159
+ 266019120,
160
+ 62691412,
161
+ 290945061,
162
+ 161110171,
163
+ 417311644,
164
+ 15617005,
165
+ 213511650,
166
+ 572351759,
167
+ 926082221,
168
+ 732154268,
169
+ 170404272,
170
+ 457588529,
171
+ 690357159,
172
+ 478633706,
173
+ 191234635,
174
+ 882832755,
175
+ 301066014,
176
+ 311908787,
177
+ 553333018,
178
+ 461486349,
179
+ 18593226,
180
+ 619019934,
181
+ 854978075,
182
+ 901788274,
183
+ 921899485,
184
+ 888677851,
185
+ 487305376,
186
+ 370117032,
187
+ 549059307,
188
+ 666030235,
189
+ 564161097,
190
+ 464098805,
191
+ 495642311,
192
+ 317168750,
193
+ 253098316,
194
+ 859838801,
195
+ 811264509,
196
+ 940295372,
197
+ 11935149,
198
+ 630942324,
199
+ 690733011,
200
+ 925515741,
201
+ 866395151,
202
+ 358154369,
203
+ 883088716,
204
+ 300152704,
205
+ 917163569,
206
+ 597676361,
207
+ 663319627,
208
+ 509851366,
209
+ 337476044,
210
+ 138615684,
211
+ 963275237,
212
+ 719124499,
213
+ 602885775,
214
+ 787083754,
215
+ 244011200,
216
+ 8346064,
217
+ 536378196,
218
+ 34372229,
219
+ 683790110,
220
+ 684773889,
221
+ 510845473,
222
+ 554795161,
223
+ 818703539,
224
+ 787980356,
225
+ 24306796,
226
+ 75613369,
227
+ 295777506,
228
+ 393744676,
229
+ 804790371,
230
+ 191056476,
231
+ 439181415,
232
+ 381147608,
233
+ 472682258,
234
+ 36866501,
235
+ 322722003,
236
+ 20869118,
237
+ 4733237,
238
+ 995707166,
239
+ 229855691,
240
+ 257991754,
241
+ 65033116,
242
+ 749757632,
243
+ 384933699,
244
+ 677286974,
245
+ 412829499,
246
+ 480086470,
247
+ 841588925,
248
+ 254805016,
249
+ 993304096,
250
+ 536638092,
251
+ 877890078,
252
+ 842962895,
253
+ 176931657,
254
+ 293168285,
255
+ 303477311,
256
+ 265647976,
257
+ 534433394,
258
+ 428552612,
259
+ 583412532,
260
+ 352767970,
261
+ 983978517,
262
+ 877559396,
263
+ 913537532,
264
+ 938291425,
265
+ 941199418,
266
+ 474282782,
267
+ 694102733,
268
+ 973145064,
269
+ 350703257,
270
+ 448205430,
271
+ 270456296,
272
+ 488907425,
273
+ 457455578,
274
+ 110773828,
275
+ 72794052,
276
+ 495599764,
277
+ 573376730,
278
+ 957969870,
279
+ 48607387,
280
+ 655226555,
281
+ 542279922,
282
+ 886648662,
283
+ 322185426,
284
+ 68047820,
285
+ 505004413,
286
+ 44355355,
287
+ 949478057,
288
+ 48539088,
289
+ 963760873,
290
+ 429032800,
291
+ 261897128,
292
+ 798586665,
293
+ 597834989,
294
+ 412661678,
295
+ 689484562,
296
+ 518447342,
297
+ 243897077,
298
+ 395320213,
299
+ 518904936,
300
+ 78086268,
301
+ 573374308,
302
+ 596227891,
303
+ 124010859,
304
+ 902690731,
305
+ 126527103,
306
+ 767024010,
307
+ 732514428,
308
+ 458161400,
309
+ 407460252,
310
+ 431936219,
311
+ 347464446,
312
+ 363206410,
313
+ 247260413,
314
+ 50586152,
315
+ 271818206,
316
+ 80620392,
317
+ 983288788,
318
+ 670925078,
319
+ 688571202,
320
+ 34347716,
321
+ 602809230,
322
+ 510574303,
323
+ 47328498,
324
+ 807331805,
325
+ 896142309,
326
+ 90026289,
327
+ 885857631,
328
+ 437805246,
329
+ 135624048,
330
+ 393235940,
331
+ 129105246,
332
+ 234045461,
333
+ 552735165,
334
+ 650891692,
335
+ 452718138,
336
+ 403245822,
337
+ 91789303,
338
+ 248760709,
339
+ 840098427,
340
+ 855049386,
341
+ 55776250,
342
+ 59884914,
343
+ 197160026,
344
+ 476266883,
345
+ 979364871,
346
+ 785656796,
347
+ 578475982,
348
+ 981108149,
349
+ 483444623,
350
+ 756783621,
351
+ 860038275,
352
+ 397492261,
353
+ 393058194,
354
+ 853492828,
355
+ 137242813,
356
+ 699069170,
357
+ 131079204,
358
+ 157852400,
359
+ 519742765,
360
+ 710987965,
361
+ 565123589,
362
+ 400810762,
363
+ 247659328,
364
+ 677101474,
365
+ 736990099,
366
+ 985943349,
367
+ 53978756,
368
+ 930319263,
369
+ 745645873,
370
+ 236842530,
371
+ 359707571,
372
+ 44124509,
373
+ 835029568,
374
+ 885647780,
375
+ 823656125,
376
+ 731298228,
377
+ 749196032,
378
+ 152375439,
379
+ 10454032,
380
+ 218840752,
381
+ 432954714,
382
+ 748984183,
383
+ 897797834,
384
+ 760555189,
385
+ 775396842,
386
+ 220460455,
387
+ 410014758,
388
+ 650670446,
389
+ 744480256,
390
+ 32121302,
391
+ 402105739,
392
+ 114878437,
393
+ 129228983,
394
+ 352004466,
395
+ 898088712,
396
+ 119481437,
397
+ 977214918,
398
+ 595703163,
399
+ 938451563,
400
+ 473946037,
401
+ 244545000,
402
+ 445259368,
403
+ 651899221,
404
+ 654782181,
405
+ 965254048,
406
+ 138578631,
407
+ 351340798,
408
+ 986442456,
409
+ 158602984,
410
+ 816802003,
411
+ 7294724,
412
+ 515617218,
413
+ 931754163,
414
+ 479684569,
415
+ 435021178,
416
+ 228714722,
417
+ 689009583,
418
+ 737862088,
419
+ 785551300,
420
+ 567144320,
421
+ 101558298,
422
+ 888704147,
423
+ 44341289,
424
+ 998253591,
425
+ 831282523,
426
+ 900209420,
427
+ 935552888,
428
+ 309479991,
429
+ 325971990,
430
+ 527821795,
431
+ 397048536,
432
+ 970183398,
433
+ 296078137,
434
+ 350128421,
435
+ 956801273,
436
+ 776085640,
437
+ 368871679,
438
+ 126894280,
439
+ 529010179,
440
+ 222603980,
441
+ 736268607,
442
+ 547015872,
443
+ 114458833,
444
+ 516215930,
445
+ 32650509,
446
+ 881900861,
447
+ 497415685,
448
+ 209105937,
449
+ 723903782,
450
+ 954458233,
451
+ 877308028,
452
+ 146389221,
453
+ 983036758,
454
+ 375100179,
455
+ 389674489,
456
+ 179981441,
457
+ 168257250,
458
+ 204408717,
459
+ 360065024,
460
+ 299252040,
461
+ 958297033,
462
+ 16722411,
463
+ 502474013,
464
+ 354666303,
465
+ 853297693,
466
+ 861916507,
467
+ 810906772,
468
+ 231815323,
469
+ 102264424,
470
+ 450971322,
471
+ 91397136,
472
+ 486738013,
473
+ 46378192,
474
+ 599451771,
475
+ 112003509,
476
+ 629058098,
477
+ 623384006,
478
+ 218349410,
479
+ 782372451,
480
+ 14291340,
481
+ 842014403,
482
+ 262859525,
483
+ 569839518,
484
+ 671169516,
485
+ 424379906,
486
+ 485741481,
487
+ 677851419,
488
+ 798780652,
489
+ 30312391,
490
+ 158624981,
491
+ 734207018,
492
+ 615301627,
493
+ 10198877,
494
+ 702208680,
495
+ 530619436,
496
+ 784192471,
497
+ 415372942,
498
+ 225874772,
499
+ 531013966,
500
+ 76998111,
501
+ 204689428,
502
+ 200495034,
503
+ 661011208,
504
+ 773773371,
505
+ 870677104,
506
+ 377751729,
507
+ 116581460,
508
+ 313510881,
509
+ 945140707,
510
+ 105746217,
511
+ 73776454,
512
+ 317987742,
513
+ 270520852,
514
+ 641698702,
515
+ 937378330,
516
+ 583743919,
517
+ 528191133,
518
+ 642573076,
519
+ 176315202,
520
+ 142718138,
521
+ 642885770,
522
+ 338962955,
523
+ 45388442,
524
+ 390857725,
525
+ 85811109,
526
+ 994179064,
527
+ 557548882,
528
+ 990808217,
529
+ 469193071,
530
+ 746232590,
531
+ 334281860,
532
+ 541353559,
533
+ 352323111,
534
+ 205527279,
535
+ 597573005,
536
+ 345082684,
537
+ 912686233,
538
+ 496987861,
539
+ 497079999,
540
+ 77290775,
541
+ 745034340,
542
+ 835069871,
543
+ 108143503,
544
+ 723654347,
545
+ 15926011,
546
+ 154063119,
547
+ 435737441,
548
+ 978733732,
549
+ 581571364,
550
+ 626830162,
551
+ 780676765,
552
+ 207669753,
553
+ 776744027,
554
+ 255172533,
555
+ 657914569,
556
+ 96337063,
557
+ 366382830,
558
+ 553063223,
559
+ 228665156,
560
+ 588726874,
561
+ 58355939,
562
+ 347453866,
563
+ 771020426,
564
+ 147411326,
565
+ 121493913,
566
+ 931548368,
567
+ 247551183,
568
+ 102758739,
569
+ 248478496,
570
+ 752867242,
571
+ 317201395,
572
+ 701576377,
573
+ 594933976,
574
+ 991133888,
575
+ 391604928,
576
+ 859258446,
577
+ 537759368,
578
+ 313918218,
579
+ 248232165,
580
+ 592668162,
581
+ 159435171,
582
+ 580077927,
583
+ 520091696,
584
+ 957243550,
585
+ 868665699,
586
+ 66492802,
587
+ 966665680,
588
+ 455482831,
589
+ 214179937,
590
+ 877686259,
591
+ 382476059,
592
+ 518859322,
593
+ 652852374,
594
+ 799707820,
595
+ 825991198,
596
+ 121232594,
597
+ 739699517,
598
+ 652829646,
599
+ 414973699
600
+ ],
601
+ "output": 4
602
+ }
603
+ ],
604
+ "haskell_template": "incremovableSubarrayCount :: [Int] -> Int\nincremovableSubarrayCount nums ",
605
+ "ocaml_template": "let incremovableSubarrayCount (nums: int list) : int = ",
606
+ "scala_template": "def incremovableSubarrayCount(nums: List[Int]): Int = { \n \n}",
607
+ "java_template": "class Solution {\n public long incremovableSubarrayCount(int[] nums) {\n \n }\n}",
608
+ "python_template": "class Solution(object):\n def incremovableSubarrayCount(self, nums):\n \"\"\"\n :type nums: List[int]\n :rtype: int\n \"\"\"\n "
609
+ }
count_the_number_of_incremovable_subarrays_ii/ocaml_tests/main.ml ADDED
@@ -0,0 +1,45 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ module Main = struct
3
+ open OUnit2
4
+
5
+ (* Program start *)
6
+ let incremovableSubarrayCount (nums: int list) : int = failwith "Not implemented"
7
+
8
+ (* Program end *)
9
+
10
+ (* Test cases *)
11
+
12
+ let test1 _ = assert_equal 10 (incremovableSubarrayCount [1;2;3;4])
13
+
14
+ let test2 _ = assert_equal 7 (incremovableSubarrayCount [6;5;7;8])
15
+
16
+ let test3 _ = assert_equal 3 (incremovableSubarrayCount [8;7;6;6])
17
+
18
+ let test4 _ = assert_equal 3 (incremovableSubarrayCount [8])
19
+
20
+ let test5 _ = assert_equal 3 (incremovableSubarrayCount [7; 26; 25; 18; 35])
21
+
22
+ let test6 _ = assert_equal 3 (incremovableSubarrayCount [43; 16; 35; 36; 4])
23
+
24
+ let test7 _ = assert_equal 3 (incremovableSubarrayCount [42])
25
+
26
+ let test8 _ = assert_equal 3 (incremovableSubarrayCount [429361165; 633072753; 254547305; 642324182; 537235401; 50185202; 156234206; 785286014; 518591955; 632905691; 660493099; 178414880; 596619102; 311233782; 260317395; 250858523; 223961455; 605986151; 211222915; 221137408; 276817256; 647740310; 949238034; 153840984; 969567536; 182631178; 467038417; 108985507; 937118905; 183435061; 787452673; 841806671; 724269555; 394248007; 230340658; 977887229; 409945198; 779066563; 432822034; 868295972; 89138060; 511921599; 492514850; 172889758; 921821902; 26823963; 518063982; 232495332; 828332859; 178541766; 526881733; 443108221; 919787739; 368591651; 629963599; 402840924; 654824028; 417143012; 840945393; 210839170; 898558644; 464791988; 251782310; 387118577; 920758542; 982102788; 19117659; 238826587; 863132796; 426186995; 612682265; 144404817; 321584738; 999330341; 407758655; 979929366; 896285487; 869319901; 378606401; 924879332; 800727745; 327657863; 599386465; 425831682; 700711960; 220421211; 383284642; 962509729; 830657592; 631592036; 673209612; 969537456; 503012828; 427985999; 164948855; 303452865; 708736300; 526071395; 775805076; 266019120; 62691412; 290945061; 161110171; 417311644; 15617005; 213511650; 572351759; 926082221; 732154268; 170404272; 457588529; 690357159; 478633706; 191234635; 882832755; 301066014; 311908787; 553333018; 461486349; 18593226; 619019934; 854978075; 901788274; 921899485; 888677851; 487305376; 370117032; 549059307; 666030235; 564161097; 464098805; 495642311; 317168750; 253098316; 859838801; 811264509; 940295372; 11935149; 630942324; 690733011; 925515741; 866395151; 358154369; 883088716; 300152704; 917163569; 597676361; 663319627; 509851366; 337476044; 138615684; 963275237; 719124499; 602885775; 787083754; 244011200; 8346064; 536378196; 34372229; 683790110; 684773889; 510845473; 554795161; 818703539; 787980356; 24306796; 75613369; 295777506; 393744676; 804790371; 191056476; 439181415; 381147608; 472682258; 36866501; 322722003; 20869118; 4733237; 995707166; 229855691; 257991754; 65033116; 749757632; 384933699; 677286974; 412829499; 480086470; 841588925; 254805016; 993304096; 536638092; 877890078; 842962895; 176931657; 293168285; 303477311; 265647976; 534433394; 428552612; 583412532; 352767970; 983978517; 877559396; 913537532; 938291425; 941199418; 474282782; 694102733; 973145064; 350703257; 448205430; 270456296; 488907425; 457455578; 110773828; 72794052; 495599764; 573376730; 957969870; 48607387; 655226555; 542279922; 886648662; 322185426; 68047820; 505004413; 44355355; 949478057; 48539088; 963760873; 429032800; 261897128; 798586665; 597834989; 412661678; 689484562; 518447342; 243897077; 395320213; 518904936; 78086268; 573374308; 596227891; 124010859; 902690731; 126527103; 767024010; 732514428; 458161400; 407460252; 431936219; 347464446; 363206410; 247260413; 50586152; 271818206; 80620392; 983288788; 670925078; 688571202; 34347716; 602809230; 510574303; 47328498; 807331805; 896142309; 90026289; 885857631; 437805246; 135624048; 393235940; 129105246; 234045461; 552735165; 650891692; 452718138; 403245822; 91789303; 248760709; 840098427; 855049386; 55776250; 59884914; 197160026; 476266883; 979364871; 785656796; 578475982; 981108149; 483444623; 756783621; 860038275; 397492261; 393058194; 853492828; 137242813; 699069170; 131079204; 157852400; 519742765; 710987965; 565123589; 400810762; 247659328; 677101474; 736990099; 985943349; 53978756; 930319263; 745645873; 236842530; 359707571; 44124509; 835029568; 885647780; 823656125; 731298228; 749196032; 152375439; 10454032; 218840752; 432954714; 748984183; 897797834; 760555189; 775396842; 220460455; 410014758; 650670446; 744480256; 32121302; 402105739; 114878437; 129228983; 352004466; 898088712; 119481437; 977214918; 595703163; 938451563; 473946037; 244545000; 445259368; 651899221; 654782181; 965254048; 138578631; 351340798; 986442456; 158602984; 816802003; 7294724; 515617218; 931754163; 479684569; 435021178; 228714722; 689009583; 737862088; 785551300; 567144320; 101558298; 888704147; 44341289; 998253591; 831282523; 900209420; 935552888; 309479991; 325971990; 527821795; 397048536; 970183398; 296078137; 350128421; 956801273; 776085640; 368871679; 126894280; 529010179; 222603980; 736268607; 547015872; 114458833; 516215930; 32650509; 881900861; 497415685; 209105937; 723903782; 954458233; 877308028; 146389221; 983036758; 375100179; 389674489; 179981441; 168257250; 204408717; 360065024; 299252040; 958297033; 16722411; 502474013; 354666303; 853297693; 861916507; 810906772; 231815323; 102264424; 450971322; 91397136; 486738013; 46378192; 599451771; 112003509; 629058098; 623384006; 218349410; 782372451; 14291340; 842014403; 262859525; 569839518; 671169516; 424379906; 485741481; 677851419; 798780652; 30312391; 158624981; 734207018; 615301627; 10198877; 702208680; 530619436; 784192471; 415372942; 225874772; 531013966; 76998111; 204689428; 200495034; 661011208; 773773371; 870677104; 377751729; 116581460; 313510881; 945140707; 105746217; 73776454; 317987742; 270520852; 641698702; 937378330; 583743919; 528191133; 642573076; 176315202; 142718138; 642885770; 338962955; 45388442; 390857725; 85811109; 994179064; 557548882; 990808217; 469193071; 746232590; 334281860; 541353559; 352323111; 205527279; 597573005; 345082684; 912686233; 496987861; 497079999; 77290775; 745034340; 835069871; 108143503; 723654347; 15926011; 154063119; 435737441; 978733732; 581571364; 626830162; 780676765; 207669753; 776744027; 255172533; 657914569; 96337063; 366382830; 553063223; 228665156; 588726874; 58355939; 347453866; 771020426; 147411326; 121493913; 931548368; 247551183; 102758739; 248478496; 752867242; 317201395; 701576377; 594933976; 991133888; 391604928; 859258446; 537759368; 313918218; 248232165; 592668162; 159435171; 580077927; 520091696; 957243550; 868665699; 66492802; 966665680; 455482831; 214179937; 877686259; 382476059; 518859322; 652852374; 799707820; 825991198; 121232594; 739699517; 652829646; 414973699])
27
+
28
+
29
+ (* Grouping test cases *)
30
+ let suite = "Test Suite for incremovableSubarrayCount" >::: [
31
+
32
+ "test1" >:: test1;
33
+ "test2" >:: test2;
34
+ "test3" >:: test3;
35
+ "test4" >:: test4;
36
+ "test5" >:: test5;
37
+ "test6" >:: test6;
38
+ "test7" >:: test7;
39
+ "test8" >:: test8;
40
+ ]
41
+
42
+
43
+ (* Running the tests *)
44
+ let () = run_test_tt_main suite
45
+ end
count_the_number_of_incremovable_subarrays_ii/scala_tests/MySuite.scala ADDED
@@ -0,0 +1,36 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ class MySuite extends munit.FunSuite {
3
+
4
+ test("test1") {
5
+ assertEquals(Main.incremovableSubarrayCount(List(1,2,3,4)), 10)
6
+ }
7
+
8
+ test("test2") {
9
+ assertEquals(Main.incremovableSubarrayCount(List(6,5,7,8)), 7)
10
+ }
11
+
12
+ test("test3") {
13
+ assertEquals(Main.incremovableSubarrayCount(List(8,7,6,6)), 3)
14
+ }
15
+
16
+ test("test4") {
17
+ assertEquals(Main.incremovableSubarrayCount(8), 1)
18
+ }
19
+
20
+ test("test5") {
21
+ assertEquals(Main.incremovableSubarrayCount(7,26,25,18,35), 8)
22
+ }
23
+
24
+ test("test6") {
25
+ assertEquals(Main.incremovableSubarrayCount(43,16,35,36,4), 3)
26
+ }
27
+
28
+ test("test7") {
29
+ assertEquals(Main.incremovableSubarrayCount(42), 1)
30
+ }
31
+
32
+ test("test8") {
33
+ assertEquals(Main.incremovableSubarrayCount(429361165,633072753,254547305,642324182,537235401,50185202,156234206,785286014,518591955,632905691,660493099,178414880,596619102,311233782,260317395,250858523,223961455,605986151,211222915,221137408,276817256,647740310,949238034,153840984,969567536,182631178,467038417,108985507,937118905,183435061,787452673,841806671,724269555,394248007,230340658,977887229,409945198,779066563,432822034,868295972,89138060,511921599,492514850,172889758,921821902,26823963,518063982,232495332,828332859,178541766,526881733,443108221,919787739,368591651,629963599,402840924,654824028,417143012,840945393,210839170,898558644,464791988,251782310,387118577,920758542,982102788,19117659,238826587,863132796,426186995,612682265,144404817,321584738,999330341,407758655,979929366,896285487,869319901,378606401,924879332,800727745,327657863,599386465,425831682,700711960,220421211,383284642,962509729,830657592,631592036,673209612,969537456,503012828,427985999,164948855,303452865,708736300,526071395,775805076,266019120,62691412,290945061,161110171,417311644,15617005,213511650,572351759,926082221,732154268,170404272,457588529,690357159,478633706,191234635,882832755,301066014,311908787,553333018,461486349,18593226,619019934,854978075,901788274,921899485,888677851,487305376,370117032,549059307,666030235,564161097,464098805,495642311,317168750,253098316,859838801,811264509,940295372,11935149,630942324,690733011,925515741,866395151,358154369,883088716,300152704,917163569,597676361,663319627,509851366,337476044,138615684,963275237,719124499,602885775,787083754,244011200,8346064,536378196,34372229,683790110,684773889,510845473,554795161,818703539,787980356,24306796,75613369,295777506,393744676,804790371,191056476,439181415,381147608,472682258,36866501,322722003,20869118,4733237,995707166,229855691,257991754,65033116,749757632,384933699,677286974,412829499,480086470,841588925,254805016,993304096,536638092,877890078,842962895,176931657,293168285,303477311,265647976,534433394,428552612,583412532,352767970,983978517,877559396,913537532,938291425,941199418,474282782,694102733,973145064,350703257,448205430,270456296,488907425,457455578,110773828,72794052,495599764,573376730,957969870,48607387,655226555,542279922,886648662,322185426,68047820,505004413,44355355,949478057,48539088,963760873,429032800,261897128,798586665,597834989,412661678,689484562,518447342,243897077,395320213,518904936,78086268,573374308,596227891,124010859,902690731,126527103,767024010,732514428,458161400,407460252,431936219,347464446,363206410,247260413,50586152,271818206,80620392,983288788,670925078,688571202,34347716,602809230,510574303,47328498,807331805,896142309,90026289,885857631,437805246,135624048,393235940,129105246,234045461,552735165,650891692,452718138,403245822,91789303,248760709,840098427,855049386,55776250,59884914,197160026,476266883,979364871,785656796,578475982,981108149,483444623,756783621,860038275,397492261,393058194,853492828,137242813,699069170,131079204,157852400,519742765,710987965,565123589,400810762,247659328,677101474,736990099,985943349,53978756,930319263,745645873,236842530,359707571,44124509,835029568,885647780,823656125,731298228,749196032,152375439,10454032,218840752,432954714,748984183,897797834,760555189,775396842,220460455,410014758,650670446,744480256,32121302,402105739,114878437,129228983,352004466,898088712,119481437,977214918,595703163,938451563,473946037,244545000,445259368,651899221,654782181,965254048,138578631,351340798,986442456,158602984,816802003,7294724,515617218,931754163,479684569,435021178,228714722,689009583,737862088,785551300,567144320,101558298,888704147,44341289,998253591,831282523,900209420,935552888,309479991,325971990,527821795,397048536,970183398,296078137,350128421,956801273,776085640,368871679,126894280,529010179,222603980,736268607,547015872,114458833,516215930,32650509,881900861,497415685,209105937,723903782,954458233,877308028,146389221,983036758,375100179,389674489,179981441,168257250,204408717,360065024,299252040,958297033,16722411,502474013,354666303,853297693,861916507,810906772,231815323,102264424,450971322,91397136,486738013,46378192,599451771,112003509,629058098,623384006,218349410,782372451,14291340,842014403,262859525,569839518,671169516,424379906,485741481,677851419,798780652,30312391,158624981,734207018,615301627,10198877,702208680,530619436,784192471,415372942,225874772,531013966,76998111,204689428,200495034,661011208,773773371,870677104,377751729,116581460,313510881,945140707,105746217,73776454,317987742,270520852,641698702,937378330,583743919,528191133,642573076,176315202,142718138,642885770,338962955,45388442,390857725,85811109,994179064,557548882,990808217,469193071,746232590,334281860,541353559,352323111,205527279,597573005,345082684,912686233,496987861,497079999,77290775,745034340,835069871,108143503,723654347,15926011,154063119,435737441,978733732,581571364,626830162,780676765,207669753,776744027,255172533,657914569,96337063,366382830,553063223,228665156,588726874,58355939,347453866,771020426,147411326,121493913,931548368,247551183,102758739,248478496,752867242,317201395,701576377,594933976,991133888,391604928,859258446,537759368,313918218,248232165,592668162,159435171,580077927,520091696,957243550,868665699,66492802,966665680,455482831,214179937,877686259,382476059,518859322,652852374,799707820,825991198,121232594,739699517,652829646,414973699), 4)
34
+ }
35
+
36
+ }
count_the_number_of_infection_sequences/haskell_tests/Main.hs ADDED
The diff for this file is too large to render. See raw diff
 
count_the_number_of_infection_sequences/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, numberOfSequence(5, new ArrayList<>(Arrays.asList(0,4))));
15
+ }
16
+ @Test
17
+ public void test2() {
18
+ assertEquals(3, numberOfSequence(4, new ArrayList<>(Arrays.asList(1))));
19
+ }
20
+
21
+ }
count_the_number_of_infection_sequences/meta.json ADDED
The diff for this file is too large to render. See raw diff
 
count_the_number_of_infection_sequences/ocaml_tests/main.ml ADDED
The diff for this file is too large to render. See raw diff
 
count_the_number_of_infection_sequences/scala_tests/MySuite.scala ADDED
The diff for this file is too large to render. See raw diff
 
count_the_number_of_inversions/haskell_tests/Main.hs ADDED
@@ -0,0 +1,45 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ module Main where
3
+ import Test.HUnit
4
+
5
+ --Program start
6
+
7
+ --Program end
8
+
9
+ -- Test cases
10
+
11
+ test1 :: Test
12
+ test1 = TestCase (assertEqual "for (numberOfPermutations 3 [[2,2],[0,0]])," 2 (numberOfPermutations 3 [[2,2],[0,0]]))
13
+
14
+ test2 :: Test
15
+ test2 = TestCase (assertEqual "for (numberOfPermutations 3 [[2,2],[1,1],[0,0]])," 1 (numberOfPermutations 3 [[2,2],[1,1],[0,0]]))
16
+
17
+ test3 :: Test
18
+ test3 = TestCase (assertEqual "for (numberOfPermutations 2 [[0,0],[1,0]])," 1 (numberOfPermutations 2 [[0,0],[1,0]]))
19
+
20
+ test4 :: Test
21
+ test4 = TestCase (assertEqual "for (numberOfPermutations 133 [[130, 392], [85, 131], [8, 39], [19, 356], [66, 41], [131, 219], [47, 253], [21, 372], [101, 301], [35, 319], [20, 239], [122, 366], [13, 145], [82, 200], [26, 13], [56, 71], [124, 381], [125, 81], [58, 27], [87, 129], [83, 171], [48, 179], [111, 164], [37, 367], [110, 348], [55, 180], [89, 107], [59, 343], [60, 96], [34, 256], [39, 129], [11, 181], [90, 101], [105, 177], [132, 217], [117, 344], [73, 12], [99, 49], [69, 359], [61, 277], [0, 97], [68, 177], [128, 375], [94, 281], [76, 311], [41, 11], [25, 1], [119, 52], [15, 8], [120, 37], [95, 42], [71, 379], [33, 298], [30, 290], [77, 257], [6, 87], [70, 297], [78, 327], [62, 249], [45, 250], [52, 285], [81, 246], [64, 67], [106, 178], [103, 336], [16, 205], [32, 72], [36, 288], [91, 74], [114, 226], [12, 27], [112, 54], [123, 183], [97, 292], [115, 294], [49, 203], [29, 340], [40, 333], [86, 217], [102, 258], [38, 284], [42, 377], [74, 195], [53, 343], [108, 72], [96, 50], [3, 220], [27, 40], [1, 158], [92, 221], [17, 173], [2, 62], [113, 206], [129, 364], [7, 398], [22, 203], [23, 266], [100, 396], [104, 213], [98, 387], [57, 7], [88, 218], [10, 170], [67, 49], [93, 317], [44, 361], [28, 13], [54, 262], [65, 72], [84, 348], [9, 150], [43, 118], [80, 363], [79, 364], [24, 229], [121, 245], [31, 150], [18, 54], [5, 350], [46, 70]])," 0 (numberOfPermutations 133 [[130, 392], [85, 131], [8, 39], [19, 356], [66, 41], [131, 219], [47, 253], [21, 372], [101, 301], [35, 319], [20, 239], [122, 366], [13, 145], [82, 200], [26, 13], [56, 71], [124, 381], [125, 81], [58, 27], [87, 129], [83, 171], [48, 179], [111, 164], [37, 367], [110, 348], [55, 180], [89, 107], [59, 343], [60, 96], [34, 256], [39, 129], [11, 181], [90, 101], [105, 177], [132, 217], [117, 344], [73, 12], [99, 49], [69, 359], [61, 277], [0, 97], [68, 177], [128, 375], [94, 281], [76, 311], [41, 11], [25, 1], [119, 52], [15, 8], [120, 37], [95, 42], [71, 379], [33, 298], [30, 290], [77, 257], [6, 87], [70, 297], [78, 327], [62, 249], [45, 250], [52, 285], [81, 246], [64, 67], [106, 178], [103, 336], [16, 205], [32, 72], [36, 288], [91, 74], [114, 226], [12, 27], [112, 54], [123, 183], [97, 292], [115, 294], [49, 203], [29, 340], [40, 333], [86, 217], [102, 258], [38, 284], [42, 377], [74, 195], [53, 343], [108, 72], [96, 50], [3, 220], [27, 40], [1, 158], [92, 221], [17, 173], [2, 62], [113, 206], [129, 364], [7, 398], [22, 203], [23, 266], [100, 396], [104, 213], [98, 387], [57, 7], [88, 218], [10, 170], [67, 49], [93, 317], [44, 361], [28, 13], [54, 262], [65, 72], [84, 348], [9, 150], [43, 118], [80, 363], [79, 364], [24, 229], [121, 245], [31, 150], [18, 54], [5, 350], [46, 70]]))
22
+
23
+ test5 :: Test
24
+ test5 = TestCase (assertEqual "for (numberOfPermutations 9 [[5, 122], [4, 4], [0, 121], [6, 398], [3, 150], [8, 378], [7, 66]])," 0 (numberOfPermutations 9 [[5, 122], [4, 4], [0, 121], [6, 398], [3, 150], [8, 378], [7, 66]]))
25
+
26
+ test6 :: Test
27
+ test6 = TestCase (assertEqual "for (numberOfPermutations 276 [[28, 361], [227, 317], [161, 306], [268, 356], [219, 168], [11, 40], [52, 175], [17, 237], [251, 173], [82, 319], [264, 306], [155, 59], [194, 135], [76, 126], [173, 199], [213, 131], [121, 249], [252, 176], [165, 199], [142, 275], [273, 109], [129, 223], [2, 168], [171, 58], [275, 281], [143, 84], [190, 150], [206, 355], [93, 297], [42, 320], [44, 361], [253, 99], [133, 218], [13, 38], [85, 259], [248, 243], [230, 307], [62, 126], [77, 388], [4, 363], [181, 58], [81, 317], [156, 118], [176, 150], [207, 157], [92, 144], [127, 110], [228, 160], [120, 22], [247, 216], [101, 285], [49, 70], [69, 84], [22, 88], [103, 207], [80, 385], [164, 279], [180, 52], [67, 7], [255, 214], [58, 100], [26, 387], [272, 339], [74, 359], [100, 389], [226, 324], [150, 166], [163, 151], [109, 353], [21, 310], [20, 162], [118, 31], [162, 204], [35, 73], [154, 83], [54, 294], [196, 8], [234, 20], [88, 181], [215, 264], [148, 265], [257, 270], [87, 72], [157, 317], [237, 18], [72, 149], [263, 277], [202, 42], [99, 206], [15, 287], [185, 58], [43, 229], [116, 155], [122, 263], [137, 326], [145, 189], [131, 259], [106, 127], [9, 114], [231, 32], [3, 223], [198, 181], [10, 79], [1, 231], [33, 133], [41, 312], [182, 162], [259, 265], [91, 261], [108, 59], [65, 386], [64, 191], [89, 118], [130, 293], [32, 299], [152, 367], [168, 122], [83, 129], [149, 197], [225, 246], [29, 152], [14, 275], [31, 339], [244, 155], [73, 357], [84, 290], [260, 165], [212, 372], [241, 275], [70, 170], [153, 244], [140, 158], [53, 349], [266, 225], [7, 309], [56, 294], [102, 321], [34, 67], [271, 214], [0, 365], [200, 133], [183, 203], [216, 135], [128, 317], [192, 231], [97, 380], [8, 48], [186, 81], [40, 34], [119, 373], [68, 320], [245, 386], [18, 147], [238, 3], [132, 174], [78, 295], [210, 277], [55, 47], [46, 175], [38, 1], [59, 277], [197, 369], [71, 119], [175, 263], [146, 279], [94, 94], [159, 310], [235, 260], [201, 258], [184, 101], [47, 232], [96, 240], [147, 133], [203, 400], [112, 168], [179, 257], [126, 180], [239, 11], [256, 92], [189, 1], [224, 82], [222, 149], [90, 365], [136, 84], [265, 281], [135, 14], [37, 192], [169, 140], [24, 265], [233, 123], [218, 111], [160, 237], [261, 126], [5, 119], [270, 211], [204, 10], [51, 158], [240, 382], [274, 204], [19, 186], [174, 145], [138, 285], [243, 160], [110, 119], [250, 274], [30, 375], [191, 157], [61, 53], [221, 126], [158, 273], [208, 19], [166, 163], [79, 119], [220, 316], [124, 400], [232, 337], [107, 118], [151, 246], [187, 136], [211, 225], [269, 298], [98, 138], [36, 314], [115, 138], [177, 107], [217, 26], [6, 161], [39, 8], [144, 334], [63, 393], [254, 61], [117, 367], [50, 35], [105, 89], [125, 383], [188, 92], [141, 14], [229, 263], [195, 327], [167, 228], [267, 167], [95, 20], [66, 101], [27, 369], [199, 377], [23, 354], [12, 34], [170, 192], [236, 393], [25, 283], [60, 215], [139, 30], [113, 110], [205, 158], [178, 118], [242, 379], [123, 41], [172, 356], [249, 146], [262, 144], [223, 272], [104, 14], [48, 82], [214, 355], [57, 83], [45, 213], [86, 72]])," 0 (numberOfPermutations 276 [[28, 361], [227, 317], [161, 306], [268, 356], [219, 168], [11, 40], [52, 175], [17, 237], [251, 173], [82, 319], [264, 306], [155, 59], [194, 135], [76, 126], [173, 199], [213, 131], [121, 249], [252, 176], [165, 199], [142, 275], [273, 109], [129, 223], [2, 168], [171, 58], [275, 281], [143, 84], [190, 150], [206, 355], [93, 297], [42, 320], [44, 361], [253, 99], [133, 218], [13, 38], [85, 259], [248, 243], [230, 307], [62, 126], [77, 388], [4, 363], [181, 58], [81, 317], [156, 118], [176, 150], [207, 157], [92, 144], [127, 110], [228, 160], [120, 22], [247, 216], [101, 285], [49, 70], [69, 84], [22, 88], [103, 207], [80, 385], [164, 279], [180, 52], [67, 7], [255, 214], [58, 100], [26, 387], [272, 339], [74, 359], [100, 389], [226, 324], [150, 166], [163, 151], [109, 353], [21, 310], [20, 162], [118, 31], [162, 204], [35, 73], [154, 83], [54, 294], [196, 8], [234, 20], [88, 181], [215, 264], [148, 265], [257, 270], [87, 72], [157, 317], [237, 18], [72, 149], [263, 277], [202, 42], [99, 206], [15, 287], [185, 58], [43, 229], [116, 155], [122, 263], [137, 326], [145, 189], [131, 259], [106, 127], [9, 114], [231, 32], [3, 223], [198, 181], [10, 79], [1, 231], [33, 133], [41, 312], [182, 162], [259, 265], [91, 261], [108, 59], [65, 386], [64, 191], [89, 118], [130, 293], [32, 299], [152, 367], [168, 122], [83, 129], [149, 197], [225, 246], [29, 152], [14, 275], [31, 339], [244, 155], [73, 357], [84, 290], [260, 165], [212, 372], [241, 275], [70, 170], [153, 244], [140, 158], [53, 349], [266, 225], [7, 309], [56, 294], [102, 321], [34, 67], [271, 214], [0, 365], [200, 133], [183, 203], [216, 135], [128, 317], [192, 231], [97, 380], [8, 48], [186, 81], [40, 34], [119, 373], [68, 320], [245, 386], [18, 147], [238, 3], [132, 174], [78, 295], [210, 277], [55, 47], [46, 175], [38, 1], [59, 277], [197, 369], [71, 119], [175, 263], [146, 279], [94, 94], [159, 310], [235, 260], [201, 258], [184, 101], [47, 232], [96, 240], [147, 133], [203, 400], [112, 168], [179, 257], [126, 180], [239, 11], [256, 92], [189, 1], [224, 82], [222, 149], [90, 365], [136, 84], [265, 281], [135, 14], [37, 192], [169, 140], [24, 265], [233, 123], [218, 111], [160, 237], [261, 126], [5, 119], [270, 211], [204, 10], [51, 158], [240, 382], [274, 204], [19, 186], [174, 145], [138, 285], [243, 160], [110, 119], [250, 274], [30, 375], [191, 157], [61, 53], [221, 126], [158, 273], [208, 19], [166, 163], [79, 119], [220, 316], [124, 400], [232, 337], [107, 118], [151, 246], [187, 136], [211, 225], [269, 298], [98, 138], [36, 314], [115, 138], [177, 107], [217, 26], [6, 161], [39, 8], [144, 334], [63, 393], [254, 61], [117, 367], [50, 35], [105, 89], [125, 383], [188, 92], [141, 14], [229, 263], [195, 327], [167, 228], [267, 167], [95, 20], [66, 101], [27, 369], [199, 377], [23, 354], [12, 34], [170, 192], [236, 393], [25, 283], [60, 215], [139, 30], [113, 110], [205, 158], [178, 118], [242, 379], [123, 41], [172, 356], [249, 146], [262, 144], [223, 272], [104, 14], [48, 82], [214, 355], [57, 83], [45, 213], [86, 72]]))
28
+
29
+ test7 :: Test
30
+ test7 = TestCase (assertEqual "for (numberOfPermutations 161 [[148, 313], [84, 333], [53, 133], [66, 24], [149, 66], [142, 63], [119, 378], [37, 30], [144, 82], [139, 190], [21, 232], [52, 259], [76, 290], [92, 131], [72, 329], [31, 196], [46, 262], [28, 211], [101, 64], [158, 89], [70, 292], [6, 131], [8, 245], [122, 26], [36, 324], [159, 366], [99, 234], [83, 95], [95, 213], [77, 384], [2, 326], [74, 54], [135, 345], [82, 249], [62, 374], [152, 24], [117, 198], [121, 398], [49, 356], [93, 108], [125, 5], [118, 379], [75, 77], [160, 275], [47, 164], [1, 335], [133, 359], [32, 78], [63, 234], [19, 390], [90, 133], [67, 353], [141, 393], [113, 39], [20, 6], [11, 153], [81, 395], [38, 173], [54, 268], [43, 283]])," 0 (numberOfPermutations 161 [[148, 313], [84, 333], [53, 133], [66, 24], [149, 66], [142, 63], [119, 378], [37, 30], [144, 82], [139, 190], [21, 232], [52, 259], [76, 290], [92, 131], [72, 329], [31, 196], [46, 262], [28, 211], [101, 64], [158, 89], [70, 292], [6, 131], [8, 245], [122, 26], [36, 324], [159, 366], [99, 234], [83, 95], [95, 213], [77, 384], [2, 326], [74, 54], [135, 345], [82, 249], [62, 374], [152, 24], [117, 198], [121, 398], [49, 356], [93, 108], [125, 5], [118, 379], [75, 77], [160, 275], [47, 164], [1, 335], [133, 359], [32, 78], [63, 234], [19, 390], [90, 133], [67, 353], [141, 393], [113, 39], [20, 6], [11, 153], [81, 395], [38, 173], [54, 268], [43, 283]]))
31
+
32
+ test8 :: Test
33
+ test8 = TestCase (assertEqual "for (numberOfPermutations 235 [[104, 34], [79, 370], [114, 358], [149, 199], [164, 175], [59, 308], [35, 138], [172, 129], [103, 88], [122, 379], [182, 141], [158, 356], [112, 22], [72, 357], [166, 298], [57, 59], [96, 195], [190, 208], [102, 173], [1, 94], [186, 227], [210, 295], [209, 340], [33, 124], [14, 150], [21, 134], [19, 302], [53, 109], [234, 0], [66, 243], [127, 224], [47, 146], [155, 383], [232, 146], [13, 341], [71, 262], [175, 384], [159, 282], [138, 375], [80, 83], [26, 191], [11, 58], [73, 348], [224, 3], [163, 102], [111, 245], [17, 48], [81, 209], [185, 208], [77, 22], [58, 270], [152, 51], [153, 103], [162, 334], [150, 361], [78, 244], [99, 21], [120, 2], [215, 334], [157, 53], [117, 17], [7, 324], [51, 104], [46, 354], [115, 160], [226, 151], [88, 261], [191, 272], [65, 178], [178, 315], [223, 86], [131, 192], [143, 59], [197, 195], [8, 159], [40, 245], [23, 254], [123, 185], [195, 190], [212, 290], [180, 283], [202, 277], [140, 49], [29, 68], [167, 163], [30, 95], [207, 376], [208, 291], [135, 182], [151, 225], [62, 35], [74, 205], [12, 78], [220, 392], [107, 232], [203, 234], [34, 210], [9, 142], [221, 294], [86, 89], [70, 15], [198, 29], [199, 266], [189, 134], [206, 229], [67, 35], [200, 286], [204, 302], [141, 236], [44, 215], [68, 182], [125, 43], [222, 375], [108, 85], [22, 333], [106, 228], [169, 357], [89, 77]])," 0 (numberOfPermutations 235 [[104, 34], [79, 370], [114, 358], [149, 199], [164, 175], [59, 308], [35, 138], [172, 129], [103, 88], [122, 379], [182, 141], [158, 356], [112, 22], [72, 357], [166, 298], [57, 59], [96, 195], [190, 208], [102, 173], [1, 94], [186, 227], [210, 295], [209, 340], [33, 124], [14, 150], [21, 134], [19, 302], [53, 109], [234, 0], [66, 243], [127, 224], [47, 146], [155, 383], [232, 146], [13, 341], [71, 262], [175, 384], [159, 282], [138, 375], [80, 83], [26, 191], [11, 58], [73, 348], [224, 3], [163, 102], [111, 245], [17, 48], [81, 209], [185, 208], [77, 22], [58, 270], [152, 51], [153, 103], [162, 334], [150, 361], [78, 244], [99, 21], [120, 2], [215, 334], [157, 53], [117, 17], [7, 324], [51, 104], [46, 354], [115, 160], [226, 151], [88, 261], [191, 272], [65, 178], [178, 315], [223, 86], [131, 192], [143, 59], [197, 195], [8, 159], [40, 245], [23, 254], [123, 185], [195, 190], [212, 290], [180, 283], [202, 277], [140, 49], [29, 68], [167, 163], [30, 95], [207, 376], [208, 291], [135, 182], [151, 225], [62, 35], [74, 205], [12, 78], [220, 392], [107, 232], [203, 234], [34, 210], [9, 142], [221, 294], [86, 89], [70, 15], [198, 29], [199, 266], [189, 134], [206, 229], [67, 35], [200, 286], [204, 302], [141, 236], [44, 215], [68, 182], [125, 43], [222, 375], [108, 85], [22, 333], [106, 228], [169, 357], [89, 77]]))
34
+
35
+ test9 :: Test
36
+ test9 = TestCase (assertEqual "for (numberOfPermutations 37 [[13, 206], [20, 20], [18, 102], [16, 90], [28, 20], [26, 145], [5, 278], [22, 305], [2, 40], [25, 318], [27, 390], [32, 161], [29, 117], [14, 236], [33, 78], [36, 121]])," 0 (numberOfPermutations 37 [[13, 206], [20, 20], [18, 102], [16, 90], [28, 20], [26, 145], [5, 278], [22, 305], [2, 40], [25, 318], [27, 390], [32, 161], [29, 117], [14, 236], [33, 78], [36, 121]]))
37
+
38
+
39
+ -- Grouping test cases
40
+ tests :: Test
41
+ tests = TestList [TestLabel "Test1" test1, TestLabel "Test2" test2, TestLabel "Test3" test3, TestLabel "Test4" test4, TestLabel "Test5" test5, TestLabel "Test6" test6, TestLabel "Test7" test7, TestLabel "Test8" test8]
42
+
43
+ -- Running the tests
44
+ main :: IO Counts
45
+ main = runTestTT tests
count_the_number_of_inversions/java_tests/Main.java ADDED
@@ -0,0 +1,25 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ import static org.junit.jupiter.api.Assertions.*;
3
+ import org.junit.jupiter.api.Test;
4
+ import java.util.List;
5
+ import java.util.Arrays;
6
+ import java.util.ArrayList;
7
+ public class Main {
8
+ //Program start
9
+
10
+ //Program end
11
+
12
+ @Test
13
+ public void test1() {
14
+ assertEquals(2, numberOfPermutations(3, new ArrayList<>(Arrays.asList(new ArrayList<>(Arrays.asList(2,2)),new ArrayList<>(Arrays.asList(0,0))))));
15
+ }
16
+ @Test
17
+ public void test2() {
18
+ assertEquals(1, numberOfPermutations(3, new ArrayList<>(Arrays.asList(new ArrayList<>(Arrays.asList(2,2)),new ArrayList<>(Arrays.asList(1,1)),new ArrayList<>(Arrays.asList(0,0))))));
19
+ }
20
+ @Test
21
+ public void test3() {
22
+ assertEquals(1, numberOfPermutations(2, new ArrayList<>(Arrays.asList(new ArrayList<>(Arrays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
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "id": 3460,
3
+ "name": "count_the_number_of_inversions",
4
+ "difficulty": "Hard",
5
+ "link": "https://leetcode.com/problems/count-the-number-of-inversions/",
6
+ "date": "2024-06-08 00:00:00",
7
+ "task_description": "You are given an integer `n` and a 2D array `requirements`, where `requirements[i] = [endi, cnti]` represents the end index and the **inversion** count of each requirement. A pair of indices `(i, j)` from an integer array `nums` is called an **inversion** if: `i < j` and `nums[i] > nums[j]` Return the number of permutations `perm` of `[0, 1, 2, ..., n - 1]` such that for **all** `requirements[i]`, `perm[0..endi]` has exactly `cnti` inversions. Since the answer may be very large, return it **modulo** `109 + 7`. **Example 1:** **Input:** n = 3, requirements = [[2,2],[0,0]] **Output:** 2 **Explanation:** The two permutations are: `[2, 0, 1]` Prefix `[2, 0, 1]` has inversions `(0, 1)` and `(0, 2)`. Prefix `[2]` has 0 inversions. `[1, 2, 0]` Prefix `[1, 2, 0]` has inversions `(0, 2)` and `(1, 2)`. Prefix `[1]` has 0 inversions. **Example 2:** **Input:** n = 3, requirements = [[2,2],[1,1],[0,0]] **Output:** 1 **Explanation:** The only satisfying permutation is `[2, 0, 1]`: Prefix `[2, 0, 1]` has inversions `(0, 1)` and `(0, 2)`. Prefix `[2, 0]` has an inversion `(0, 1)`. Prefix `[2]` has 0 inversions. **Example 3:** **Input:** n = 2, requirements = [[0,0],[1,0]] **Output:** 1 **Explanation:** The only satisfying permutation is `[0, 1]`: Prefix `[0]` has 0 inversions. Prefix `[0, 1]` has an inversion `(0, 1)`. **Constraints:** `2 <= n <= 300` `1 <= requirements.length <= n` `requirements[i] = [endi, cnti]` `0 <= endi <= n - 1` `0 <= cnti <= 400` The input is generated such that there is at least one `i` such that `endi == n - 1`. The input is generated such that all `endi` are unique.",
8
+ "public_test_cases": [
9
+ {
10
+ "label": "Example 1",
11
+ "input": "n = 3, requirements = [[2,2],[0,0]]",
12
+ "output": "2 "
13
+ },
14
+ {
15
+ "label": "Example 2",
16
+ "input": "n = 3, requirements = [[2,2],[1,1],[0,0]]",
17
+ "output": "1 "
18
+ },
19
+ {
20
+ "label": "Example 3",
21
+ "input": "n = 2, requirements = [[0,0],[1,0]]",
22
+ "output": "1 "
23
+ }
24
+ ],
25
+ "private_test_cases": [
26
+ {
27
+ "input": [
28
+ 133,
29
+ [
30
+ [
31
+ 130,
32
+ 392
33
+ ],
34
+ [
35
+ 85,
36
+ 131
37
+ ],
38
+ [
39
+ 8,
40
+ 39
41
+ ],
42
+ [
43
+ 19,
44
+ 356
45
+ ],
46
+ [
47
+ 66,
48
+ 41
49
+ ],
50
+ [
51
+ 131,
52
+ 219
53
+ ],
54
+ [
55
+ 47,
56
+ 253
57
+ ],
58
+ [
59
+ 21,
60
+ 372
61
+ ],
62
+ [
63
+ 101,
64
+ 301
65
+ ],
66
+ [
67
+ 35,
68
+ 319
69
+ ],
70
+ [
71
+ 20,
72
+ 239
73
+ ],
74
+ [
75
+ 122,
76
+ 366
77
+ ],
78
+ [
79
+ 13,
80
+ 145
81
+ ],
82
+ [
83
+ 82,
84
+ 200
85
+ ],
86
+ [
87
+ 26,
88
+ 13
89
+ ],
90
+ [
91
+ 56,
92
+ 71
93
+ ],
94
+ [
95
+ 124,
96
+ 381
97
+ ],
98
+ [
99
+ 125,
100
+ 81
101
+ ],
102
+ [
103
+ 58,
104
+ 27
105
+ ],
106
+ [
107
+ 87,
108
+ 129
109
+ ],
110
+ [
111
+ 83,
112
+ 171
113
+ ],
114
+ [
115
+ 48,
116
+ 179
117
+ ],
118
+ [
119
+ 111,
120
+ 164
121
+ ],
122
+ [
123
+ 37,
124
+ 367
125
+ ],
126
+ [
127
+ 110,
128
+ 348
129
+ ],
130
+ [
131
+ 55,
132
+ 180
133
+ ],
134
+ [
135
+ 89,
136
+ 107
137
+ ],
138
+ [
139
+ 59,
140
+ 343
141
+ ],
142
+ [
143
+ 60,
144
+ 96
145
+ ],
146
+ [
147
+ 34,
148
+ 256
149
+ ],
150
+ [
151
+ 39,
152
+ 129
153
+ ],
154
+ [
155
+ 11,
156
+ 181
157
+ ],
158
+ [
159
+ 90,
160
+ 101
161
+ ],
162
+ [
163
+ 105,
164
+ 177
165
+ ],
166
+ [
167
+ 132,
168
+ 217
169
+ ],
170
+ [
171
+ 117,
172
+ 344
173
+ ],
174
+ [
175
+ 73,
176
+ 12
177
+ ],
178
+ [
179
+ 99,
180
+ 49
181
+ ],
182
+ [
183
+ 69,
184
+ 359
185
+ ],
186
+ [
187
+ 61,
188
+ 277
189
+ ],
190
+ [
191
+ 0,
192
+ 97
193
+ ],
194
+ [
195
+ 68,
196
+ 177
197
+ ],
198
+ [
199
+ 128,
200
+ 375
201
+ ],
202
+ [
203
+ 94,
204
+ 281
205
+ ],
206
+ [
207
+ 76,
208
+ 311
209
+ ],
210
+ [
211
+ 41,
212
+ 11
213
+ ],
214
+ [
215
+ 25,
216
+ 1
217
+ ],
218
+ [
219
+ 119,
220
+ 52
221
+ ],
222
+ [
223
+ 15,
224
+ 8
225
+ ],
226
+ [
227
+ 120,
228
+ 37
229
+ ],
230
+ [
231
+ 95,
232
+ 42
233
+ ],
234
+ [
235
+ 71,
236
+ 379
237
+ ],
238
+ [
239
+ 33,
240
+ 298
241
+ ],
242
+ [
243
+ 30,
244
+ 290
245
+ ],
246
+ [
247
+ 77,
248
+ 257
249
+ ],
250
+ [
251
+ 6,
252
+ 87
253
+ ],
254
+ [
255
+ 70,
256
+ 297
257
+ ],
258
+ [
259
+ 78,
260
+ 327
261
+ ],
262
+ [
263
+ 62,
264
+ 249
265
+ ],
266
+ [
267
+ 45,
268
+ 250
269
+ ],
270
+ [
271
+ 52,
272
+ 285
273
+ ],
274
+ [
275
+ 81,
276
+ 246
277
+ ],
278
+ [
279
+ 64,
280
+ 67
281
+ ],
282
+ [
283
+ 106,
284
+ 178
285
+ ],
286
+ [
287
+ 103,
288
+ 336
289
+ ],
290
+ [
291
+ 16,
292
+ 205
293
+ ],
294
+ [
295
+ 32,
296
+ 72
297
+ ],
298
+ [
299
+ 36,
300
+ 288
301
+ ],
302
+ [
303
+ 91,
304
+ 74
305
+ ],
306
+ [
307
+ 114,
308
+ 226
309
+ ],
310
+ [
311
+ 12,
312
+ 27
313
+ ],
314
+ [
315
+ 112,
316
+ 54
317
+ ],
318
+ [
319
+ 123,
320
+ 183
321
+ ],
322
+ [
323
+ 97,
324
+ 292
325
+ ],
326
+ [
327
+ 115,
328
+ 294
329
+ ],
330
+ [
331
+ 49,
332
+ 203
333
+ ],
334
+ [
335
+ 29,
336
+ 340
337
+ ],
338
+ [
339
+ 40,
340
+ 333
341
+ ],
342
+ [
343
+ 86,
344
+ 217
345
+ ],
346
+ [
347
+ 102,
348
+ 258
349
+ ],
350
+ [
351
+ 38,
352
+ 284
353
+ ],
354
+ [
355
+ 42,
356
+ 377
357
+ ],
358
+ [
359
+ 74,
360
+ 195
361
+ ],
362
+ [
363
+ 53,
364
+ 343
365
+ ],
366
+ [
367
+ 108,
368
+ 72
369
+ ],
370
+ [
371
+ 96,
372
+ 50
373
+ ],
374
+ [
375
+ 3,
376
+ 220
377
+ ],
378
+ [
379
+ 27,
380
+ 40
381
+ ],
382
+ [
383
+ 1,
384
+ 158
385
+ ],
386
+ [
387
+ 92,
388
+ 221
389
+ ],
390
+ [
391
+ 17,
392
+ 173
393
+ ],
394
+ [
395
+ 2,
396
+ 62
397
+ ],
398
+ [
399
+ 113,
400
+ 206
401
+ ],
402
+ [
403
+ 129,
404
+ 364
405
+ ],
406
+ [
407
+ 7,
408
+ 398
409
+ ],
410
+ [
411
+ 22,
412
+ 203
413
+ ],
414
+ [
415
+ 23,
416
+ 266
417
+ ],
418
+ [
419
+ 100,
420
+ 396
421
+ ],
422
+ [
423
+ 104,
424
+ 213
425
+ ],
426
+ [
427
+ 98,
428
+ 387
429
+ ],
430
+ [
431
+ 57,
432
+ 7
433
+ ],
434
+ [
435
+ 88,
436
+ 218
437
+ ],
438
+ [
439
+ 10,
440
+ 170
441
+ ],
442
+ [
443
+ 67,
444
+ 49
445
+ ],
446
+ [
447
+ 93,
448
+ 317
449
+ ],
450
+ [
451
+ 44,
452
+ 361
453
+ ],
454
+ [
455
+ 28,
456
+ 13
457
+ ],
458
+ [
459
+ 54,
460
+ 262
461
+ ],
462
+ [
463
+ 65,
464
+ 72
465
+ ],
466
+ [
467
+ 84,
468
+ 348
469
+ ],
470
+ [
471
+ 9,
472
+ 150
473
+ ],
474
+ [
475
+ 43,
476
+ 118
477
+ ],
478
+ [
479
+ 80,
480
+ 363
481
+ ],
482
+ [
483
+ 79,
484
+ 364
485
+ ],
486
+ [
487
+ 24,
488
+ 229
489
+ ],
490
+ [
491
+ 121,
492
+ 245
493
+ ],
494
+ [
495
+ 31,
496
+ 150
497
+ ],
498
+ [
499
+ 18,
500
+ 54
501
+ ],
502
+ [
503
+ 5,
504
+ 350
505
+ ],
506
+ [
507
+ 46,
508
+ 70
509
+ ]
510
+ ]
511
+ ],
512
+ "output": 0
513
+ },
514
+ {
515
+ "input": [
516
+ 9,
517
+ [
518
+ [
519
+ 5,
520
+ 122
521
+ ],
522
+ [
523
+ 4,
524
+ 4
525
+ ],
526
+ [
527
+ 0,
528
+ 121
529
+ ],
530
+ [
531
+ 6,
532
+ 398
533
+ ],
534
+ [
535
+ 3,
536
+ 150
537
+ ],
538
+ [
539
+ 8,
540
+ 378
541
+ ],
542
+ [
543
+ 7,
544
+ 66
545
+ ]
546
+ ]
547
+ ],
548
+ "output": 0
549
+ },
550
+ {
551
+ "input": [
552
+ 276,
553
+ [
554
+ [
555
+ 28,
556
+ 361
557
+ ],
558
+ [
559
+ 227,
560
+ 317
561
+ ],
562
+ [
563
+ 161,
564
+ 306
565
+ ],
566
+ [
567
+ 268,
568
+ 356
569
+ ],
570
+ [
571
+ 219,
572
+ 168
573
+ ],
574
+ [
575
+ 11,
576
+ 40
577
+ ],
578
+ [
579
+ 52,
580
+ 175
581
+ ],
582
+ [
583
+ 17,
584
+ 237
585
+ ],
586
+ [
587
+ 251,
588
+ 173
589
+ ],
590
+ [
591
+ 82,
592
+ 319
593
+ ],
594
+ [
595
+ 264,
596
+ 306
597
+ ],
598
+ [
599
+ 155,
600
+ 59
601
+ ],
602
+ [
603
+ 194,
604
+ 135
605
+ ],
606
+ [
607
+ 76,
608
+ 126
609
+ ],
610
+ [
611
+ 173,
612
+ 199
613
+ ],
614
+ [
615
+ 213,
616
+ 131
617
+ ],
618
+ [
619
+ 121,
620
+ 249
621
+ ],
622
+ [
623
+ 252,
624
+ 176
625
+ ],
626
+ [
627
+ 165,
628
+ 199
629
+ ],
630
+ [
631
+ 142,
632
+ 275
633
+ ],
634
+ [
635
+ 273,
636
+ 109
637
+ ],
638
+ [
639
+ 129,
640
+ 223
641
+ ],
642
+ [
643
+ 2,
644
+ 168
645
+ ],
646
+ [
647
+ 171,
648
+ 58
649
+ ],
650
+ [
651
+ 275,
652
+ 281
653
+ ],
654
+ [
655
+ 143,
656
+ 84
657
+ ],
658
+ [
659
+ 190,
660
+ 150
661
+ ],
662
+ [
663
+ 206,
664
+ 355
665
+ ],
666
+ [
667
+ 93,
668
+ 297
669
+ ],
670
+ [
671
+ 42,
672
+ 320
673
+ ],
674
+ [
675
+ 44,
676
+ 361
677
+ ],
678
+ [
679
+ 253,
680
+ 99
681
+ ],
682
+ [
683
+ 133,
684
+ 218
685
+ ],
686
+ [
687
+ 13,
688
+ 38
689
+ ],
690
+ [
691
+ 85,
692
+ 259
693
+ ],
694
+ [
695
+ 248,
696
+ 243
697
+ ],
698
+ [
699
+ 230,
700
+ 307
701
+ ],
702
+ [
703
+ 62,
704
+ 126
705
+ ],
706
+ [
707
+ 77,
708
+ 388
709
+ ],
710
+ [
711
+ 4,
712
+ 363
713
+ ],
714
+ [
715
+ 181,
716
+ 58
717
+ ],
718
+ [
719
+ 81,
720
+ 317
721
+ ],
722
+ [
723
+ 156,
724
+ 118
725
+ ],
726
+ [
727
+ 176,
728
+ 150
729
+ ],
730
+ [
731
+ 207,
732
+ 157
733
+ ],
734
+ [
735
+ 92,
736
+ 144
737
+ ],
738
+ [
739
+ 127,
740
+ 110
741
+ ],
742
+ [
743
+ 228,
744
+ 160
745
+ ],
746
+ [
747
+ 120,
748
+ 22
749
+ ],
750
+ [
751
+ 247,
752
+ 216
753
+ ],
754
+ [
755
+ 101,
756
+ 285
757
+ ],
758
+ [
759
+ 49,
760
+ 70
761
+ ],
762
+ [
763
+ 69,
764
+ 84
765
+ ],
766
+ [
767
+ 22,
768
+ 88
769
+ ],
770
+ [
771
+ 103,
772
+ 207
773
+ ],
774
+ [
775
+ 80,
776
+ 385
777
+ ],
778
+ [
779
+ 164,
780
+ 279
781
+ ],
782
+ [
783
+ 180,
784
+ 52
785
+ ],
786
+ [
787
+ 67,
788
+ 7
789
+ ],
790
+ [
791
+ 255,
792
+ 214
793
+ ],
794
+ [
795
+ 58,
796
+ 100
797
+ ],
798
+ [
799
+ 26,
800
+ 387
801
+ ],
802
+ [
803
+ 272,
804
+ 339
805
+ ],
806
+ [
807
+ 74,
808
+ 359
809
+ ],
810
+ [
811
+ 100,
812
+ 389
813
+ ],
814
+ [
815
+ 226,
816
+ 324
817
+ ],
818
+ [
819
+ 150,
820
+ 166
821
+ ],
822
+ [
823
+ 163,
824
+ 151
825
+ ],
826
+ [
827
+ 109,
828
+ 353
829
+ ],
830
+ [
831
+ 21,
832
+ 310
833
+ ],
834
+ [
835
+ 20,
836
+ 162
837
+ ],
838
+ [
839
+ 118,
840
+ 31
841
+ ],
842
+ [
843
+ 162,
844
+ 204
845
+ ],
846
+ [
847
+ 35,
848
+ 73
849
+ ],
850
+ [
851
+ 154,
852
+ 83
853
+ ],
854
+ [
855
+ 54,
856
+ 294
857
+ ],
858
+ [
859
+ 196,
860
+ 8
861
+ ],
862
+ [
863
+ 234,
864
+ 20
865
+ ],
866
+ [
867
+ 88,
868
+ 181
869
+ ],
870
+ [
871
+ 215,
872
+ 264
873
+ ],
874
+ [
875
+ 148,
876
+ 265
877
+ ],
878
+ [
879
+ 257,
880
+ 270
881
+ ],
882
+ [
883
+ 87,
884
+ 72
885
+ ],
886
+ [
887
+ 157,
888
+ 317
889
+ ],
890
+ [
891
+ 237,
892
+ 18
893
+ ],
894
+ [
895
+ 72,
896
+ 149
897
+ ],
898
+ [
899
+ 263,
900
+ 277
901
+ ],
902
+ [
903
+ 202,
904
+ 42
905
+ ],
906
+ [
907
+ 99,
908
+ 206
909
+ ],
910
+ [
911
+ 15,
912
+ 287
913
+ ],
914
+ [
915
+ 185,
916
+ 58
917
+ ],
918
+ [
919
+ 43,
920
+ 229
921
+ ],
922
+ [
923
+ 116,
924
+ 155
925
+ ],
926
+ [
927
+ 122,
928
+ 263
929
+ ],
930
+ [
931
+ 137,
932
+ 326
933
+ ],
934
+ [
935
+ 145,
936
+ 189
937
+ ],
938
+ [
939
+ 131,
940
+ 259
941
+ ],
942
+ [
943
+ 106,
944
+ 127
945
+ ],
946
+ [
947
+ 9,
948
+ 114
949
+ ],
950
+ [
951
+ 231,
952
+ 32
953
+ ],
954
+ [
955
+ 3,
956
+ 223
957
+ ],
958
+ [
959
+ 198,
960
+ 181
961
+ ],
962
+ [
963
+ 10,
964
+ 79
965
+ ],
966
+ [
967
+ 1,
968
+ 231
969
+ ],
970
+ [
971
+ 33,
972
+ 133
973
+ ],
974
+ [
975
+ 41,
976
+ 312
977
+ ],
978
+ [
979
+ 182,
980
+ 162
981
+ ],
982
+ [
983
+ 259,
984
+ 265
985
+ ],
986
+ [
987
+ 91,
988
+ 261
989
+ ],
990
+ [
991
+ 108,
992
+ 59
993
+ ],
994
+ [
995
+ 65,
996
+ 386
997
+ ],
998
+ [
999
+ 64,
1000
+ 191
1001
+ ],
1002
+ [
1003
+ 89,
1004
+ 118
1005
+ ],
1006
+ [
1007
+ 130,
1008
+ 293
1009
+ ],
1010
+ [
1011
+ 32,
1012
+ 299
1013
+ ],
1014
+ [
1015
+ 152,
1016
+ 367
1017
+ ],
1018
+ [
1019
+ 168,
1020
+ 122
1021
+ ],
1022
+ [
1023
+ 83,
1024
+ 129
1025
+ ],
1026
+ [
1027
+ 149,
1028
+ 197
1029
+ ],
1030
+ [
1031
+ 225,
1032
+ 246
1033
+ ],
1034
+ [
1035
+ 29,
1036
+ 152
1037
+ ],
1038
+ [
1039
+ 14,
1040
+ 275
1041
+ ],
1042
+ [
1043
+ 31,
1044
+ 339
1045
+ ],
1046
+ [
1047
+ 244,
1048
+ 155
1049
+ ],
1050
+ [
1051
+ 73,
1052
+ 357
1053
+ ],
1054
+ [
1055
+ 84,
1056
+ 290
1057
+ ],
1058
+ [
1059
+ 260,
1060
+ 165
1061
+ ],
1062
+ [
1063
+ 212,
1064
+ 372
1065
+ ],
1066
+ [
1067
+ 241,
1068
+ 275
1069
+ ],
1070
+ [
1071
+ 70,
1072
+ 170
1073
+ ],
1074
+ [
1075
+ 153,
1076
+ 244
1077
+ ],
1078
+ [
1079
+ 140,
1080
+ 158
1081
+ ],
1082
+ [
1083
+ 53,
1084
+ 349
1085
+ ],
1086
+ [
1087
+ 266,
1088
+ 225
1089
+ ],
1090
+ [
1091
+ 7,
1092
+ 309
1093
+ ],
1094
+ [
1095
+ 56,
1096
+ 294
1097
+ ],
1098
+ [
1099
+ 102,
1100
+ 321
1101
+ ],
1102
+ [
1103
+ 34,
1104
+ 67
1105
+ ],
1106
+ [
1107
+ 271,
1108
+ 214
1109
+ ],
1110
+ [
1111
+ 0,
1112
+ 365
1113
+ ],
1114
+ [
1115
+ 200,
1116
+ 133
1117
+ ],
1118
+ [
1119
+ 183,
1120
+ 203
1121
+ ],
1122
+ [
1123
+ 216,
1124
+ 135
1125
+ ],
1126
+ [
1127
+ 128,
1128
+ 317
1129
+ ],
1130
+ [
1131
+ 192,
1132
+ 231
1133
+ ],
1134
+ [
1135
+ 97,
1136
+ 380
1137
+ ],
1138
+ [
1139
+ 8,
1140
+ 48
1141
+ ],
1142
+ [
1143
+ 186,
1144
+ 81
1145
+ ],
1146
+ [
1147
+ 40,
1148
+ 34
1149
+ ],
1150
+ [
1151
+ 119,
1152
+ 373
1153
+ ],
1154
+ [
1155
+ 68,
1156
+ 320
1157
+ ],
1158
+ [
1159
+ 245,
1160
+ 386
1161
+ ],
1162
+ [
1163
+ 18,
1164
+ 147
1165
+ ],
1166
+ [
1167
+ 238,
1168
+ 3
1169
+ ],
1170
+ [
1171
+ 132,
1172
+ 174
1173
+ ],
1174
+ [
1175
+ 78,
1176
+ 295
1177
+ ],
1178
+ [
1179
+ 210,
1180
+ 277
1181
+ ],
1182
+ [
1183
+ 55,
1184
+ 47
1185
+ ],
1186
+ [
1187
+ 46,
1188
+ 175
1189
+ ],
1190
+ [
1191
+ 38,
1192
+ 1
1193
+ ],
1194
+ [
1195
+ 59,
1196
+ 277
1197
+ ],
1198
+ [
1199
+ 197,
1200
+ 369
1201
+ ],
1202
+ [
1203
+ 71,
1204
+ 119
1205
+ ],
1206
+ [
1207
+ 175,
1208
+ 263
1209
+ ],
1210
+ [
1211
+ 146,
1212
+ 279
1213
+ ],
1214
+ [
1215
+ 94,
1216
+ 94
1217
+ ],
1218
+ [
1219
+ 159,
1220
+ 310
1221
+ ],
1222
+ [
1223
+ 235,
1224
+ 260
1225
+ ],
1226
+ [
1227
+ 201,
1228
+ 258
1229
+ ],
1230
+ [
1231
+ 184,
1232
+ 101
1233
+ ],
1234
+ [
1235
+ 47,
1236
+ 232
1237
+ ],
1238
+ [
1239
+ 96,
1240
+ 240
1241
+ ],
1242
+ [
1243
+ 147,
1244
+ 133
1245
+ ],
1246
+ [
1247
+ 203,
1248
+ 400
1249
+ ],
1250
+ [
1251
+ 112,
1252
+ 168
1253
+ ],
1254
+ [
1255
+ 179,
1256
+ 257
1257
+ ],
1258
+ [
1259
+ 126,
1260
+ 180
1261
+ ],
1262
+ [
1263
+ 239,
1264
+ 11
1265
+ ],
1266
+ [
1267
+ 256,
1268
+ 92
1269
+ ],
1270
+ [
1271
+ 189,
1272
+ 1
1273
+ ],
1274
+ [
1275
+ 224,
1276
+ 82
1277
+ ],
1278
+ [
1279
+ 222,
1280
+ 149
1281
+ ],
1282
+ [
1283
+ 90,
1284
+ 365
1285
+ ],
1286
+ [
1287
+ 136,
1288
+ 84
1289
+ ],
1290
+ [
1291
+ 265,
1292
+ 281
1293
+ ],
1294
+ [
1295
+ 135,
1296
+ 14
1297
+ ],
1298
+ [
1299
+ 37,
1300
+ 192
1301
+ ],
1302
+ [
1303
+ 169,
1304
+ 140
1305
+ ],
1306
+ [
1307
+ 24,
1308
+ 265
1309
+ ],
1310
+ [
1311
+ 233,
1312
+ 123
1313
+ ],
1314
+ [
1315
+ 218,
1316
+ 111
1317
+ ],
1318
+ [
1319
+ 160,
1320
+ 237
1321
+ ],
1322
+ [
1323
+ 261,
1324
+ 126
1325
+ ],
1326
+ [
1327
+ 5,
1328
+ 119
1329
+ ],
1330
+ [
1331
+ 270,
1332
+ 211
1333
+ ],
1334
+ [
1335
+ 204,
1336
+ 10
1337
+ ],
1338
+ [
1339
+ 51,
1340
+ 158
1341
+ ],
1342
+ [
1343
+ 240,
1344
+ 382
1345
+ ],
1346
+ [
1347
+ 274,
1348
+ 204
1349
+ ],
1350
+ [
1351
+ 19,
1352
+ 186
1353
+ ],
1354
+ [
1355
+ 174,
1356
+ 145
1357
+ ],
1358
+ [
1359
+ 138,
1360
+ 285
1361
+ ],
1362
+ [
1363
+ 243,
1364
+ 160
1365
+ ],
1366
+ [
1367
+ 110,
1368
+ 119
1369
+ ],
1370
+ [
1371
+ 250,
1372
+ 274
1373
+ ],
1374
+ [
1375
+ 30,
1376
+ 375
1377
+ ],
1378
+ [
1379
+ 191,
1380
+ 157
1381
+ ],
1382
+ [
1383
+ 61,
1384
+ 53
1385
+ ],
1386
+ [
1387
+ 221,
1388
+ 126
1389
+ ],
1390
+ [
1391
+ 158,
1392
+ 273
1393
+ ],
1394
+ [
1395
+ 208,
1396
+ 19
1397
+ ],
1398
+ [
1399
+ 166,
1400
+ 163
1401
+ ],
1402
+ [
1403
+ 79,
1404
+ 119
1405
+ ],
1406
+ [
1407
+ 220,
1408
+ 316
1409
+ ],
1410
+ [
1411
+ 124,
1412
+ 400
1413
+ ],
1414
+ [
1415
+ 232,
1416
+ 337
1417
+ ],
1418
+ [
1419
+ 107,
1420
+ 118
1421
+ ],
1422
+ [
1423
+ 151,
1424
+ 246
1425
+ ],
1426
+ [
1427
+ 187,
1428
+ 136
1429
+ ],
1430
+ [
1431
+ 211,
1432
+ 225
1433
+ ],
1434
+ [
1435
+ 269,
1436
+ 298
1437
+ ],
1438
+ [
1439
+ 98,
1440
+ 138
1441
+ ],
1442
+ [
1443
+ 36,
1444
+ 314
1445
+ ],
1446
+ [
1447
+ 115,
1448
+ 138
1449
+ ],
1450
+ [
1451
+ 177,
1452
+ 107
1453
+ ],
1454
+ [
1455
+ 217,
1456
+ 26
1457
+ ],
1458
+ [
1459
+ 6,
1460
+ 161
1461
+ ],
1462
+ [
1463
+ 39,
1464
+ 8
1465
+ ],
1466
+ [
1467
+ 144,
1468
+ 334
1469
+ ],
1470
+ [
1471
+ 63,
1472
+ 393
1473
+ ],
1474
+ [
1475
+ 254,
1476
+ 61
1477
+ ],
1478
+ [
1479
+ 117,
1480
+ 367
1481
+ ],
1482
+ [
1483
+ 50,
1484
+ 35
1485
+ ],
1486
+ [
1487
+ 105,
1488
+ 89
1489
+ ],
1490
+ [
1491
+ 125,
1492
+ 383
1493
+ ],
1494
+ [
1495
+ 188,
1496
+ 92
1497
+ ],
1498
+ [
1499
+ 141,
1500
+ 14
1501
+ ],
1502
+ [
1503
+ 229,
1504
+ 263
1505
+ ],
1506
+ [
1507
+ 195,
1508
+ 327
1509
+ ],
1510
+ [
1511
+ 167,
1512
+ 228
1513
+ ],
1514
+ [
1515
+ 267,
1516
+ 167
1517
+ ],
1518
+ [
1519
+ 95,
1520
+ 20
1521
+ ],
1522
+ [
1523
+ 66,
1524
+ 101
1525
+ ],
1526
+ [
1527
+ 27,
1528
+ 369
1529
+ ],
1530
+ [
1531
+ 199,
1532
+ 377
1533
+ ],
1534
+ [
1535
+ 23,
1536
+ 354
1537
+ ],
1538
+ [
1539
+ 12,
1540
+ 34
1541
+ ],
1542
+ [
1543
+ 170,
1544
+ 192
1545
+ ],
1546
+ [
1547
+ 236,
1548
+ 393
1549
+ ],
1550
+ [
1551
+ 25,
1552
+ 283
1553
+ ],
1554
+ [
1555
+ 60,
1556
+ 215
1557
+ ],
1558
+ [
1559
+ 139,
1560
+ 30
1561
+ ],
1562
+ [
1563
+ 113,
1564
+ 110
1565
+ ],
1566
+ [
1567
+ 205,
1568
+ 158
1569
+ ],
1570
+ [
1571
+ 178,
1572
+ 118
1573
+ ],
1574
+ [
1575
+ 242,
1576
+ 379
1577
+ ],
1578
+ [
1579
+ 123,
1580
+ 41
1581
+ ],
1582
+ [
1583
+ 172,
1584
+ 356
1585
+ ],
1586
+ [
1587
+ 249,
1588
+ 146
1589
+ ],
1590
+ [
1591
+ 262,
1592
+ 144
1593
+ ],
1594
+ [
1595
+ 223,
1596
+ 272
1597
+ ],
1598
+ [
1599
+ 104,
1600
+ 14
1601
+ ],
1602
+ [
1603
+ 48,
1604
+ 82
1605
+ ],
1606
+ [
1607
+ 214,
1608
+ 355
1609
+ ],
1610
+ [
1611
+ 57,
1612
+ 83
1613
+ ],
1614
+ [
1615
+ 45,
1616
+ 213
1617
+ ],
1618
+ [
1619
+ 86,
1620
+ 72
1621
+ ]
1622
+ ]
1623
+ ],
1624
+ "output": 0
1625
+ },
1626
+ {
1627
+ "input": [
1628
+ 161,
1629
+ [
1630
+ [
1631
+ 148,
1632
+ 313
1633
+ ],
1634
+ [
1635
+ 84,
1636
+ 333
1637
+ ],
1638
+ [
1639
+ 53,
1640
+ 133
1641
+ ],
1642
+ [
1643
+ 66,
1644
+ 24
1645
+ ],
1646
+ [
1647
+ 149,
1648
+ 66
1649
+ ],
1650
+ [
1651
+ 142,
1652
+ 63
1653
+ ],
1654
+ [
1655
+ 119,
1656
+ 378
1657
+ ],
1658
+ [
1659
+ 37,
1660
+ 30
1661
+ ],
1662
+ [
1663
+ 144,
1664
+ 82
1665
+ ],
1666
+ [
1667
+ 139,
1668
+ 190
1669
+ ],
1670
+ [
1671
+ 21,
1672
+ 232
1673
+ ],
1674
+ [
1675
+ 52,
1676
+ 259
1677
+ ],
1678
+ [
1679
+ 76,
1680
+ 290
1681
+ ],
1682
+ [
1683
+ 92,
1684
+ 131
1685
+ ],
1686
+ [
1687
+ 72,
1688
+ 329
1689
+ ],
1690
+ [
1691
+ 31,
1692
+ 196
1693
+ ],
1694
+ [
1695
+ 46,
1696
+ 262
1697
+ ],
1698
+ [
1699
+ 28,
1700
+ 211
1701
+ ],
1702
+ [
1703
+ 101,
1704
+ 64
1705
+ ],
1706
+ [
1707
+ 158,
1708
+ 89
1709
+ ],
1710
+ [
1711
+ 70,
1712
+ 292
1713
+ ],
1714
+ [
1715
+ 6,
1716
+ 131
1717
+ ],
1718
+ [
1719
+ 8,
1720
+ 245
1721
+ ],
1722
+ [
1723
+ 122,
1724
+ 26
1725
+ ],
1726
+ [
1727
+ 36,
1728
+ 324
1729
+ ],
1730
+ [
1731
+ 159,
1732
+ 366
1733
+ ],
1734
+ [
1735
+ 99,
1736
+ 234
1737
+ ],
1738
+ [
1739
+ 83,
1740
+ 95
1741
+ ],
1742
+ [
1743
+ 95,
1744
+ 213
1745
+ ],
1746
+ [
1747
+ 77,
1748
+ 384
1749
+ ],
1750
+ [
1751
+ 2,
1752
+ 326
1753
+ ],
1754
+ [
1755
+ 74,
1756
+ 54
1757
+ ],
1758
+ [
1759
+ 135,
1760
+ 345
1761
+ ],
1762
+ [
1763
+ 82,
1764
+ 249
1765
+ ],
1766
+ [
1767
+ 62,
1768
+ 374
1769
+ ],
1770
+ [
1771
+ 152,
1772
+ 24
1773
+ ],
1774
+ [
1775
+ 117,
1776
+ 198
1777
+ ],
1778
+ [
1779
+ 121,
1780
+ 398
1781
+ ],
1782
+ [
1783
+ 49,
1784
+ 356
1785
+ ],
1786
+ [
1787
+ 93,
1788
+ 108
1789
+ ],
1790
+ [
1791
+ 125,
1792
+ 5
1793
+ ],
1794
+ [
1795
+ 118,
1796
+ 379
1797
+ ],
1798
+ [
1799
+ 75,
1800
+ 77
1801
+ ],
1802
+ [
1803
+ 160,
1804
+ 275
1805
+ ],
1806
+ [
1807
+ 47,
1808
+ 164
1809
+ ],
1810
+ [
1811
+ 1,
1812
+ 335
1813
+ ],
1814
+ [
1815
+ 133,
1816
+ 359
1817
+ ],
1818
+ [
1819
+ 32,
1820
+ 78
1821
+ ],
1822
+ [
1823
+ 63,
1824
+ 234
1825
+ ],
1826
+ [
1827
+ 19,
1828
+ 390
1829
+ ],
1830
+ [
1831
+ 90,
1832
+ 133
1833
+ ],
1834
+ [
1835
+ 67,
1836
+ 353
1837
+ ],
1838
+ [
1839
+ 141,
1840
+ 393
1841
+ ],
1842
+ [
1843
+ 113,
1844
+ 39
1845
+ ],
1846
+ [
1847
+ 20,
1848
+ 6
1849
+ ],
1850
+ [
1851
+ 11,
1852
+ 153
1853
+ ],
1854
+ [
1855
+ 81,
1856
+ 395
1857
+ ],
1858
+ [
1859
+ 38,
1860
+ 173
1861
+ ],
1862
+ [
1863
+ 54,
1864
+ 268
1865
+ ],
1866
+ [
1867
+ 43,
1868
+ 283
1869
+ ]
1870
+ ]
1871
+ ],
1872
+ "output": 0
1873
+ },
1874
+ {
1875
+ "input": [
1876
+ 235,
1877
+ [
1878
+ [
1879
+ 104,
1880
+ 34
1881
+ ],
1882
+ [
1883
+ 79,
1884
+ 370
1885
+ ],
1886
+ [
1887
+ 114,
1888
+ 358
1889
+ ],
1890
+ [
1891
+ 149,
1892
+ 199
1893
+ ],
1894
+ [
1895
+ 164,
1896
+ 175
1897
+ ],
1898
+ [
1899
+ 59,
1900
+ 308
1901
+ ],
1902
+ [
1903
+ 35,
1904
+ 138
1905
+ ],
1906
+ [
1907
+ 172,
1908
+ 129
1909
+ ],
1910
+ [
1911
+ 103,
1912
+ 88
1913
+ ],
1914
+ [
1915
+ 122,
1916
+ 379
1917
+ ],
1918
+ [
1919
+ 182,
1920
+ 141
1921
+ ],
1922
+ [
1923
+ 158,
1924
+ 356
1925
+ ],
1926
+ [
1927
+ 112,
1928
+ 22
1929
+ ],
1930
+ [
1931
+ 72,
1932
+ 357
1933
+ ],
1934
+ [
1935
+ 166,
1936
+ 298
1937
+ ],
1938
+ [
1939
+ 57,
1940
+ 59
1941
+ ],
1942
+ [
1943
+ 96,
1944
+ 195
1945
+ ],
1946
+ [
1947
+ 190,
1948
+ 208
1949
+ ],
1950
+ [
1951
+ 102,
1952
+ 173
1953
+ ],
1954
+ [
1955
+ 1,
1956
+ 94
1957
+ ],
1958
+ [
1959
+ 186,
1960
+ 227
1961
+ ],
1962
+ [
1963
+ 210,
1964
+ 295
1965
+ ],
1966
+ [
1967
+ 209,
1968
+ 340
1969
+ ],
1970
+ [
1971
+ 33,
1972
+ 124
1973
+ ],
1974
+ [
1975
+ 14,
1976
+ 150
1977
+ ],
1978
+ [
1979
+ 21,
1980
+ 134
1981
+ ],
1982
+ [
1983
+ 19,
1984
+ 302
1985
+ ],
1986
+ [
1987
+ 53,
1988
+ 109
1989
+ ],
1990
+ [
1991
+ 234,
1992
+ 0
1993
+ ],
1994
+ [
1995
+ 66,
1996
+ 243
1997
+ ],
1998
+ [
1999
+ 127,
2000
+ 224
2001
+ ],
2002
+ [
2003
+ 47,
2004
+ 146
2005
+ ],
2006
+ [
2007
+ 155,
2008
+ 383
2009
+ ],
2010
+ [
2011
+ 232,
2012
+ 146
2013
+ ],
2014
+ [
2015
+ 13,
2016
+ 341
2017
+ ],
2018
+ [
2019
+ 71,
2020
+ 262
2021
+ ],
2022
+ [
2023
+ 175,
2024
+ 384
2025
+ ],
2026
+ [
2027
+ 159,
2028
+ 282
2029
+ ],
2030
+ [
2031
+ 138,
2032
+ 375
2033
+ ],
2034
+ [
2035
+ 80,
2036
+ 83
2037
+ ],
2038
+ [
2039
+ 26,
2040
+ 191
2041
+ ],
2042
+ [
2043
+ 11,
2044
+ 58
2045
+ ],
2046
+ [
2047
+ 73,
2048
+ 348
2049
+ ],
2050
+ [
2051
+ 224,
2052
+ 3
2053
+ ],
2054
+ [
2055
+ 163,
2056
+ 102
2057
+ ],
2058
+ [
2059
+ 111,
2060
+ 245
2061
+ ],
2062
+ [
2063
+ 17,
2064
+ 48
2065
+ ],
2066
+ [
2067
+ 81,
2068
+ 209
2069
+ ],
2070
+ [
2071
+ 185,
2072
+ 208
2073
+ ],
2074
+ [
2075
+ 77,
2076
+ 22
2077
+ ],
2078
+ [
2079
+ 58,
2080
+ 270
2081
+ ],
2082
+ [
2083
+ 152,
2084
+ 51
2085
+ ],
2086
+ [
2087
+ 153,
2088
+ 103
2089
+ ],
2090
+ [
2091
+ 162,
2092
+ 334
2093
+ ],
2094
+ [
2095
+ 150,
2096
+ 361
2097
+ ],
2098
+ [
2099
+ 78,
2100
+ 244
2101
+ ],
2102
+ [
2103
+ 99,
2104
+ 21
2105
+ ],
2106
+ [
2107
+ 120,
2108
+ 2
2109
+ ],
2110
+ [
2111
+ 215,
2112
+ 334
2113
+ ],
2114
+ [
2115
+ 157,
2116
+ 53
2117
+ ],
2118
+ [
2119
+ 117,
2120
+ 17
2121
+ ],
2122
+ [
2123
+ 7,
2124
+ 324
2125
+ ],
2126
+ [
2127
+ 51,
2128
+ 104
2129
+ ],
2130
+ [
2131
+ 46,
2132
+ 354
2133
+ ],
2134
+ [
2135
+ 115,
2136
+ 160
2137
+ ],
2138
+ [
2139
+ 226,
2140
+ 151
2141
+ ],
2142
+ [
2143
+ 88,
2144
+ 261
2145
+ ],
2146
+ [
2147
+ 191,
2148
+ 272
2149
+ ],
2150
+ [
2151
+ 65,
2152
+ 178
2153
+ ],
2154
+ [
2155
+ 178,
2156
+ 315
2157
+ ],
2158
+ [
2159
+ 223,
2160
+ 86
2161
+ ],
2162
+ [
2163
+ 131,
2164
+ 192
2165
+ ],
2166
+ [
2167
+ 143,
2168
+ 59
2169
+ ],
2170
+ [
2171
+ 197,
2172
+ 195
2173
+ ],
2174
+ [
2175
+ 8,
2176
+ 159
2177
+ ],
2178
+ [
2179
+ 40,
2180
+ 245
2181
+ ],
2182
+ [
2183
+ 23,
2184
+ 254
2185
+ ],
2186
+ [
2187
+ 123,
2188
+ 185
2189
+ ],
2190
+ [
2191
+ 195,
2192
+ 190
2193
+ ],
2194
+ [
2195
+ 212,
2196
+ 290
2197
+ ],
2198
+ [
2199
+ 180,
2200
+ 283
2201
+ ],
2202
+ [
2203
+ 202,
2204
+ 277
2205
+ ],
2206
+ [
2207
+ 140,
2208
+ 49
2209
+ ],
2210
+ [
2211
+ 29,
2212
+ 68
2213
+ ],
2214
+ [
2215
+ 167,
2216
+ 163
2217
+ ],
2218
+ [
2219
+ 30,
2220
+ 95
2221
+ ],
2222
+ [
2223
+ 207,
2224
+ 376
2225
+ ],
2226
+ [
2227
+ 208,
2228
+ 291
2229
+ ],
2230
+ [
2231
+ 135,
2232
+ 182
2233
+ ],
2234
+ [
2235
+ 151,
2236
+ 225
2237
+ ],
2238
+ [
2239
+ 62,
2240
+ 35
2241
+ ],
2242
+ [
2243
+ 74,
2244
+ 205
2245
+ ],
2246
+ [
2247
+ 12,
2248
+ 78
2249
+ ],
2250
+ [
2251
+ 220,
2252
+ 392
2253
+ ],
2254
+ [
2255
+ 107,
2256
+ 232
2257
+ ],
2258
+ [
2259
+ 203,
2260
+ 234
2261
+ ],
2262
+ [
2263
+ 34,
2264
+ 210
2265
+ ],
2266
+ [
2267
+ 9,
2268
+ 142
2269
+ ],
2270
+ [
2271
+ 221,
2272
+ 294
2273
+ ],
2274
+ [
2275
+ 86,
2276
+ 89
2277
+ ],
2278
+ [
2279
+ 70,
2280
+ 15
2281
+ ],
2282
+ [
2283
+ 198,
2284
+ 29
2285
+ ],
2286
+ [
2287
+ 199,
2288
+ 266
2289
+ ],
2290
+ [
2291
+ 189,
2292
+ 134
2293
+ ],
2294
+ [
2295
+ 206,
2296
+ 229
2297
+ ],
2298
+ [
2299
+ 67,
2300
+ 35
2301
+ ],
2302
+ [
2303
+ 200,
2304
+ 286
2305
+ ],
2306
+ [
2307
+ 204,
2308
+ 302
2309
+ ],
2310
+ [
2311
+ 141,
2312
+ 236
2313
+ ],
2314
+ [
2315
+ 44,
2316
+ 215
2317
+ ],
2318
+ [
2319
+ 68,
2320
+ 182
2321
+ ],
2322
+ [
2323
+ 125,
2324
+ 43
2325
+ ],
2326
+ [
2327
+ 222,
2328
+ 375
2329
+ ],
2330
+ [
2331
+ 108,
2332
+ 85
2333
+ ],
2334
+ [
2335
+ 22,
2336
+ 333
2337
+ ],
2338
+ [
2339
+ 106,
2340
+ 228
2341
+ ],
2342
+ [
2343
+ 169,
2344
+ 357
2345
+ ],
2346
+ [
2347
+ 89,
2348
+ 77
2349
+ ]
2350
+ ]
2351
+ ],
2352
+ "output": 0
2353
+ },
2354
+ {
2355
+ "input": [
2356
+ 37,
2357
+ [
2358
+ [
2359
+ 13,
2360
+ 206
2361
+ ],
2362
+ [
2363
+ 20,
2364
+ 20
2365
+ ],
2366
+ [
2367
+ 18,
2368
+ 102
2369
+ ],
2370
+ [
2371
+ 16,
2372
+ 90
2373
+ ],
2374
+ [
2375
+ 28,
2376
+ 20
2377
+ ],
2378
+ [
2379
+ 26,
2380
+ 145
2381
+ ],
2382
+ [
2383
+ 5,
2384
+ 278
2385
+ ],
2386
+ [
2387
+ 22,
2388
+ 305
2389
+ ],
2390
+ [
2391
+ 2,
2392
+ 40
2393
+ ],
2394
+ [
2395
+ 25,
2396
+ 318
2397
+ ],
2398
+ [
2399
+ 27,
2400
+ 390
2401
+ ],
2402
+ [
2403
+ 32,
2404
+ 161
2405
+ ],
2406
+ [
2407
+ 29,
2408
+ 117
2409
+ ],
2410
+ [
2411
+ 14,
2412
+ 236
2413
+ ],
2414
+ [
2415
+ 33,
2416
+ 78
2417
+ ],
2418
+ [
2419
+ 36,
2420
+ 121
2421
+ ]
2422
+ ]
2423
+ ],
2424
+ "output": 0
2425
+ }
2426
+ ],
2427
+ "haskell_template": "numberOfPermutations :: Int -> [[Int]] -> Int\nnumberOfPermutations n requirements ",
2428
+ "ocaml_template": "let numberOfPermutations (n: int) (requirements: int list list) : int = ",
2429
+ "scala_template": "def numberOfPermutations(n: Int,requirements: List[List[Int]]): Int = { \n \n}",
2430
+ "java_template": "class Solution {\n public int numberOfPermutations(int n, int[][] requirements) {\n \n }\n}",
2431
+ "python_template": "class Solution(object):\n def numberOfPermutations(self, n, requirements):\n \"\"\"\n :type n: int\n :type requirements: List[List[int]]\n :rtype: int\n \"\"\"\n "
2432
+ }
count_the_number_of_inversions/ocaml_tests/main.ml ADDED
@@ -0,0 +1,47 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ module Main = struct
3
+ open OUnit2
4
+
5
+ (* Program start *)
6
+
7
+ (* Program end *)
8
+
9
+ (* Test cases *)
10
+
11
+ let test1 _ = assert_equal 2 (numberOfPermutations 3 [[2;2];[0;0]])
12
+
13
+ let test2 _ = assert_equal 1 (numberOfPermutations 3 [[2;2];[1;1];[0;0]])
14
+
15
+ let test3 _ = assert_equal 1 (numberOfPermutations 2 [[0;0];[1;0]])
16
+
17
+ let test4 _ = assert_equal 0 (numberOfPermutations 133 [[130; 392]; [85; 131]; [8; 39]; [19; 356]; [66; 41]; [131; 219]; [47; 253]; [21; 372]; [101; 301]; [35; 319]; [20; 239]; [122; 366]; [13; 145]; [82; 200]; [26; 13]; [56; 71]; [124; 381]; [125; 81]; [58; 27]; [87; 129]; [83; 171]; [48; 179]; [111; 164]; [37; 367]; [110; 348]; [55; 180]; [89; 107]; [59; 343]; [60; 96]; [34; 256]; [39; 129]; [11; 181]; [90; 101]; [105; 177]; [132; 217]; [117; 344]; [73; 12]; [99; 49]; [69; 359]; [61; 277]; [0; 97]; [68; 177]; [128; 375]; [94; 281]; [76; 311]; [41; 11]; [25; 1]; [119; 52]; [15; 8]; [120; 37]; [95; 42]; [71; 379]; [33; 298]; [30; 290]; [77; 257]; [6; 87]; [70; 297]; [78; 327]; [62; 249]; [45; 250]; [52; 285]; [81; 246]; [64; 67]; [106; 178]; [103; 336]; [16; 205]; [32; 72]; [36; 288]; [91; 74]; [114; 226]; [12; 27]; [112; 54]; [123; 183]; [97; 292]; [115; 294]; [49; 203]; [29; 340]; [40; 333]; [86; 217]; [102; 258]; [38; 284]; [42; 377]; [74; 195]; [53; 343]; [108; 72]; [96; 50]; [3; 220]; [27; 40]; [1; 158]; [92; 221]; [17; 173]; [2; 62]; [113; 206]; [129; 364]; [7; 398]; [22; 203]; [23; 266]; [100; 396]; [104; 213]; [98; 387]; [57; 7]; [88; 218]; [10; 170]; [67; 49]; [93; 317]; [44; 361]; [28; 13]; [54; 262]; [65; 72]; [84; 348]; [9; 150]; [43; 118]; [80; 363]; [79; 364]; [24; 229]; [121; 245]; [31; 150]; [18; 54]; [5; 350]; [46; 70]])
18
+
19
+ let test5 _ = assert_equal 0 (numberOfPermutations 9 [[5; 122]; [4; 4]; [0; 121]; [6; 398]; [3; 150]; [8; 378]; [7; 66]])
20
+
21
+ let test6 _ = assert_equal 0 (numberOfPermutations 276 [[28; 361]; [227; 317]; [161; 306]; [268; 356]; [219; 168]; [11; 40]; [52; 175]; [17; 237]; [251; 173]; [82; 319]; [264; 306]; [155; 59]; [194; 135]; [76; 126]; [173; 199]; [213; 131]; [121; 249]; [252; 176]; [165; 199]; [142; 275]; [273; 109]; [129; 223]; [2; 168]; [171; 58]; [275; 281]; [143; 84]; [190; 150]; [206; 355]; [93; 297]; [42; 320]; [44; 361]; [253; 99]; [133; 218]; [13; 38]; [85; 259]; [248; 243]; [230; 307]; [62; 126]; [77; 388]; [4; 363]; [181; 58]; [81; 317]; [156; 118]; [176; 150]; [207; 157]; [92; 144]; [127; 110]; [228; 160]; [120; 22]; [247; 216]; [101; 285]; [49; 70]; [69; 84]; [22; 88]; [103; 207]; [80; 385]; [164; 279]; [180; 52]; [67; 7]; [255; 214]; [58; 100]; [26; 387]; [272; 339]; [74; 359]; [100; 389]; [226; 324]; [150; 166]; [163; 151]; [109; 353]; [21; 310]; [20; 162]; [118; 31]; [162; 204]; [35; 73]; [154; 83]; [54; 294]; [196; 8]; [234; 20]; [88; 181]; [215; 264]; [148; 265]; [257; 270]; [87; 72]; [157; 317]; [237; 18]; [72; 149]; [263; 277]; [202; 42]; [99; 206]; [15; 287]; [185; 58]; [43; 229]; [116; 155]; [122; 263]; [137; 326]; [145; 189]; [131; 259]; [106; 127]; [9; 114]; [231; 32]; [3; 223]; [198; 181]; [10; 79]; [1; 231]; [33; 133]; [41; 312]; [182; 162]; [259; 265]; [91; 261]; [108; 59]; [65; 386]; [64; 191]; [89; 118]; [130; 293]; [32; 299]; [152; 367]; [168; 122]; [83; 129]; [149; 197]; [225; 246]; [29; 152]; [14; 275]; [31; 339]; [244; 155]; [73; 357]; [84; 290]; [260; 165]; [212; 372]; [241; 275]; [70; 170]; [153; 244]; [140; 158]; [53; 349]; [266; 225]; [7; 309]; [56; 294]; [102; 321]; [34; 67]; [271; 214]; [0; 365]; [200; 133]; [183; 203]; [216; 135]; [128; 317]; [192; 231]; [97; 380]; [8; 48]; [186; 81]; [40; 34]; [119; 373]; [68; 320]; [245; 386]; [18; 147]; [238; 3]; [132; 174]; [78; 295]; [210; 277]; [55; 47]; [46; 175]; [38; 1]; [59; 277]; [197; 369]; [71; 119]; [175; 263]; [146; 279]; [94; 94]; [159; 310]; [235; 260]; [201; 258]; [184; 101]; [47; 232]; [96; 240]; [147; 133]; [203; 400]; [112; 168]; [179; 257]; [126; 180]; [239; 11]; [256; 92]; [189; 1]; [224; 82]; [222; 149]; [90; 365]; [136; 84]; [265; 281]; [135; 14]; [37; 192]; [169; 140]; [24; 265]; [233; 123]; [218; 111]; [160; 237]; [261; 126]; [5; 119]; [270; 211]; [204; 10]; [51; 158]; [240; 382]; [274; 204]; [19; 186]; [174; 145]; [138; 285]; [243; 160]; [110; 119]; [250; 274]; [30; 375]; [191; 157]; [61; 53]; [221; 126]; [158; 273]; [208; 19]; [166; 163]; [79; 119]; [220; 316]; [124; 400]; [232; 337]; [107; 118]; [151; 246]; [187; 136]; [211; 225]; [269; 298]; [98; 138]; [36; 314]; [115; 138]; [177; 107]; [217; 26]; [6; 161]; [39; 8]; [144; 334]; [63; 393]; [254; 61]; [117; 367]; [50; 35]; [105; 89]; [125; 383]; [188; 92]; [141; 14]; [229; 263]; [195; 327]; [167; 228]; [267; 167]; [95; 20]; [66; 101]; [27; 369]; [199; 377]; [23; 354]; [12; 34]; [170; 192]; [236; 393]; [25; 283]; [60; 215]; [139; 30]; [113; 110]; [205; 158]; [178; 118]; [242; 379]; [123; 41]; [172; 356]; [249; 146]; [262; 144]; [223; 272]; [104; 14]; [48; 82]; [214; 355]; [57; 83]; [45; 213]; [86; 72]])
22
+
23
+ let test7 _ = assert_equal 0 (numberOfPermutations 161 [[148; 313]; [84; 333]; [53; 133]; [66; 24]; [149; 66]; [142; 63]; [119; 378]; [37; 30]; [144; 82]; [139; 190]; [21; 232]; [52; 259]; [76; 290]; [92; 131]; [72; 329]; [31; 196]; [46; 262]; [28; 211]; [101; 64]; [158; 89]; [70; 292]; [6; 131]; [8; 245]; [122; 26]; [36; 324]; [159; 366]; [99; 234]; [83; 95]; [95; 213]; [77; 384]; [2; 326]; [74; 54]; [135; 345]; [82; 249]; [62; 374]; [152; 24]; [117; 198]; [121; 398]; [49; 356]; [93; 108]; [125; 5]; [118; 379]; [75; 77]; [160; 275]; [47; 164]; [1; 335]; [133; 359]; [32; 78]; [63; 234]; [19; 390]; [90; 133]; [67; 353]; [141; 393]; [113; 39]; [20; 6]; [11; 153]; [81; 395]; [38; 173]; [54; 268]; [43; 283]])
24
+
25
+ let test8 _ = assert_equal 0 (numberOfPermutations 235 [[104; 34]; [79; 370]; [114; 358]; [149; 199]; [164; 175]; [59; 308]; [35; 138]; [172; 129]; [103; 88]; [122; 379]; [182; 141]; [158; 356]; [112; 22]; [72; 357]; [166; 298]; [57; 59]; [96; 195]; [190; 208]; [102; 173]; [1; 94]; [186; 227]; [210; 295]; [209; 340]; [33; 124]; [14; 150]; [21; 134]; [19; 302]; [53; 109]; [234; 0]; [66; 243]; [127; 224]; [47; 146]; [155; 383]; [232; 146]; [13; 341]; [71; 262]; [175; 384]; [159; 282]; [138; 375]; [80; 83]; [26; 191]; [11; 58]; [73; 348]; [224; 3]; [163; 102]; [111; 245]; [17; 48]; [81; 209]; [185; 208]; [77; 22]; [58; 270]; [152; 51]; [153; 103]; [162; 334]; [150; 361]; [78; 244]; [99; 21]; [120; 2]; [215; 334]; [157; 53]; [117; 17]; [7; 324]; [51; 104]; [46; 354]; [115; 160]; [226; 151]; [88; 261]; [191; 272]; [65; 178]; [178; 315]; [223; 86]; [131; 192]; [143; 59]; [197; 195]; [8; 159]; [40; 245]; [23; 254]; [123; 185]; [195; 190]; [212; 290]; [180; 283]; [202; 277]; [140; 49]; [29; 68]; [167; 163]; [30; 95]; [207; 376]; [208; 291]; [135; 182]; [151; 225]; [62; 35]; [74; 205]; [12; 78]; [220; 392]; [107; 232]; [203; 234]; [34; 210]; [9; 142]; [221; 294]; [86; 89]; [70; 15]; [198; 29]; [199; 266]; [189; 134]; [206; 229]; [67; 35]; [200; 286]; [204; 302]; [141; 236]; [44; 215]; [68; 182]; [125; 43]; [222; 375]; [108; 85]; [22; 333]; [106; 228]; [169; 357]; [89; 77]])
26
+
27
+ let test9 _ = assert_equal 0 (numberOfPermutations 37 [[13; 206]; [20; 20]; [18; 102]; [16; 90]; [28; 20]; [26; 145]; [5; 278]; [22; 305]; [2; 40]; [25; 318]; [27; 390]; [32; 161]; [29; 117]; [14; 236]; [33; 78]; [36; 121]])
28
+
29
+
30
+ (* Grouping test cases *)
31
+ let suite = "Test Suite for numberOfPermutations" >::: [
32
+
33
+ "test1" >:: test1;
34
+ "test2" >:: test2;
35
+ "test3" >:: test3;
36
+ "test4" >:: test4;
37
+ "test5" >:: test5;
38
+ "test6" >:: test6;
39
+ "test7" >:: test7;
40
+ "test8" >:: test8;
41
+ "test9" >:: test9;
42
+ ]
43
+
44
+
45
+ (* Running the tests *)
46
+ let () = run_test_tt_main suite
47
+ end
count_the_number_of_inversions/scala_tests/MySuite.scala ADDED
@@ -0,0 +1,40 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ class MySuite extends munit.FunSuite {
3
+
4
+ test("test1") {
5
+ assertEquals(Main.numberOfPermutations(3,List(List(2,2),List(0,0))), 2)
6
+ }
7
+
8
+ test("test2") {
9
+ assertEquals(Main.numberOfPermutations(3,List(List(2,2),List(1,1),List(0,0))), 1)
10
+ }
11
+
12
+ test("test3") {
13
+ assertEquals(Main.numberOfPermutations(2,List(List(0,0),List(1,0))), 1)
14
+ }
15
+
16
+ test("test4") {
17
+ assertEquals(Main.numberOfPermutations(133,List(List(130, 392), List(85, 131), List(8, 39), List(19, 356), List(66, 41), List(131, 219), List(47, 253), List(21, 372), List(101, 301), List(35, 319), List(20, 239), List(122, 366), List(13, 145), List(82, 200), List(26, 13), List(56, 71), List(124, 381), List(125, 81), List(58, 27), List(87, 129), List(83, 171), List(48, 179), List(111, 164), List(37, 367), List(110, 348), List(55, 180), List(89, 107), List(59, 343), List(60, 96), List(34, 256), List(39, 129), List(11, 181), List(90, 101), List(105, 177), List(132, 217), List(117, 344), List(73, 12), List(99, 49), List(69, 359), List(61, 277), List(0, 97), List(68, 177), List(128, 375), List(94, 281), List(76, 311), List(41, 11), List(25, 1), List(119, 52), List(15, 8), List(120, 37), List(95, 42), List(71, 379), List(33, 298), List(30, 290), List(77, 257), List(6, 87), List(70, 297), List(78, 327), List(62, 249), List(45, 250), List(52, 285), List(81, 246), List(64, 67), List(106, 178), List(103, 336), List(16, 205), List(32, 72), List(36, 288), List(91, 74), List(114, 226), List(12, 27), List(112, 54), List(123, 183), List(97, 292), List(115, 294), List(49, 203), List(29, 340), List(40, 333), List(86, 217), List(102, 258), List(38, 284), List(42, 377), List(74, 195), List(53, 343), List(108, 72), List(96, 50), List(3, 220), List(27, 40), List(1, 158), List(92, 221), List(17, 173), List(2, 62), List(113, 206), List(129, 364), List(7, 398), List(22, 203), List(23, 266), List(100, 396), List(104, 213), List(98, 387), List(57, 7), List(88, 218), List(10, 170), List(67, 49), List(93, 317), List(44, 361), List(28, 13), List(54, 262), List(65, 72), List(84, 348), List(9, 150), List(43, 118), List(80, 363), List(79, 364), List(24, 229), List(121, 245), List(31, 150), List(18, 54), List(5, 350), List(46, 70))), 0)
18
+ }
19
+
20
+ test("test5") {
21
+ assertEquals(Main.numberOfPermutations(9,List(List(5, 122), List(4, 4), List(0, 121), List(6, 398), List(3, 150), List(8, 378), List(7, 66))), 0)
22
+ }
23
+
24
+ test("test6") {
25
+ assertEquals(Main.numberOfPermutations(276,List(List(28, 361), List(227, 317), List(161, 306), List(268, 356), List(219, 168), List(11, 40), List(52, 175), List(17, 237), List(251, 173), List(82, 319), List(264, 306), List(155, 59), List(194, 135), List(76, 126), List(173, 199), List(213, 131), List(121, 249), List(252, 176), List(165, 199), List(142, 275), List(273, 109), List(129, 223), List(2, 168), List(171, 58), List(275, 281), List(143, 84), List(190, 150), List(206, 355), List(93, 297), List(42, 320), List(44, 361), List(253, 99), List(133, 218), List(13, 38), List(85, 259), List(248, 243), List(230, 307), List(62, 126), List(77, 388), List(4, 363), List(181, 58), List(81, 317), List(156, 118), List(176, 150), List(207, 157), List(92, 144), List(127, 110), List(228, 160), List(120, 22), List(247, 216), List(101, 285), List(49, 70), List(69, 84), List(22, 88), List(103, 207), List(80, 385), List(164, 279), List(180, 52), List(67, 7), List(255, 214), List(58, 100), List(26, 387), List(272, 339), List(74, 359), List(100, 389), List(226, 324), List(150, 166), List(163, 151), List(109, 353), List(21, 310), List(20, 162), List(118, 31), List(162, 204), List(35, 73), List(154, 83), List(54, 294), List(196, 8), List(234, 20), List(88, 181), List(215, 264), List(148, 265), List(257, 270), List(87, 72), List(157, 317), List(237, 18), List(72, 149), List(263, 277), List(202, 42), List(99, 206), List(15, 287), List(185, 58), List(43, 229), List(116, 155), List(122, 263), List(137, 326), List(145, 189), List(131, 259), List(106, 127), List(9, 114), List(231, 32), List(3, 223), List(198, 181), List(10, 79), List(1, 231), List(33, 133), List(41, 312), List(182, 162), List(259, 265), List(91, 261), List(108, 59), List(65, 386), List(64, 191), List(89, 118), List(130, 293), List(32, 299), List(152, 367), List(168, 122), List(83, 129), List(149, 197), List(225, 246), List(29, 152), List(14, 275), List(31, 339), List(244, 155), List(73, 357), List(84, 290), List(260, 165), List(212, 372), List(241, 275), List(70, 170), List(153, 244), List(140, 158), List(53, 349), List(266, 225), List(7, 309), List(56, 294), List(102, 321), List(34, 67), List(271, 214), List(0, 365), List(200, 133), List(183, 203), List(216, 135), List(128, 317), List(192, 231), List(97, 380), List(8, 48), List(186, 81), List(40, 34), List(119, 373), List(68, 320), List(245, 386), List(18, 147), List(238, 3), List(132, 174), List(78, 295), List(210, 277), List(55, 47), List(46, 175), List(38, 1), List(59, 277), List(197, 369), List(71, 119), List(175, 263), List(146, 279), List(94, 94), List(159, 310), List(235, 260), List(201, 258), List(184, 101), List(47, 232), List(96, 240), List(147, 133), List(203, 400), List(112, 168), List(179, 257), List(126, 180), List(239, 11), List(256, 92), List(189, 1), List(224, 82), List(222, 149), List(90, 365), List(136, 84), List(265, 281), List(135, 14), List(37, 192), List(169, 140), List(24, 265), List(233, 123), List(218, 111), List(160, 237), List(261, 126), List(5, 119), List(270, 211), List(204, 10), List(51, 158), List(240, 382), List(274, 204), List(19, 186), List(174, 145), List(138, 285), List(243, 160), List(110, 119), List(250, 274), List(30, 375), List(191, 157), List(61, 53), List(221, 126), List(158, 273), List(208, 19), List(166, 163), List(79, 119), List(220, 316), List(124, 400), List(232, 337), List(107, 118), List(151, 246), List(187, 136), List(211, 225), List(269, 298), List(98, 138), List(36, 314), List(115, 138), List(177, 107), List(217, 26), List(6, 161), List(39, 8), List(144, 334), List(63, 393), List(254, 61), List(117, 367), List(50, 35), List(105, 89), List(125, 383), List(188, 92), List(141, 14), List(229, 263), List(195, 327), List(167, 228), List(267, 167), List(95, 20), List(66, 101), List(27, 369), List(199, 377), List(23, 354), List(12, 34), List(170, 192), List(236, 393), List(25, 283), List(60, 215), List(139, 30), List(113, 110), List(205, 158), List(178, 118), List(242, 379), List(123, 41), List(172, 356), List(249, 146), List(262, 144), List(223, 272), List(104, 14), List(48, 82), List(214, 355), List(57, 83), List(45, 213), List(86, 72))), 0)
26
+ }
27
+
28
+ test("test7") {
29
+ assertEquals(Main.numberOfPermutations(161,List(List(148, 313), List(84, 333), List(53, 133), List(66, 24), List(149, 66), List(142, 63), List(119, 378), List(37, 30), List(144, 82), List(139, 190), List(21, 232), List(52, 259), List(76, 290), List(92, 131), List(72, 329), List(31, 196), List(46, 262), List(28, 211), List(101, 64), List(158, 89), List(70, 292), List(6, 131), List(8, 245), List(122, 26), List(36, 324), List(159, 366), List(99, 234), List(83, 95), List(95, 213), List(77, 384), List(2, 326), List(74, 54), List(135, 345), List(82, 249), List(62, 374), List(152, 24), List(117, 198), List(121, 398), List(49, 356), List(93, 108), List(125, 5), List(118, 379), List(75, 77), List(160, 275), List(47, 164), List(1, 335), List(133, 359), List(32, 78), List(63, 234), List(19, 390), List(90, 133), List(67, 353), List(141, 393), List(113, 39), List(20, 6), List(11, 153), List(81, 395), List(38, 173), List(54, 268), List(43, 283))), 0)
30
+ }
31
+
32
+ test("test8") {
33
+ assertEquals(Main.numberOfPermutations(235,List(List(104, 34), List(79, 370), List(114, 358), List(149, 199), List(164, 175), List(59, 308), List(35, 138), List(172, 129), List(103, 88), List(122, 379), List(182, 141), List(158, 356), List(112, 22), List(72, 357), List(166, 298), List(57, 59), List(96, 195), List(190, 208), List(102, 173), List(1, 94), List(186, 227), List(210, 295), List(209, 340), List(33, 124), List(14, 150), List(21, 134), List(19, 302), List(53, 109), List(234, 0), List(66, 243), List(127, 224), List(47, 146), List(155, 383), List(232, 146), List(13, 341), List(71, 262), List(175, 384), List(159, 282), List(138, 375), List(80, 83), List(26, 191), List(11, 58), List(73, 348), List(224, 3), List(163, 102), List(111, 245), List(17, 48), List(81, 209), List(185, 208), List(77, 22), List(58, 270), List(152, 51), List(153, 103), List(162, 334), List(150, 361), List(78, 244), List(99, 21), List(120, 2), List(215, 334), List(157, 53), List(117, 17), List(7, 324), List(51, 104), List(46, 354), List(115, 160), List(226, 151), List(88, 261), List(191, 272), List(65, 178), List(178, 315), List(223, 86), List(131, 192), List(143, 59), List(197, 195), List(8, 159), List(40, 245), List(23, 254), List(123, 185), List(195, 190), List(212, 290), List(180, 283), List(202, 277), List(140, 49), List(29, 68), List(167, 163), List(30, 95), List(207, 376), List(208, 291), List(135, 182), List(151, 225), List(62, 35), List(74, 205), List(12, 78), List(220, 392), List(107, 232), List(203, 234), List(34, 210), List(9, 142), List(221, 294), List(86, 89), List(70, 15), List(198, 29), List(199, 266), List(189, 134), List(206, 229), List(67, 35), List(200, 286), List(204, 302), List(141, 236), List(44, 215), List(68, 182), List(125, 43), List(222, 375), List(108, 85), List(22, 333), List(106, 228), List(169, 357), List(89, 77))), 0)
34
+ }
35
+
36
+ test("test9") {
37
+ assertEquals(Main.numberOfPermutations(37,List(List(13, 206), List(20, 20), List(18, 102), List(16, 90), List(28, 20), List(26, 145), List(5, 278), List(22, 305), List(2, 40), List(25, 318), List(27, 390), List(32, 161), List(29, 117), List(14, 236), List(33, 78), List(36, 121))), 0)
38
+ }
39
+
40
+ }
count_the_number_of_powerful_integers/haskell_tests/Main.hs ADDED
@@ -0,0 +1,45 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ module Main where
3
+ import Test.HUnit
4
+
5
+ --Program start
6
+
7
+ --Program end
8
+
9
+ -- Test cases
10
+
11
+ test1 :: Test
12
+ test1 = TestCase (assertEqual "for (numberOfPowerfulInt 1 6000 4 \"124 \")," 5 (numberOfPowerfulInt 1 6000 4 "124"))
13
+
14
+ test2 :: Test
15
+ test2 = TestCase (assertEqual "for (numberOfPowerfulInt 15 215 6 \"10 \")," 2 (numberOfPowerfulInt 15 215 6 "10"))
16
+
17
+ test3 :: Test
18
+ test3 = TestCase (assertEqual "for (numberOfPowerfulInt 1000 2000 4 \"3000 \")," 0 (numberOfPowerfulInt 1000 2000 4 "3000"))
19
+
20
+ test4 :: Test
21
+ test4 = TestCase (assertEqual "for (numberOfPowerfulInt 241667996717926 346291677231542 5 \"41200322401003 \")," 1 (numberOfPowerfulInt 241667996717926 346291677231542 5 "41200322401003"))
22
+
23
+ test5 :: Test
24
+ test5 = TestCase (assertEqual "for (numberOfPowerfulInt 218652011982124 482085779138860 6 \"01161 \")," 109531219 (numberOfPowerfulInt 218652011982124 482085779138860 6 "01161"))
25
+
26
+ test6 :: Test
27
+ test6 = TestCase (assertEqual "for (numberOfPowerfulInt 374676794325109 959725657415126 4 \"3003443144 \")," 625 (numberOfPowerfulInt 374676794325109 959725657415126 4 "3003443144"))
28
+
29
+ test7 :: Test
30
+ test7 = TestCase (assertEqual "for (numberOfPowerfulInt 328006978448468 517554731930828 6 \"45166646266550 \")," 2 (numberOfPowerfulInt 328006978448468 517554731930828 6 "45166646266550"))
31
+
32
+ test8 :: Test
33
+ test8 = TestCase (assertEqual "for (numberOfPowerfulInt 856606498085285 899556141984307 1 \"0001011 \")," 0 (numberOfPowerfulInt 856606498085285 899556141984307 1 "0001011"))
34
+
35
+ test9 :: Test
36
+ test9 = TestCase (assertEqual "for (numberOfPowerfulInt 25094093111206 329371035737576 3 \"00332120221 \")," 192 (numberOfPowerfulInt 25094093111206 329371035737576 3 "00332120221"))
37
+
38
+
39
+ -- Grouping test cases
40
+ tests :: Test
41
+ tests = TestList [TestLabel "Test1" test1, TestLabel "Test2" test2, TestLabel "Test3" test3, TestLabel "Test4" test4, TestLabel "Test5" test5, TestLabel "Test6" test6, TestLabel "Test7" test7, TestLabel "Test8" test8, TestLabel "Test9" test9]
42
+
43
+ -- Running the tests
44
+ main :: IO Counts
45
+ main = runTestTT tests
count_the_number_of_powerful_integers/java_tests/Main.java ADDED
@@ -0,0 +1,25 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ import static org.junit.jupiter.api.Assertions.*;
3
+ import org.junit.jupiter.api.Test;
4
+ import java.util.List;
5
+ import java.util.Arrays;
6
+ import java.util.ArrayList;
7
+ public class Main {
8
+ //Program start
9
+
10
+ //Program end
11
+
12
+ @Test
13
+ public void test1() {
14
+ assertEquals(5, numberOfPowerfulInt(1, 6000, 4, "124"));
15
+ }
16
+ @Test
17
+ public void test2() {
18
+ assertEquals(2, numberOfPowerfulInt(15, 215, 6, "10"));
19
+ }
20
+ @Test
21
+ public void test3() {
22
+ assertEquals(0, numberOfPowerfulInt(1000, 2000, 4, "3000"));
23
+ }
24
+
25
+ }
count_the_number_of_powerful_integers/meta.json ADDED
@@ -0,0 +1,122 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "id": 3243,
3
+ "name": "count_the_number_of_powerful_integers",
4
+ "difficulty": "Hard",
5
+ "link": "https://leetcode.com/problems/count-the-number-of-powerful-integers/",
6
+ "date": "2023-12-23 00:00:00",
7
+ "task_description": "You are given three integers `start`, `finish`, and `limit`. You are also given a **0-indexed** string `s` representing a **positive** integer. A **positive** integer `x` is called **powerful** if it ends with `s` (in other words, `s` is a **suffix** of `x`) and each digit in `x` is at most `limit`. Return _the **total** number of powerful integers in the range_ `[start..finish]`. A string `x` is a suffix of a string `y` if and only if `x` is a substring of `y` that starts from some index (**including **`0`) in `y` and extends to the index `y.length - 1`. For example, `25` is a suffix of `5125` whereas `512` is not. **Example 1:** ``` **Input:** start = 1, finish = 6000, limit = 4, s = \"124\" **Output:** 5 **Explanation:** The powerful integers in the range [1..6000] are 124, 1124, 2124, 3124, and, 4124. All these integers have each digit <= 4, and \"124\" as a suffix. Note that 5124 is not a powerful integer because the first digit is 5 which is greater than 4. It can be shown that there are only 5 powerful integers in this range. ``` **Example 2:** ``` **Input:** start = 15, finish = 215, limit = 6, s = \"10\" **Output:** 2 **Explanation:** The powerful integers in the range [15..215] are 110 and 210. All these integers have each digit <= 6, and \"10\" as a suffix. It can be shown that there are only 2 powerful integers in this range. ``` **Example 3:** ``` **Input:** start = 1000, finish = 2000, limit = 4, s = \"3000\" **Output:** 0 **Explanation:** All integers in the range [1000..2000] are smaller than 3000, hence \"3000\" cannot be a suffix of any integer in this range. ``` **Constraints:** `1 <= start <= finish <= 1015` `1 <= limit <= 9` `1 <= s.length <= floor(log10(finish)) + 1` `s` only consists of numeric digits which are at most `limit`. `s` does not have leading zeros.",
8
+ "public_test_cases": [
9
+ {
10
+ "label": "Example 1",
11
+ "input": "start = 1, finish = 6000, limit = 4, s = \"124\"",
12
+ "output": "5 "
13
+ },
14
+ {
15
+ "label": "Example 2",
16
+ "input": "start = 15, finish = 215, limit = 6, s = \"10\"",
17
+ "output": "2 "
18
+ },
19
+ {
20
+ "label": "Example 3",
21
+ "input": "start = 1000, finish = 2000, limit = 4, s = \"3000\"",
22
+ "output": "0 "
23
+ }
24
+ ],
25
+ "private_test_cases": [
26
+ {
27
+ "input": [
28
+ 241667996717926,
29
+ 346291677231542,
30
+ 5,
31
+ "\"41200322401003\""
32
+ ],
33
+ "output": 1
34
+ },
35
+ {
36
+ "input": [
37
+ 218652011982124,
38
+ 482085779138860,
39
+ 6,
40
+ "\"01161\""
41
+ ],
42
+ "output": 109531219
43
+ },
44
+ {
45
+ "input": [
46
+ 374676794325109,
47
+ 959725657415126,
48
+ 4,
49
+ "\"3003443144\""
50
+ ],
51
+ "output": 625
52
+ },
53
+ {
54
+ "input": [
55
+ 328006978448468,
56
+ 517554731930828,
57
+ 6,
58
+ "\"45166646266550\""
59
+ ],
60
+ "output": 2
61
+ },
62
+ {
63
+ "input": [
64
+ 856606498085285,
65
+ 899556141984307,
66
+ 1,
67
+ "\"0001011\""
68
+ ],
69
+ "output": 0
70
+ },
71
+ {
72
+ "input": [
73
+ 25094093111206,
74
+ 329371035737576,
75
+ 3,
76
+ "\"00332120221\""
77
+ ],
78
+ "output": 192
79
+ },
80
+ {
81
+ "input": [
82
+ 108446675002391,
83
+ 449217973883871,
84
+ 2,
85
+ "\"010221121002102\""
86
+ ],
87
+ "output": 0
88
+ },
89
+ {
90
+ "input": [
91
+ 773803148376794,
92
+ 923983473491920,
93
+ 3,
94
+ "12210"
95
+ ],
96
+ "output": 0
97
+ },
98
+ {
99
+ "input": [
100
+ 150616644755156,
101
+ 219388378425371,
102
+ 6,
103
+ "145"
104
+ ],
105
+ "output": 1093670592
106
+ },
107
+ {
108
+ "input": [
109
+ 226115159400205,
110
+ 759042136808231,
111
+ 7,
112
+ "3502027306"
113
+ ],
114
+ "output": 22134
115
+ }
116
+ ],
117
+ "haskell_template": "numberOfPowerfulInt :: Int -> Int -> Int -> String -> Int\nnumberOfPowerfulInt start finish limit s ",
118
+ "ocaml_template": "let numberOfPowerfulInt (start: int) (finish: int) (limit: int) (s: string) : int = ",
119
+ "scala_template": "def numberOfPowerfulInt(start: Int,finish: Int,limit: Int,s: String): Int = { \n \n}",
120
+ "java_template": "class Solution {\n public long numberOfPowerfulInt(long start, long finish, int limit, String s) {\n \n }\n}",
121
+ "python_template": "class Solution(object):\n def numberOfPowerfulInt(self, start, finish, limit, s):\n \"\"\"\n :type start: int\n :type finish: int\n :type limit: int\n :type s: str\n :rtype: int\n \"\"\"\n "
122
+ }
count_the_number_of_powerful_integers/ocaml_tests/main.ml ADDED
@@ -0,0 +1,50 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ module Main = struct
3
+ open OUnit2
4
+
5
+ (* Program start *)
6
+
7
+ (* Program end *)
8
+
9
+ (* Test cases *)
10
+
11
+ let test1 _ = assert_equal 5 (numberOfPowerfulInt 1 6000 4 "124")
12
+
13
+ let test2 _ = assert_equal 2 (numberOfPowerfulInt 15 215 6 "10")
14
+
15
+ let test3 _ = assert_equal 0 (numberOfPowerfulInt 1000 2000 4 "3000")
16
+
17
+ let test4 _ = assert_equal 1 (numberOfPowerfulInt 241667996717926 346291677231542 5 "41200322401003")
18
+
19
+ let test5 _ = assert_equal 109531219 (numberOfPowerfulInt 218652011982124 482085779138860 6 "01161")
20
+
21
+ let test6 _ = assert_equal 625 (numberOfPowerfulInt 374676794325109 959725657415126 4 "3003443144")
22
+
23
+ let test7 _ = assert_equal 2 (numberOfPowerfulInt 328006978448468 517554731930828 6 "45166646266550")
24
+
25
+ let test8 _ = assert_equal 0 (numberOfPowerfulInt 856606498085285 899556141984307 1 "0001011")
26
+
27
+ let test9 _ = assert_equal 192 (numberOfPowerfulInt 25094093111206 329371035737576 3 "00332120221")
28
+
29
+ let test10 _ = assert_equal 0 (numberOfPowerfulInt 108446675002391 449217973883871 2 "010221121002102")
30
+
31
+
32
+ (* Grouping test cases *)
33
+ let suite = "Test Suite for numberOfPowerfulInt" >::: [
34
+
35
+ "test1" >:: test1;
36
+ "test2" >:: test2;
37
+ "test3" >:: test3;
38
+ "test4" >:: test4;
39
+ "test5" >:: test5;
40
+ "test6" >:: test6;
41
+ "test7" >:: test7;
42
+ "test8" >:: test8;
43
+ "test9" >:: test9;
44
+ "test10" >:: test10;
45
+ ]
46
+
47
+
48
+ (* Running the tests *)
49
+ let () = run_test_tt_main suite
50
+ end
count_the_number_of_powerful_integers/scala_tests/MySuite.scala ADDED
@@ -0,0 +1,44 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ class MySuite extends munit.FunSuite {
3
+
4
+ test("test1") {
5
+ assertEquals(Main.numberOfPowerfulInt(1,6000,4,"124"), 5)
6
+ }
7
+
8
+ test("test2") {
9
+ assertEquals(Main.numberOfPowerfulInt(15,215,6,"10"), 2)
10
+ }
11
+
12
+ test("test3") {
13
+ assertEquals(Main.numberOfPowerfulInt(1000,2000,4,"3000"), 0)
14
+ }
15
+
16
+ test("test4") {
17
+ assertEquals(Main.numberOfPowerfulInt(BigInt("241667996717926"),BigInt("346291677231542"),5,"BigInt("41200322401003")"), 1)
18
+ }
19
+
20
+ test("test5") {
21
+ assertEquals(Main.numberOfPowerfulInt(BigInt("218652011982124"),BigInt("482085779138860"),6,"01161"), 109531219)
22
+ }
23
+
24
+ test("test6") {
25
+ assertEquals(Main.numberOfPowerfulInt(BigInt("374676794325109"),BigInt("959725657415126"),4,"BigInt("3003443144")"), 625)
26
+ }
27
+
28
+ test("test7") {
29
+ assertEquals(Main.numberOfPowerfulInt(BigInt("328006978448468"),BigInt("517554731930828"),6,"BigInt("45166646266550")"), 2)
30
+ }
31
+
32
+ test("test8") {
33
+ assertEquals(Main.numberOfPowerfulInt(BigInt("856606498085285"),BigInt("899556141984307"),1,"0001011"), 0)
34
+ }
35
+
36
+ test("test9") {
37
+ assertEquals(Main.numberOfPowerfulInt(BigInt("25094093111206"),BigInt("329371035737576"),3,"00332120221"), 192)
38
+ }
39
+
40
+ test("test10") {
41
+ assertEquals(Main.numberOfPowerfulInt(BigInt("108446675002391"),BigInt("449217973883871"),2,"BigInt("010221121002102")"), 0)
42
+ }
43
+
44
+ }
count_the_number_of_special_characters_i/haskell_tests/Main.hs ADDED
@@ -0,0 +1,44 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ module Main where
3
+ import Test.HUnit
4
+
5
+ --Program start
6
+ numberOfSpecialChars :: String -> Int
7
+ numberOfSpecialChars word = undefined
8
+
9
+ --Program end
10
+
11
+ -- Test cases
12
+
13
+ test1 :: Test
14
+ test1 = TestCase (assertEqual "for (numberOfSpecialChars \"aaAbcBC \")," 3 (numberOfSpecialChars "aaAbcBC"))
15
+
16
+ test2 :: Test
17
+ test2 = TestCase (assertEqual "for (numberOfSpecialChars \"abc \")," 0 (numberOfSpecialChars "abc"))
18
+
19
+ test3 :: Test
20
+ test3 = TestCase (assertEqual "for (numberOfSpecialChars \"abBCab \")," 1 (numberOfSpecialChars "abBCab"))
21
+
22
+ test4 :: Test
23
+ test4 = TestCase (assertEqual "for (numberOfSpecialChars \"CFuALywXqxoZfVgiHtU \")," 3 (numberOfSpecialChars "CFuALywXqxoZfVgiHtU"))
24
+
25
+ test5 :: Test
26
+ test5 = TestCase (assertEqual "for (numberOfSpecialChars \"ubUZHXCBAVNnrTgmIcqzwsOYhKEaMivSG \")," 12 (numberOfSpecialChars "ubUZHXCBAVNnrTgmIcqzwsOYhKEaMivSG"))
27
+
28
+ test6 :: Test
29
+ test6 = TestCase (assertEqual "for (numberOfSpecialChars \"UPnjoxhgiwqzsStrVfpk \")," 2 (numberOfSpecialChars "UPnjoxhgiwqzsStrVfpk"))
30
+
31
+ test7 :: Test
32
+ test7 = TestCase (assertEqual "for (numberOfSpecialChars \"tyLeVEmcNk \")," 1 (numberOfSpecialChars "tyLeVEmcNk"))
33
+
34
+ test8 :: Test
35
+ test8 = TestCase (assertEqual "for (numberOfSpecialChars \"WUeZbIqcdCiVvsazlOMpwTAG \")," 6 (numberOfSpecialChars "WUeZbIqcdCiVvsazlOMpwTAG"))
36
+
37
+
38
+ -- Grouping test cases
39
+ tests :: Test
40
+ tests = TestList [TestLabel "Test1" test1, TestLabel "Test2" test2, TestLabel "Test3" test3, TestLabel "Test4" test4, TestLabel "Test5" test5, TestLabel "Test6" test6, TestLabel "Test7" test7]
41
+
42
+ -- Running the tests
43
+ main :: IO Counts
44
+ main = runTestTT tests
count_the_number_of_special_characters_i/java_tests/Main.java ADDED
@@ -0,0 +1,24 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ import static org.junit.jupiter.api.Assertions.*;
3
+ import org.junit.jupiter.api.Test;
4
+ import java.util.List;
5
+ import java.util.Arrays;
6
+ public class Main {
7
+ //Program start
8
+
9
+ //Program end
10
+
11
+ @Test
12
+ public void test1() {
13
+ assertEquals(3, numberOfSpecialChars("aaAbcBC"));
14
+ }
15
+ @Test
16
+ public void test2() {
17
+ assertEquals(0, numberOfSpecialChars("abc"));
18
+ }
19
+ @Test
20
+ public void test3() {
21
+ assertEquals(1, numberOfSpecialChars("abBCab"));
22
+ }
23
+
24
+ }
count_the_number_of_special_characters_i/meta.json ADDED
@@ -0,0 +1,52 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "id": 3408,
3
+ "name": "count_the_number_of_special_characters_i",
4
+ "difficulty": "Easy",
5
+ "link": "https://leetcode.com/problems/count-the-number-of-special-characters-i/",
6
+ "date": "2024-04-14 00:00:00",
7
+ "task_description": "You are given a string `word`. A letter is called **special** if it appears **both** in lowercase and uppercase in `word`. Return the number of_ _**special** letters in_ _`word`. **Example 1:** **Input:** word = \"aaAbcBC\" **Output:** 3 **Explanation:** The special characters in `word` are `'a'`, `'b'`, and `'c'`. **Example 2:** **Input:** word = \"abc\" **Output:** 0 **Explanation:** No character in `word` appears in uppercase. **Example 3:** **Input:** word = \"abBCab\" **Output:** 1 **Explanation:** The only special character in `word` is `'b'`. **Constraints:** `1 <= word.length <= 50` `word` consists of only lowercase and uppercase English letters.",
8
+ "public_test_cases": [
9
+ {
10
+ "label": "Example 1",
11
+ "input": "word = \"aaAbcBC\"",
12
+ "output": "3 "
13
+ },
14
+ {
15
+ "label": "Example 2",
16
+ "input": "word = \"abc\"",
17
+ "output": "0 "
18
+ },
19
+ {
20
+ "label": "Example 3",
21
+ "input": "word = \"abBCab\"",
22
+ "output": "1 "
23
+ }
24
+ ],
25
+ "private_test_cases": [
26
+ {
27
+ "input": "CFuALywXqxoZfVgiHtU",
28
+ "output": 3
29
+ },
30
+ {
31
+ "input": "ubUZHXCBAVNnrTgmIcqzwsOYhKEaMivSG",
32
+ "output": 12
33
+ },
34
+ {
35
+ "input": "UPnjoxhgiwqzsStrVfpk",
36
+ "output": 2
37
+ },
38
+ {
39
+ "input": "tyLeVEmcNk",
40
+ "output": 1
41
+ },
42
+ {
43
+ "input": "WUeZbIqcdCiVvsazlOMpwTAG",
44
+ "output": 6
45
+ }
46
+ ],
47
+ "haskell_template": "numberOfSpecialChars :: String -> Int\nnumberOfSpecialChars word ",
48
+ "ocaml_template": "let numberOfSpecialChars (word: string) : int = ",
49
+ "scala_template": "def numberOfSpecialChars(word: String): Int = { \n \n}",
50
+ "java_template": "class Solution {\n public int numberOfSpecialChars(String word) {\n \n }\n}",
51
+ "python_template": "class Solution(object):\n def numberOfSpecialChars(self, word):\n \"\"\"\n :type word: str\n :rtype: int\n \"\"\"\n "
52
+ }
count_the_number_of_special_characters_i/ocaml_tests/main.ml ADDED
@@ -0,0 +1,45 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ module Main = struct
3
+ open OUnit2
4
+
5
+ (* Program start *)
6
+ let numberOfSpecialChars (word: string) : int = failwith "Not implemented"
7
+
8
+ (* Program end *)
9
+
10
+ (* Test cases *)
11
+
12
+ let test1 _ = assert_equal 3 (numberOfSpecialChars "aaAbcBC")
13
+
14
+ let test2 _ = assert_equal 0 (numberOfSpecialChars "abc")
15
+
16
+ let test3 _ = assert_equal 1 (numberOfSpecialChars "abBCab")
17
+
18
+ let test4 _ = assert_equal 1 (numberOfSpecialChars "CFuALywXqxoZfVgiHtU")
19
+
20
+ let test5 _ = assert_equal 1 (numberOfSpecialChars "ubUZHXCBAVNnrTgmIcqzwsOYhKEaMivSG")
21
+
22
+ let test6 _ = assert_equal 1 (numberOfSpecialChars "UPnjoxhgiwqzsStrVfpk")
23
+
24
+ let test7 _ = assert_equal 1 (numberOfSpecialChars "tyLeVEmcNk")
25
+
26
+ let test8 _ = assert_equal 1 (numberOfSpecialChars "WUeZbIqcdCiVvsazlOMpwTAG")
27
+
28
+
29
+ (* Grouping test cases *)
30
+ let suite = "Test Suite for numberOfSpecialChars" >::: [
31
+
32
+ "test1" >:: test1;
33
+ "test2" >:: test2;
34
+ "test3" >:: test3;
35
+ "test4" >:: test4;
36
+ "test5" >:: test5;
37
+ "test6" >:: test6;
38
+ "test7" >:: test7;
39
+ "test8" >:: test8;
40
+ ]
41
+
42
+
43
+ (* Running the tests *)
44
+ let () = run_test_tt_main suite
45
+ end
count_the_number_of_special_characters_i/scala_tests/MySuite.scala ADDED
@@ -0,0 +1,36 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ class MySuite extends munit.FunSuite {
3
+
4
+ test("test1") {
5
+ assertEquals(Main.numberOfSpecialChars("aaAbcBC"), 3)
6
+ }
7
+
8
+ test("test2") {
9
+ assertEquals(Main.numberOfSpecialChars("abc"), 0)
10
+ }
11
+
12
+ test("test3") {
13
+ assertEquals(Main.numberOfSpecialChars("abBCab"), 1)
14
+ }
15
+
16
+ test("test4") {
17
+ assertEquals(Main.numberOfSpecialChars(",C,F,u,A,L,y,w,X,q,x,o,Z,f,V,g,i,H,t,U,"), 3)
18
+ }
19
+
20
+ test("test5") {
21
+ assertEquals(Main.numberOfSpecialChars(",u,b,U,Z,H,X,C,B,A,V,N,n,r,T,g,m,I,c,q,z,w,s,O,Y,h,K,E,a,M,i,v,S,G,"), 12)
22
+ }
23
+
24
+ test("test6") {
25
+ assertEquals(Main.numberOfSpecialChars(",U,P,n,j,o,x,h,g,i,w,q,z,s,S,t,r,V,f,p,k,"), 2)
26
+ }
27
+
28
+ test("test7") {
29
+ assertEquals(Main.numberOfSpecialChars(",t,y,L,e,V,E,m,c,N,k,"), 1)
30
+ }
31
+
32
+ test("test8") {
33
+ assertEquals(Main.numberOfSpecialChars(",W,U,e,Z,b,I,q,c,d,C,i,V,v,s,a,z,l,O,M,p,w,T,A,G,"), 6)
34
+ }
35
+
36
+ }
count_the_number_of_special_characters_ii/haskell_tests/Main.hs ADDED
The diff for this file is too large to render. See raw diff
 
count_the_number_of_special_characters_ii/java_tests/Main.java ADDED
@@ -0,0 +1,24 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ import static org.junit.jupiter.api.Assertions.*;
3
+ import org.junit.jupiter.api.Test;
4
+ import java.util.List;
5
+ import java.util.Arrays;
6
+ public class Main {
7
+ //Program start
8
+
9
+ //Program end
10
+
11
+ @Test
12
+ public void test1() {
13
+ assertEquals(3, numberOfSpecialChars("aaAbcBC"));
14
+ }
15
+ @Test
16
+ public void test2() {
17
+ assertEquals(0, numberOfSpecialChars("abc"));
18
+ }
19
+ @Test
20
+ public void test3() {
21
+ assertEquals(0, numberOfSpecialChars("AbBCab"));
22
+ }
23
+
24
+ }
count_the_number_of_special_characters_ii/meta.json ADDED
The diff for this file is too large to render. See raw diff
 
count_the_number_of_special_characters_ii/ocaml_tests/main.ml ADDED
The diff for this file is too large to render. See raw diff
 
count_the_number_of_special_characters_ii/scala_tests/MySuite.scala ADDED
The diff for this file is too large to render. See raw diff
 
count_the_number_of_square_free_subsets/.DS_Store ADDED
Binary file (6.15 kB). View file
 
count_the_number_of_square_free_subsets/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 (squareFreeSubsets [3,4,4,5])," 3 (squareFreeSubsets [3,4,4,5]))
13
+
14
+ test2 :: Test
15
+ test2 = TestCase (assertEqual "for (squareFreeSubsets [1])," 1 (squareFreeSubsets [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
count_the_number_of_square_free_subsets/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(3, squareFreeSubsets(new ArrayList<>(Arrays.asList(3,4,4,5))));
15
+ }
16
+ @Test
17
+ public void test2() {
18
+ assertEquals(1, squareFreeSubsets(new ArrayList<>(Arrays.asList(1))));
19
+ }
20
+
21
+ }
count_the_number_of_square_free_subsets/meta.json ADDED
The diff for this file is too large to render. See raw diff
 
count_the_number_of_square_free_subsets/ocaml_tests/main.ml ADDED
@@ -0,0 +1,26 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ module Main = struct
3
+ open OUnit2
4
+
5
+ (* Program start *)
6
+
7
+ (* Program end *)
8
+
9
+ (* Test cases *)
10
+
11
+ let test1 _ = assert_equal 3 (squareFreeSubsets [3;4;4;5])
12
+
13
+ let test2 _ = assert_equal 1 (squareFreeSubsets [1])
14
+
15
+
16
+ (* Grouping test cases *)
17
+ let suite = "Test Suite for squareFreeSubsets" >::: [
18
+
19
+ "test1" >:: test1;
20
+ "test2" >:: test2;
21
+ ]
22
+
23
+
24
+ (* Running the tests *)
25
+ let () = run_test_tt_main suite
26
+ end
count_the_number_of_square_free_subsets/scala_tests/MySuite.scala ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ class MySuite extends munit.FunSuite {
3
+
4
+ test("test1") {
5
+ assertEquals(Main.squareFreeSubsets(List(3,4,4,5)), 3)
6
+ }
7
+
8
+ test("test2") {
9
+ assertEquals(Main.squareFreeSubsets(List(1)), 1)
10
+ }
11
+
12
+ }
count_the_number_of_substrings_with_dominant_ones/haskell_tests/Main.hs ADDED
@@ -0,0 +1,41 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ module Main where
3
+ import Test.HUnit
4
+
5
+ --Program start
6
+ numberOfSubstrings :: String -> Int
7
+ numberOfSubstrings s = undefined
8
+
9
+ --Program end
10
+
11
+ -- Test cases
12
+
13
+ test1 :: Test
14
+ test1 = TestCase (assertEqual "for (numberOfSubstrings \"00011 \")," 5 (numberOfSubstrings "00011"))
15
+
16
+ test2 :: Test
17
+ test2 = TestCase (assertEqual "for (numberOfSubstrings \"101101 \")," 16 (numberOfSubstrings "101101"))
18
+
19
+ test3 :: Test
20
+ test3 = TestCase (assertEqual "for (numberOfSubstrings \"1 \")," 1 (numberOfSubstrings "1"))
21
+
22
+ test4 :: Test
23
+ test4 = TestCase (assertEqual "for (numberOfSubstrings \"1010111010 \")," 34 (numberOfSubstrings "1010111010"))
24
+
25
+ test5 :: Test
26
+ test5 = TestCase (assertEqual "for (numberOfSubstrings \"0010100001001111110110010010001010111111010111011000110010110010011100101011110011010010000101010100 \")," 333 (numberOfSubstrings "0010100001001111110110010010001010111111010111011000110010110010011100101011110011010010000101010100"))
27
+
28
+ test6 :: Test
29
+ test6 = TestCase (assertEqual "for (numberOfSubstrings \"1000101010001111010001000111110110100101100001011001011001100000000100011100011000101111011010010100011111101011100110010110100001110010111011011011111101100101111111001101011010010000001001101110111011110000010101100011011000000001010110100110000000001010101000101101011111010111101000011011001010101000111011101110101111101110011011011111011101010000010000000001000011110101010011001010110100101100010101011011011110110111011110011011111010101001101000000111000001100011010110010110100110101101000100111101000111110110010101110001001010011010010111101001110001100011100111000111100001010001100010000010110101110010010000000101110100001110000110100110000111001001000100011010111011010010111101111011001110110001001011110010111100000110110010101000101101110100101110111010000011100111110011001011000111110000110100011111101110101101110100100010001111100010110001110000010110011110010001001010000110101111011101100011101011100100011100010101110100010000101001111001010110000000111010111111011010001110 \")," 3489 (numberOfSubstrings "1000101010001111010001000111110110100101100001011001011001100000000100011100011000101111011010010100011111101011100110010110100001110010111011011011111101100101111111001101011010010000001001101110111011110000010101100011011000000001010110100110000000001010101000101101011111010111101000011011001010101000111011101110101111101110011011011111011101010000010000000001000011110101010011001010110100101100010101011011011110110111011110011011111010101001101000000111000001100011010110010110100110101101000100111101000111110110010101110001001010011010010111101001110001100011100111000111100001010001100010000010110101110010010000000101110100001110000110100110000111001001000100011010111011010010111101111011001110110001001011110010111100000110110010101000101101110100101110111010000011100111110011001011000111110000110100011111101110101101110100100010001111100010110001110000010110011110010001001010000110101111011101100011101011100100011100010101110100010000101001111001010110000000111010111111011010001110"))
30
+
31
+ test7 :: Test
32
+ test7 = TestCase (assertEqual "for (numberOfSubstrings \"1000100000110011000011000101010001110110100011100011001000100010100100100001010110111011100110010110000110000100010101000001100000101111110100001000111111110010111111111100100101111110110000101101000100010001110000010100110010101101011010010110011000100011110000101101010111001111110001110111010111010010001010110010100111110010011011010100101100010011000010000010001111010111011101000000010011111110011011010110110100111110001011101010111000000100011000100101011000000001101111001111100111000100000001001000010000110011010011101000111100101001101100010111101110111000100001011100001001100001101000110110010110000011011000111100111101001010001101000101111001100110100111110000011101101000011110100010001101101101001010100110000011101111100111001011001110011010111000000000100111101111101001100000111001111101001110010010011110101111100101000100011101000001010000111111101100000101110101001011100001011010001010100001110100000101111100000101101011111101000100101000101100000111001001100100010111010011100101100101100001110101101000011000001110101001001000111111101110001110111111011010110011011101001100100101101111110110110001001011111110011011100001101100000111111011111111000011010000001111111000111010010100011111000011101110001010010000010000110001000100011111111101110101100001011010001110001000010010000111010011101011100000001100101100010110001101011011111100001100001111000011001000110101110011101000001101000011010001011010010001100101011100111111101000000110110000000110001100110100110110110001011111111110001000111110100110111111110110001111000011100011010001010011110101110100011000100101111101110000110110011011001011011000101011001110010110001001001101011001001111010110111110010100111101000100110010100101010110101111111011000111111110110011100100010011011000110000111001001111010101001001101011001100001101010100100100110011001110011011111111001011110001010101110100010010011001101101000100111100110011110111011010001010101110110000011011000101011000101111101001111010010011011001110110001001000111001111101110010001111001101011001101011101111011011010111010100011000100011110110010110011000000001010100000001000000111010001001101011110100110011111100011001001101100001000111100001100110001111001100100000000000101011000011110010000001110011000101010110010100010000001101001110100110010011011000001100101101110011001111001010101011110010001111010001100001011101100101100110011000001010011111110011110110011110100110011101000000100101000011001000001101001110111101011101100001010111001001001110110001001011100011110001001101001110101000101101011010000010011100000000111100100110110001110011110000101010111011101111110001111000010101001111100000101000000101110011110001110011101000101101110010011101011100100101101011010110001111010010001101000011010000101000010000111010001001111001001111000110111111101010101101110010100001001100100110010110100110101010111110111110111010000011011001001111100100110010101010100100111011101111101110101100010011110110110100010110010110111100100110011011100011011101111000100011011110000000011101001111111101111110000000001001011000010010100000000111111000000001011011101010010000000110111011000010001110111110110100100001110101100001011000010001110110111100011000110000111000100010110101111000011010011011111100010001011100100011111011110000110001010110111101101101000001001000011101011101101000010001000110100000110010111100100001000100010010111101001110101100011011000001011111101001000010110101100011111111010000001110010011101100000000101101001000010011001010011001111110000111000100110110101001001110011001101001100110010001011100011001001111000101000011001000000101011110010111010111000100110011111000111010111110110100000100001000110100011100000010110111001010111010010010100110001010111100100101001000101001100010001001111001100100010111010000001001010000010100100001100100101001000111101011010001010001010111010110101100001110100101101100000001011100010100010000010011001000001110100100011110111011001010101111011000001111000110010011011010110000111011101000111001011111010001110000110110001011100111101000100001111011110000111001001011110011011100001000010011110110101100000011010001011110011001100111110011011101100000011010101101111101010111000001111001001000101000000000101000101000111110001010001000001011100001101010110011001110101000000011110110010100100001000011100100001000110011001111110001110101101101110110010000110110000000001100110111010000100110001101000101001010110101111110010000000100010010110010111000100010011110110001110101111111100110001110110110101100010010111100000110001001011100000101000101010110001100001010001001111010110110111111100010100111101010111010001011101101011111011011110010010010101100100000111111101010000000011010101010011011101111111001110110001010000001110100011111000101110011101001001111111111100011110111110110001010101000111011110000100001100010011011011010010110100000101010001010110101111101111110000010110011110100011111010100001010000000000110110110110110100011000111100111101011000001110000101101001000101000011000100101011010000011110001011110011100101011100111001011000010010111010000010000010010011011101010101100000110010101110011111011100011101001011110111011110110010000010011010010111000111110101001001011001101000000101101010110111010100000111000000111001000011110010111111000010011111011011000110001001011010011001010111010000101101011110111111101101101000000101111010101111011110011110000010001100100101010001100101001111110101110101111001000101111110010110001110100100101001010101111010101010000100101001001110100111011001100010110101010010101001001010110001110101010011000110000010010000000001010100101111110110000110101010110110101010000011110010001101001110111100101111101100011110010100001101110000111000010111001001011110100111110100011011000111100100010110110011110101111110011000101101000001101110101001001000100001001110011110111010011101100111010001110000100111101001110101101011111110000100101000010100001111001110111011101011001001110010101100101011100011110101101000101110001011111000011110100001010101001110111101100110100010100111000101000110011011010010100100100010000111101111110110010000000011001110001001011101010110100001010110100000010000111001100001101101110010010011101010100101100001100001111010101111100011011100001000101101000011111010011111110111010100000101001101111011010100001001011110111001000011011001010101100100011111100001100010100010010110100011000101000110011001111011011100111010000001011110000001110001111011100100101001000111111010000001010011001010111100010100111110100100010011111111110110100111111001100001011010111011111111100111000100111010111010110000101111001010000010100101100000110111111010100000110111100001000010000011010011011111001011101011111101100100100100111100011000000000110011000001011001011001000001010001110101010111100111101101100011010010111010111100101000111010011011001110110100100111110011101111010011000100001101100111001010010100001111100001101000001100011111001101111100100011110010001010111010110110001001101110111110010110101110001001111111101101110000011111001100001101011001100100110110011111011111010101111100111100111100001000011010001101010100111010000110111111111101011100000010111000101101101111000001100110010100010001000000100001100010011011100111011110111111111001100001110001001100001011010000010000001001010010011100111110111011011010010100011011000011110101000110111011011011010111010010010011101111010001010111111011110110011011110111111100111100011101001010011011000100010010000111101111111011110001101001101100010000010000111101001011101010100110110110110101011011111001001110011011111011110011010010101101111011101111111000001011110111001001101011000110010010100101000000010110100101110110101100111011101110110101110001001000111010111001110101001001001100100011101101110101101011011111110110000000001000101100111010100001010010010111101011111000101010010100011000110001100110000010000100111111001011000011111101001001111010101110100010111001111101110010111011110100001101011100101000101011000100110000111001100111010000110011010100010110111111010100011111100110010010010011000011010000001101111110111111010011101100101100011110001000100001110010111001110110101101111010001011011010110101001111010101011010111111010010011111011011101101001101001100001000010000010011001001111000001010110011000011000111000010100011111111101100110000001011000011011111001010010001010110110100010001001111011000011111001011111000010001011000110001000010010000011000010010101000100100101010001100100011110001011001010011110001100001011000100111110011110101101101010011100110000000101010010100001101000001100011001100001111001000110110110011111110001011101111011011111010010100001101100011100001000010111110011111100001010100100101111110110011010110100011001100111110101110110000110100111111000100101010111111010011000001001100011001111010000011111011111110001001100101000000001010101000000000100111000001111000110100010000100001010010000010010010110110001001101101101011100010001110100010011001001010000000101110010000000110010010001110100011010000011101110011011000101111001001111010000000011001100011001000110010111001000100000001011110100001100010000111110100101011101011001000110000010000011100100100100000100111111110110110100001101010000001011010000111000101001101111010011110011001101011000011100100101000100100100110100011010111110110010010011111011100100000110100000110000010001000110000010101100010011111100100000111111010100000111110011111100101101000101100100111100101100111110101111101110011111000001100001111111000010100100000000001101001100100101001101101011110111111111101111000111100110001011010000100100000111111110010010101101110110111101110010101110000111011110010010110111101111100101000110000010000000110100110111011100110010100010000000000111110110101101111111100001011110011001100010101101110001110100100100000101000000001101101011100010000100111000111001111100010101100111000100111000111011000101001010010111011110100011111000111011111001010000010100101010101111010000110110001110001001000011100010100001010001100111000101101110000000001000011000110110111100101110101111111100001011100001010100001000000001011010100111000000110010110001001011101101001100011110111111110101010000100100101110101000011110101001101110100001001100011111100100110110100111010000011101100111100101011011100010100101110011101111000101111110100111001010010101010011011001010010011110100010111111001000110011000001010111110101010101111000011010111000001110011000011110101001101010010101101000100100011110110100001001000001001100101001011101100011011111001011110001011010101110001111010010001111011101000001010101101010010101001101000110110000101100001001111110010010010011001011000000100100110000001100001100101000001111101100010101100000011001111001011000001111001111110001100100100111000010011001100001011101101101100110001111010111001010011001010011001011111010000010101000011100100101101100100101001100100100011111010111101111110101010011011000110101110001010100110000111111100111000100010011101111011100000001111100001101011001100111101001100111111100001111101111101001101101001010110100111100000001011100000011101101110101011001001100010111101011010110010110000110100101111101001010100010111011010011110110101011111100011100111011111011110101101101111100011100110001011111111011100101010010100011001101100111001001110111100001100110000100100111101000111100111001011110111000101011110000100011100000000100101111110111100000000011100010011101001011010001100001010011101010111011101000100111010011001101101000001101110011101101100111111010011101001110010100010100110111001101110111101001011101101000011111010100100100000000001001001001111100100101111001101001100010010111001110101011111001011001000100010011001011001110101010100000010011100001100000011011001100010100001101111001010001111000000001001111100101111110110011010110010010000000100001000111000100111010100001110110011000001110001001010101011011011000100100110111000101001101001100011110001111010011010110100110011111001011101111011000010011101101111110100111101111000110010001011111111111111011001101110011111001111010100110101100110000011111011011011001101110100001000010111011100111010000110011100010000010001011010100000111101100000110111101010000010101101110101100110000110000110110100101000111010101001001000000111101000000111001010011000110011111010000010110110111101110000101110000011111100111001110001110001011101000010101011100010000100010101001110111010100011100000010101110000111001001111111110010001011011101111100110010011000010011111000000011001110011010011100110010101000001001000001011000100100001011010110000011001111111100110010110100101000000010011111110100111110011011101100101110101110111100010010001010001101110111110111101011101000000101001000100100111101011110011001101111111111010100001010001001110000000110110000101010011100101000100010011100111000000111100010010010000011110001101000010111111100110011000111011010001000111101100111110110011001000101101000001010110101111001100010110100011111111100100101011100101000110011011001110111001010100110000011111011011101000011101000001000001101110101001000100110011001001110011111100101111010100010000100100001001100110010001010000111101011011110110000100111000010010100111111011110011010011100100101000110001011010100100010101000001001000110011000011111100010010000001101101011001001111001011110101010111111100010001010110011101110101011010011000111101101001110011010100101000111010001101011110100110111101010010100001101100010101110100100010100011101001101010100101100100010000110100100000100110011101111111101101101010110001000001011010101110011001010110011110110110011101110110001101100111011110000101101111100011100100011000011011001001111011000001110011111010010011000001100001000000101000011101010101100011010110101001100101110011011100001101001111101010010001001110111110111011011001110000111010111111100000001110110100000001000010011001001000000111010000011101110010010100000100001011111110000110101110000100111011001100101101101011111110100110110011101100000110100111111011111100011101110000100000000011100101010000111101000010111011111100010000110000111110110111010001110101101100011100111110011000110010100010111111100011011100010101110001010001010011000111001001100101100101101101010110100100001101001100011100100110010100101100000000111010001011100000110001000100111110111000111001110101001111110000111011011111011101110111111110100001001011100101010010000010000000011001101101001101100010001000000001011111011001011010110001111011101000110110011111110011101010111101011101011111101001001011111010101100011001100011001101011100010011101011000100111010100001010110010011001001000111111001111011001101111001000001111100000001010101111011011010110101101010100000000111110111111100101111010001000010110110010100110101101000100001001010111101101010001111110100110100001100100001111111011010000110000100111000010101111110100111101110100110111111010010011101111001110001101000001010111001001001000110110000001111101000110111100101010110100101000000101010101000010110101010110011111100101111110001001111100010101011111011101000110100010101100101110010111001100101101111000011111000111101011100010011011001001111010011000100110011111001111001111111101001101110101100110111111000011010101001011001011011000101111000110111001011100001011100000001100100110010100110011000000011011000001111011100011100111000111100111001111110011000101000101011000111001011011101100110010101111000110010100010110000011100001010001100110011100110000001101000001100100100011110111111101100000010110000100110110010001100111100100011011000100110011110101000011001100100111000010100011101100011101000100001111111110010110101111100100100000101011101110000110110011100010001001100010101110010011101110001010001101100011001111000000111000001001000001100001101000010011010110000101001000110110101010100011101010001101100101101011000111100110111010010101010100000110111000100101001011110100000100101010110010001000111010001000001111110100111001110110111110010111011111111101101011100011010111101000110001100000111111001010000011010000100001111000101010110101001100110010011111000101101000100010010101000001001011000101000111111110111001011010011011111111100110111010001111000010000110111011011011101010110001100011101000111100011001110001001010010001101111111011100011101111101100111010011111001110111001001010101100011111111100011101100110001110110011101001100111001101000001110001001101110001111111001101000100010101100010100010011010011010000100110100110100000101000001011111000000000010101010111111110100000111000100011100011111111000110111010100010111111011000001011110011001000011000110011110100110001111001010000111011100001000010011011010110111100100101101110100000000111100010111001101111110110011111000000100111100101110101011110110101011010000000110101111010101111011101101001100000111110100001001010111000000010010011111011011001100000110101010111110011100011000110110100010100100110010111001000010101011100100001011011011100111000110001111100010110101010110110111101011001100001011110100011101110000000101001101001111011001001001101011110111001011010001110000111000011100001010010110011101110110010111110101000100011001011100011000100001100000100001010010111001010100101011111100010001101010110100010001001110100010010011110110100001001000101100010010101000110111001101011101100110011011000101011011100011101110000101011000101101010100101100110010111010110011011111000111101111001001000110010011001011011011110000011100100101110110000001111010001010010111001001110111100001110010100111100001111110010110100110000110000111011011011101010000011000011101001111001100001011110001101100110011111110010101011010001011101000010110101111000110100000010111011101010010110110011011111111000100110110100010110011101100100011110000101000001110000001000000001011101011100110100100010110001110100010110110110001101100010110111110101001010000100000011101100110010110100100011011011000001101110111011111100000001000000110101111110001000001010000100000010001011000111101111010100000010011001101011010011010110111000000000110111001011010001011011011011100100011010001001111111001001100111101011101011011101111001001000100111011011100100110100100110010100000000011100001010011000110100000111001100111101100100011011111010000001000110100110110011101001000101100110010100111001111101100111101010101101100111010000101100001011100011101100010100011101010111101001010100001111101011111101011000001011010101011110000000010000100010000001101000010010001011001000110111110001000100101000000001011110110011110100010001010001001001100100100111101010011010001001101101010011010100001010110011100111000100101100000010110001001110000110101011101011011000101011110011110010001100101011011101000101110100100111101011111011100101100000100001010010100111001001100100011010101101011111000101011001000101011100111110111100101010011100100000110100000011111001111000110100010000101110101011001010110111001101101111010111100100000011011100111011010100010010110011000010101110101110001111010110011111011001000100011001110010100100100100111111010110001111100011010100100000111110110011100111000100011110101011101101000010000110000011110010011001011111010111001111101101000101001000000010101100001010100011101100111101101100001100001111110001001010110011101010101111001101010000110101100010100000001101001110101111001110011111010010001000011111000010000010100100010010011010010100110100100011100111001100001111010011101101001100110000010110010000111001000100000111101101110110111101000101111111001000110010000101001000111101000110010001010110000101001101111010001001110100110110000011101111011111101011111100011111101001011000101000101000111010100010111110111010111011100000010110110100110010011000111001110000000110110001001011101000101010011110101011000000101110111100000001011101000101000110001000100000001100011001101110101000001110011110100001001101000110011110000111010010011111111101011010001011001010011111110111110011010101010010000110100000001001111000111000010111100100110011001000001110000000000110100010011100011100001100000110010000011000010101111101000111111111000110100110001111000110111000101001100011110010110100110110010001100011111000001100010111110100011000001110110101100110100010010101110001110100100100111111011101101111000101000111011111000011111111000010111100101011011010111010101000100000010101100100101101010001011110011011100000100001110101011110010001110100101001111010110111011000110110100100000110011101110000110010001100001000110001011001101010000011010010100101000001001100111001111011000000100111011010101001101011100101110100111101111010110100001101100011101100001101000011111010110111100011000110000010111010111111000001010111100001111000101010100011100000110110010010001011010011101010010011110101000111100000011100011010000000110110001000011101100100000010110101100111000101100111101100101100111001110001011111010111111111101010111101100101100111011110000111101011101001100001010100011011001110111110101111011001111010100010000000010111111111101101010111110101000110111010010101001011100111110010111101111000000000110011111101001101101111110101010011010111011111011101001111001101101101000011101100001100000111000111100101000010010000101011011010010011001101100100110000110100011001000101101101110101101101010100011011100101111001100010111001101100010010011000110100010010101101111101111000001000010101010010010001100001011111101011110001101010010010001010000010100110011111010110101111110101001111101000101000011000000100110110010000101010110010100010011111000100001100011010100001110000000010011110000011000100000111011101000111111000001001011110010000110001101100010110011001001001000010101100110011100010001110101110011001100001011100010001001100111011010111001001100011001111001011001011011100100001010111010001111110101011111000011010011101101000111010101010110111111010000010011010010011011000000101110111110111111001000111011111101010101110000110111011011110110001111101100110111111101000001111101110110100110100001100110001010000100110011000011100011010000010010101011101001100101110010000100011100011011011011011100001011110000010100001101110110111110110001101100100000111111010101111000111000000100111111100010101100111001011000000011000011001101100011100110010111001101110101100110010011010011001110101011000010111110111001101101101111101110101011110010001111111100000101111111010101010101000000101010111101101010011000010100011111000000001111110100111000000101100010100101101011111111010000110111010000110001101010011110001110011100111001111011110111111001000010011111011000101001011100000110000011010100110101101111000000011111110111110101000001001000111110000101000000010100111011001100110110001001010011111010010101101110000011001000010111001111001001011100010111110110011010001010110001101000001100111010010100001001110010101010110010000100000110010110011100000110111101100111100000111000100101011101001111000011000100100101011110001001101110111001000011100100000100010011001100011101000111001011110101101001111011011010011111110111000101110000100001001010001010100001100110000101100010011000100011010000010010101011010110011001000101101100000110101111110010110001001011111110000111000110101000100000111010011101110100001011000110001010010001100010101100111101101000100110001100101100100101000010010010100001101011011011101110100010010010110011101001000101110100000000010101101010010001110010111001011111111100111111101100100101010000111011100111000010110101000001110110110001011100011111110110000110111101010011100110000010001110001110000110000101100100110110111101010110001010010100100001001010110000001100110100100110011111101000011010110101011111000111111100110100111101110011100111011100001111011101100001110001001010010101111110111001111001000000011100010101010001010100011110101011000000100110001100100100000111111011110011100111011100101010010110010100111011011101101010111001111010100000101111100010010101011001010001001010001001001111001111001000001101010101111100111101110101000010010110100000101010001111010100101110110100000000010111011101111100000110101101100010111001001010000011100000100110010000111101001011001000100110100000110101000001011111100111001111011111111101111000101110100010100100001110011000111000010101010010111110010011100011110110001011011000100100101100101000100011100101111010000010111100011111110000101000010011010011101010001001011101000111110111000000100110101100010100101001010111100001100101000010111100101001111111101001111110011110001011000001100011111101100110001010111010110100010001011111011100011001001001000111111100000101101011000100101011001011011001110001101100000110100001001111100111000110011001011010101000001001101100110111110100100000101001000011010110010000011000100001101100111000011111011100110100000110111100000110000100010110011000110110001011101010010001001110111000000100101111100111101100011101101001000010011000001000001011010011101101110001101010111100011110011100100111000110101000100111111111000111000111010000000011011100010111101011010101000110010110011000100101000011100011001100011100010010110010100000001111110001111010111011011100100110001101110000101000101110111111000101000001100011011010110011101101011110000001000111011101001000001101100000001100111101111001101111010010011001011011000010101101010011010010101011110111100001111001001010011101100010011010101101001110110001001000100000110110011001111110011001010101000011011100001100100011101100011000011000111110100000110011100011110111011100101010010101110000110111000101000000100011011111011001101100001011111101011110101101100010001100001011011011101111111010100001000110101011011111011001110010100010101000110010110111111000011010011110011000111000001011000111011100010010110011100110100101110011001001010000100110011001101000001101101010000001011111101011110100010011001101111111001111100010001100001000000011100011001000000001011111010001110110000001000001010010110000011110011101001011000101001010001101110000001111010111001000010010110010010111101101010111110100101100100010001010110111111001000011111001000100100010010101101101000010000000101000000111011001011011100110111010110110001111100001011000001111011010010101010111100100011011110010011010000011110010110000110100111011010000010001001011000010100010011110111010101111101111001011100000001110110110011101110100000111001010011000001001000000111111110000001100110001111111001110111000111010110101111111111111001010111010110111000100100001010111000000010000100000111000100100101000101101011010011000100100111011000110001001101001011111011111111011111001000001111101001011111000000000011000110010110010000011100001111010110001100001110001110101010100100111110110111001011000011010001011111010110001100101010110111000110011111011010011101010111001001110001110000011000010100011111011101101011011100010011111010000100001111110111100010011110000111110101101110110100001110000101101111110011010110000100000111110111001010011001101011011001000010101010011011010010000111000100011110100010101110001011010111110111100010101111000001101011101011001111000101100001001011001101001010011000011010011101011111110101011101000101001100110000001110111001101010001000111111011100010001100110000010010110110000101001000001000011001100010110000010010111011101001010010011001101011010011010110010100100001110001000110101001010110000101101010100001000011001010011111100110001110011101011111011011010010001100110100100000000001000110111111111000110101110011010010011001000001010001100110110111100110011110111100010111011000011110010101110110011100000100001101101000011011110110100100001010001101000110011000100110011101000101110110000010001101000011110001111110100010010011001110011010011101011110001000000101110110111101001001001011010000111110101111010010011011111101010111110110101010101100110111101100011011011000011100111100100010100001000001100110110011110011010110111010001001011110001010101100000110010000010101000001110110000011110000001100000000111111100101100111001000001100011001101010101111011100000101110010001011011011010101101110000111000010101011001100001010000101011001010101000100111001100011101001110001011000010100011100111010000101000011111110010000000100100110100000000101111100011001100111010100011001001000110001000100110000010010100011101011101010011011110111101110100101010011000101010001110010111110110101011110101010100101011010000000010001110010000101001100110010011011111001110110100001011001000001001010010001001000001100001111001100111101000111000100111101001010101011000110000000010000110010010010011001000001010001000000100100101111001000011001000110111101011001010000110100010011011110001100100110110101011101111110000011000010010010010100001100101100111100001010010111001101100000000100010101110010011101010000110100100100111001111001011011101001110000110111011001100001100001000001010000100010001011001101111110010111000001010010001000111011000110001111100100000011110011100110010101000111101010110001000011001010011110011111000100100011000011110001000111011010001110011101011111011001000011101010100000001001010011010111101000111111011001111011111000000001100000101111100110010000110101001100010111111111100010101111010011100010011001001010110101110010010001111001000011101011110000011001111011100000101111010000000110110110100001011011110000010010011011000011001011110101111100010101011011111111110011101110100000100011001111101011111111000010001111000010110110011010001001100011111001011110001010010011110000101111110010000111110011000011110100111100000100011000101011100010000000010100000011011110101000101000101101001100111001111101101010001010010010010001001101100010011011011100100100101110100100011010011011001100110100000011100000101110101011110110100011000001000100101101001100010010001000100000001100100000001000101010101110011100001100100100011000001000110010110101010010100100001000110011100000110100111111101111000110010111001100000101011101010110111110011000001001010000000010001001101011011001011000111001011110111100011010101011011100110110111000011000000101000110000010110110110111110000110110001000101000110001010011010011001110111001100011001010010100110110010000110011010011100100111101110101010001100010111110101010100001111001001000010100100110111100011101101000101001100001110011100110101001011111000001111110000110000101010101100001010000100110010100011111100010110110100001111000010100000011000000111110001010011101001100111000000000011011010110111111111101110110000010001000001001010111111011100111011101101100010011011101111000100010010000000111100010111000000100111010101001110001101111001001010011001000000101100001110001010101111111110011001111001101111011110000010011111010001000011001111000000110101111001110000110011000111100111111011010010100000001001100100001101111101111001011011010001001101010101011010110101011101001111100011011110110000111100001000011001010110101110010000001001111010000110011111010001101010100101100101110111110000011110000100011101110100111111111000111100011110001011001000101111000101101000001101111100000000010111011011000101101110001100000110111001110100110100111101111101010111010111110010101000001110011001100111110011111110000010010101101001010100111110010110001100010000110000100101100011111100000001010011010111010010010111110010011010100110100101010100010100011110000000111010110011101110101010001100110000100111111011011000011100011100000000111001111000110011100110110110101010011011111001000011011100011010111010100111000111100100001101000001001111101000001110011110111010010011010111011111110111000101110001001100110010001010100011100100000101100100100011101010110001100111100100100100010000101101001100000101100010100011000101111101111111110101010111101000111011011011100010011000001111001111101111000100001000110011010110101000010001101100111011011001111001101000101001011001101000010010100011001000000000100010101111111110010100111011001010001110110001101010000100111111100011110101000010000101110101010110011011000010100111000010010110101000010000000010100011100100100001100001111111000011101111111011011111000010101011100010111001010011000011111110100101111100011101110000101111101100101110110100110100111101100110100100100110110111011010110010110000100010111001100000001101011100100000010101111001000100101110110001011100010010111100001000000110110000111010100111000000100100010111001011101100111001100000111101011111010000111001110011011000000001010001111011100001001011000001100000111100110110010101100111001110110110001111111010010000001101010111101000100110001110110010101001100100100111111001010110111011101100000110001111110011101001010010111111001001101010001100101111100100111001000011110010111101111000110110011010010010011101101000010001110110001101001111110010001110100001100100000110010001011011011010010001111100100110111101001100011101110100001011000011011010010010010110100110110111101011011101010010010011010001111000000001101010010100010011011110111010000101010111111010011101111000010011111110010001010011010011000000100101101000101001011101101111010110100011001111000101110001110110110110010000100001110010000000000101111010110000110110100100011001111100101111001001011111101010011110001001110001111101010001110110100010111111000100000011110101101101111010111011101110100110101100110100001100111110001110101111110100110001101011101111100001100000001110010100111100100010000000000111101000110010100001010111101100000001011000101001010001110111101110001100000111010101100010100110001101001110010000110000010100111001011010000111100000110110110110010001110110010011000110101110110110001100010101000000111110111000110100011010000110011101101100001100000110000010111010001011011000100011110000100110110110001101001101010100001011110111011100011010010011100001010101011001100111110101011101111000010010100001000010110110001010100000101110011011111100101011110010000110110100111111010011000011010000111111111110111010010011011110010111001011000010110111010110001100001000000010011111101011001000010001011010110110101000001100111101001001101110100001010111000011010111111101110111100010011010111110000000011110101111000011100101011110011010001000110001111100010010100010110110000101000010000110101011000010110101110110111111101001101100110111010000001010100000000010110000111110001000111100000101000010001111010111101011010000101001001010101111010000101110010100111011001000000110001001011001000100010110110001111001011010111101111001000111010111001010100111011010000101111110000111101110111000000111101010010011001010111001101010111011011100111110001000000111110101100001001000110110101111111111111010000000001100011111010100111110010101110100010001010011111010000100101000110010111111001111001111111111111110000110101010000010110011001111101110100110011011111011001101100001100100011010111111001011110101011010001110110001001010010100110011000001001000001100101101000000101000010011010111100001011001000001111000101011110001010001001110010001011000011010000000011110011000001010101101000001000001001100111101110111100101111001111000000010100001110101111100010001001001001101111110000111010111111011011001011111000111101010010000110011100011110101110101100000101010110111100110101000010000101011010110110011100100110011011100100100001001111000010100011011011001011010111111011101010010100010100010101111010111110010111100011001010011110110000111001000100110100000111111001100100100100000101110110010111001101100111011110010010010100101011101011110111111011000110010101000111001111011011000111010011010010111011110011101010101111101010110100101011010110001010101001100011001011010000011001101011001111001100100001000000111011110110110000001000111010011100001011001010001110100001101110111100110000010001110100010101011011001101110101000000011111001100100110010001110000101010100001101111111010111010010110010100100101000000000111010100011001001111001101100001011011010000111011010101010111101001101111101111100100100001111110010000011101110011101111100101001111011101101010111010100100100110101110111111111011011011101000100000101100111111000111000100110010001011010110010100111000111000001011100100111000010110000100010111110010101001001111111101001010110100101100101100110111100011011000100100011010111101010110001001000110100111001001101011001000001000101111110010111001011010000110100111111110100010101100010001101110101001001001000000001011100010110010100111111100011010010000010000011011111011010100011101111001110110011011001100010011010010101110101000101011110001001001000011000010011000011011100000111011011011111100001010111001011001101001101110101010011011001010110001110001010001111000101101100011011001110001100000010110010110100001111010010010010100000010011010001100110000100101001011100101001001011000110100111000101111110001101010011111110000101000111111000011110111000000100111111001110011100011110011110001110111000101000111011100111111111110100011000001110001111111110111001111010010001110001100011001101000010001010000011001110001001001110100101011011111111011011000010111001101000100111110100011010000111100010010010010101001110001101001011010111001000001010001000000101000101111000010000000011111100101010000011101101100110011110111011010000000111001000110001011100001100001111100011000010101111111101110011010011010110110001011011111010010100001010010001110011011011010110011000100011011010100101111101001010000110001000100100001111111111001010000111010011011011110001111011001100111010000111111000111011001110011100110101111111001000100101111101100101010100011011011010100100110001101011111010001010011111110111111001011010001000100010101111010111010010001111011111010111101111001000110110000011101010000100010011010000100101001011011110001111101110000100100111100001110000110110111000000001111100111111011001111111111101001100101111110111000101010001000011111110011111010011100011001011011111110000000010001100010010010100100111110110111110010011101111101111001001000110110010110111011101110111110110001111000100110001011101000010011110010110101101110100110010111011100110000111100010101110011010010011011110110011111010111101100100010110100001100010011100110001101011000110000000110011001010010010000010101000111000011111111101101010110010010001101011111111100111110010100001100000110000100110000010000111001101110010101111110000100011001011111010000000110010100100011000001100001100011100101001011101000010001011101100000010010011101010011111000011111001111100110110000111101000100111011101100100110010100011010100101010110101110101001101010101001110001001110010100011110000000100001100000001010010000110100011100101001010111011111111001010000100001001001000001101001111110100001000111101111001110011000001000010000111011101111001001111111011011001010000000100101111000011110111010011110001100110111100001010110010100100100000010101100110110100011110000100010101000111011011110100000010100100011000010011010101011111000111101100000010100001000010000010011001000101000000001111101100001111101100010010101110010110111010100011100010001010001110111010011100001111101001100010100101011111111001010111010100101011010101110001001011000011110000010010011011000110001011111011011101010011100011110111000001010111101110111001010010001101100111100111101001010101011010100010111001111111000101111111100011000000001110011110111011111011110001001111011110000000101010010010010110110000010110111000000000100101111010000110011110100000110101011111011101011101101110000110011010011101110110000000001110110101011011001000101111111011010101000111000100011110110110111010011101011111000011011001100010011011111010110100001110111010011000100000110110010100111111010000111110001110000001110101111100111000001111001011100001110000110100000111101110101001010011110000011101010100101100000111111111010010001001001010101111000010111001001100001001101001111010110011100000001110000011011100000111110010011111011110111000100111001010100000011000011101100110011111001010110001111001000010101000100001111011011110011100100111011110101011001000011101100011010000110101011010010010101001010011101100011111000001010010101101111001001011011100010010100010110010001100010010111100011000000100100010101111110101101111111000101100011101110111010111010011100101000001001101101110001110100011110000 \")," 133742 (numberOfSubstrings "1000100000110011000011000101010001110110100011100011001000100010100100100001010110111011100110010110000110000100010101000001100000101111110100001000111111110010111111111100100101111110110000101101000100010001110000010100110010101101011010010110011000100011110000101101010111001111110001110111010111010010001010110010100111110010011011010100101100010011000010000010001111010111011101000000010011111110011011010110110100111110001011101010111000000100011000100101011000000001101111001111100111000100000001001000010000110011010011101000111100101001101100010111101110111000100001011100001001100001101000110110010110000011011000111100111101001010001101000101111001100110100111110000011101101000011110100010001101101101001010100110000011101111100111001011001110011010111000000000100111101111101001100000111001111101001110010010011110101111100101000100011101000001010000111111101100000101110101001011100001011010001010100001110100000101111100000101101011111101000100101000101100000111001001100100010111010011100101100101100001110101101000011000001110101001001000111111101110001110111111011010110011011101001100100101101111110110110001001011111110011011100001101100000111111011111111000011010000001111111000111010010100011111000011101110001010010000010000110001000100011111111101110101100001011010001110001000010010000111010011101011100000001100101100010110001101011011111100001100001111000011001000110101110011101000001101000011010001011010010001100101011100111111101000000110110000000110001100110100110110110001011111111110001000111110100110111111110110001111000011100011010001010011110101110100011000100101111101110000110110011011001011011000101011001110010110001001001101011001001111010110111110010100111101000100110010100101010110101111111011000111111110110011100100010011011000110000111001001111010101001001101011001100001101010100100100110011001110011011111111001011110001010101110100010010011001101101000100111100110011110111011010001010101110110000011011000101011000101111101001111010010011011001110110001001000111001111101110010001111001101011001101011101111011011010111010100011000100011110110010110011000000001010100000001000000111010001001101011110100110011111100011001001101100001000111100001100110001111001100100000000000101011000011110010000001110011000101010110010100010000001101001110100110010011011000001100101101110011001111001010101011110010001111010001100001011101100101100110011000001010011111110011110110011110100110011101000000100101000011001000001101001110111101011101100001010111001001001110110001001011100011110001001101001110101000101101011010000010011100000000111100100110110001110011110000101010111011101111110001111000010101001111100000101000000101110011110001110011101000101101110010011101011100100101101011010110001111010010001101000011010000101000010000111010001001111001001111000110111111101010101101110010100001001100100110010110100110101010111110111110111010000011011001001111100100110010101010100100111011101111101110101100010011110110110100010110010110111100100110011011100011011101111000100011011110000000011101001111111101111110000000001001011000010010100000000111111000000001011011101010010000000110111011000010001110111110110100100001110101100001011000010001110110111100011000110000111000100010110101111000011010011011111100010001011100100011111011110000110001010110111101101101000001001000011101011101101000010001000110100000110010111100100001000100010010111101001110101100011011000001011111101001000010110101100011111111010000001110010011101100000000101101001000010011001010011001111110000111000100110110101001001110011001101001100110010001011100011001001111000101000011001000000101011110010111010111000100110011111000111010111110110100000100001000110100011100000010110111001010111010010010100110001010111100100101001000101001100010001001111001100100010111010000001001010000010100100001100100101001000111101011010001010001010111010110101100001110100101101100000001011100010100010000010011001000001110100100011110111011001010101111011000001111000110010011011010110000111011101000111001011111010001110000110110001011100111101000100001111011110000111001001011110011011100001000010011110110101100000011010001011110011001100111110011011101100000011010101101111101010111000001111001001000101000000000101000101000111110001010001000001011100001101010110011001110101000000011110110010100100001000011100100001000110011001111110001110101101101110110010000110110000000001100110111010000100110001101000101001010110101111110010000000100010010110010111000100010011110110001110101111111100110001110110110101100010010111100000110001001011100000101000101010110001100001010001001111010110110111111100010100111101010111010001011101101011111011011110010010010101100100000111111101010000000011010101010011011101111111001110110001010000001110100011111000101110011101001001111111111100011110111110110001010101000111011110000100001100010011011011010010110100000101010001010110101111101111110000010110011110100011111010100001010000000000110110110110110100011000111100111101011000001110000101101001000101000011000100101011010000011110001011110011100101011100111001011000010010111010000010000010010011011101010101100000110010101110011111011100011101001011110111011110110010000010011010010111000111110101001001011001101000000101101010110111010100000111000000111001000011110010111111000010011111011011000110001001011010011001010111010000101101011110111111101101101000000101111010101111011110011110000010001100100101010001100101001111110101110101111001000101111110010110001110100100101001010101111010101010000100101001001110100111011001100010110101010010101001001010110001110101010011000110000010010000000001010100101111110110000110101010110110101010000011110010001101001110111100101111101100011110010100001101110000111000010111001001011110100111110100011011000111100100010110110011110101111110011000101101000001101110101001001000100001001110011110111010011101100111010001110000100111101001110101101011111110000100101000010100001111001110111011101011001001110010101100101011100011110101101000101110001011111000011110100001010101001110111101100110100010100111000101000110011011010010100100100010000111101111110110010000000011001110001001011101010110100001010110100000010000111001100001101101110010010011101010100101100001100001111010101111100011011100001000101101000011111010011111110111010100000101001101111011010100001001011110111001000011011001010101100100011111100001100010100010010110100011000101000110011001111011011100111010000001011110000001110001111011100100101001000111111010000001010011001010111100010100111110100100010011111111110110100111111001100001011010111011111111100111000100111010111010110000101111001010000010100101100000110111111010100000110111100001000010000011010011011111001011101011111101100100100100111100011000000000110011000001011001011001000001010001110101010111100111101101100011010010111010111100101000111010011011001110110100100111110011101111010011000100001101100111001010010100001111100001101000001100011111001101111100100011110010001010111010110110001001101110111110010110101110001001111111101101110000011111001100001101011001100100110110011111011111010101111100111100111100001000011010001101010100111010000110111111111101011100000010111000101101101111000001100110010100010001000000100001100010011011100111011110111111111001100001110001001100001011010000010000001001010010011100111110111011011010010100011011000011110101000110111011011011010111010010010011101111010001010111111011110110011011110111111100111100011101001010011011000100010010000111101111111011110001101001101100010000010000111101001011101010100110110110110101011011111001001110011011111011110011010010101101111011101111111000001011110111001001101011000110010010100101000000010110100101110110101100111011101110110101110001001000111010111001110101001001001100100011101101110101101011011111110110000000001000101100111010100001010010010111101011111000101010010100011000110001100110000010000100111111001011000011111101001001111010101110100010111001111101110010111011110100001101011100101000101011000100110000111001100111010000110011010100010110111111010100011111100110010010010011000011010000001101111110111111010011101100101100011110001000100001110010111001110110101101111010001011011010110101001111010101011010111111010010011111011011101101001101001100001000010000010011001001111000001010110011000011000111000010100011111111101100110000001011000011011111001010010001010110110100010001001111011000011111001011111000010001011000110001000010010000011000010010101000100100101010001100100011110001011001010011110001100001011000100111110011110101101101010011100110000000101010010100001101000001100011001100001111001000110110110011111110001011101111011011111010010100001101100011100001000010111110011111100001010100100101111110110011010110100011001100111110101110110000110100111111000100101010111111010011000001001100011001111010000011111011111110001001100101000000001010101000000000100111000001111000110100010000100001010010000010010010110110001001101101101011100010001110100010011001001010000000101110010000000110010010001110100011010000011101110011011000101111001001111010000000011001100011001000110010111001000100000001011110100001100010000111110100101011101011001000110000010000011100100100100000100111111110110110100001101010000001011010000111000101001101111010011110011001101011000011100100101000100100100110100011010111110110010010011111011100100000110100000110000010001000110000010101100010011111100100000111111010100000111110011111100101101000101100100111100101100111110101111101110011111000001100001111111000010100100000000001101001100100101001101101011110111111111101111000111100110001011010000100100000111111110010010101101110110111101110010101110000111011110010010110111101111100101000110000010000000110100110111011100110010100010000000000111110110101101111111100001011110011001100010101101110001110100100100000101000000001101101011100010000100111000111001111100010101100111000100111000111011000101001010010111011110100011111000111011111001010000010100101010101111010000110110001110001001000011100010100001010001100111000101101110000000001000011000110110111100101110101111111100001011100001010100001000000001011010100111000000110010110001001011101101001100011110111111110101010000100100101110101000011110101001101110100001001100011111100100110110100111010000011101100111100101011011100010100101110011101111000101111110100111001010010101010011011001010010011110100010111111001000110011000001010111110101010101111000011010111000001110011000011110101001101010010101101000100100011110110100001001000001001100101001011101100011011111001011110001011010101110001111010010001111011101000001010101101010010101001101000110110000101100001001111110010010010011001011000000100100110000001100001100101000001111101100010101100000011001111001011000001111001111110001100100100111000010011001100001011101101101100110001111010111001010011001010011001011111010000010101000011100100101101100100101001100100100011111010111101111110101010011011000110101110001010100110000111111100111000100010011101111011100000001111100001101011001100111101001100111111100001111101111101001101101001010110100111100000001011100000011101101110101011001001100010111101011010110010110000110100101111101001010100010111011010011110110101011111100011100111011111011110101101101111100011100110001011111111011100101010010100011001101100111001001110111100001100110000100100111101000111100111001011110111000101011110000100011100000000100101111110111100000000011100010011101001011010001100001010011101010111011101000100111010011001101101000001101110011101101100111111010011101001110010100010100110111001101110111101001011101101000011111010100100100000000001001001001111100100101111001101001100010010111001110101011111001011001000100010011001011001110101010100000010011100001100000011011001100010100001101111001010001111000000001001111100101111110110011010110010010000000100001000111000100111010100001110110011000001110001001010101011011011000100100110111000101001101001100011110001111010011010110100110011111001011101111011000010011101101111110100111101111000110010001011111111111111011001101110011111001111010100110101100110000011111011011011001101110100001000010111011100111010000110011100010000010001011010100000111101100000110111101010000010101101110101100110000110000110110100101000111010101001001000000111101000000111001010011000110011111010000010110110111101110000101110000011111100111001110001110001011101000010101011100010000100010101001110111010100011100000010101110000111001001111111110010001011011101111100110010011000010011111000000011001110011010011100110010101000001001000001011000100100001011010110000011001111111100110010110100101000000010011111110100111110011011101100101110101110111100010010001010001101110111110111101011101000000101001000100100111101011110011001101111111111010100001010001001110000000110110000101010011100101000100010011100111000000111100010010010000011110001101000010111111100110011000111011010001000111101100111110110011001000101101000001010110101111001100010110100011111111100100101011100101000110011011001110111001010100110000011111011011101000011101000001000001101110101001000100110011001001110011111100101111010100010000100100001001100110010001010000111101011011110110000100111000010010100111111011110011010011100100101000110001011010100100010101000001001000110011000011111100010010000001101101011001001111001011110101010111111100010001010110011101110101011010011000111101101001110011010100101000111010001101011110100110111101010010100001101100010101110100100010100011101001101010100101100100010000110100100000100110011101111111101101101010110001000001011010101110011001010110011110110110011101110110001101100111011110000101101111100011100100011000011011001001111011000001110011111010010011000001100001000000101000011101010101100011010110101001100101110011011100001101001111101010010001001110111110111011011001110000111010111111100000001110110100000001000010011001001000000111010000011101110010010100000100001011111110000110101110000100111011001100101101101011111110100110110011101100000110100111111011111100011101110000100000000011100101010000111101000010111011111100010000110000111110110111010001110101101100011100111110011000110010100010111111100011011100010101110001010001010011000111001001100101100101101101010110100100001101001100011100100110010100101100000000111010001011100000110001000100111110111000111001110101001111110000111011011111011101110111111110100001001011100101010010000010000000011001101101001101100010001000000001011111011001011010110001111011101000110110011111110011101010111101011101011111101001001011111010101100011001100011001101011100010011101011000100111010100001010110010011001001000111111001111011001101111001000001111100000001010101111011011010110101101010100000000111110111111100101111010001000010110110010100110101101000100001001010111101101010001111110100110100001100100001111111011010000110000100111000010101111110100111101110100110111111010010011101111001110001101000001010111001001001000110110000001111101000110111100101010110100101000000101010101000010110101010110011111100101111110001001111100010101011111011101000110100010101100101110010111001100101101111000011111000111101011100010011011001001111010011000100110011111001111001111111101001101110101100110111111000011010101001011001011011000101111000110111001011100001011100000001100100110010100110011000000011011000001111011100011100111000111100111001111110011000101000101011000111001011011101100110010101111000110010100010110000011100001010001100110011100110000001101000001100100100011110111111101100000010110000100110110010001100111100100011011000100110011110101000011001100100111000010100011101100011101000100001111111110010110101111100100100000101011101110000110110011100010001001100010101110010011101110001010001101100011001111000000111000001001000001100001101000010011010110000101001000110110101010100011101010001101100101101011000111100110111010010101010100000110111000100101001011110100000100101010110010001000111010001000001111110100111001110110111110010111011111111101101011100011010111101000110001100000111111001010000011010000100001111000101010110101001100110010011111000101101000100010010101000001001011000101000111111110111001011010011011111111100110111010001111000010000110111011011011101010110001100011101000111100011001110001001010010001101111111011100011101111101100111010011111001110111001001010101100011111111100011101100110001110110011101001100111001101000001110001001101110001111111001101000100010101100010100010011010011010000100110100110100000101000001011111000000000010101010111111110100000111000100011100011111111000110111010100010111111011000001011110011001000011000110011110100110001111001010000111011100001000010011011010110111100100101101110100000000111100010111001101111110110011111000000100111100101110101011110110101011010000000110101111010101111011101101001100000111110100001001010111000000010010011111011011001100000110101010111110011100011000110110100010100100110010111001000010101011100100001011011011100111000110001111100010110101010110110111101011001100001011110100011101110000000101001101001111011001001001101011110111001011010001110000111000011100001010010110011101110110010111110101000100011001011100011000100001100000100001010010111001010100101011111100010001101010110100010001001110100010010011110110100001001000101100010010101000110111001101011101100110011011000101011011100011101110000101011000101101010100101100110010111010110011011111000111101111001001000110010011001011011011110000011100100101110110000001111010001010010111001001110111100001110010100111100001111110010110100110000110000111011011011101010000011000011101001111001100001011110001101100110011111110010101011010001011101000010110101111000110100000010111011101010010110110011011111111000100110110100010110011101100100011110000101000001110000001000000001011101011100110100100010110001110100010110110110001101100010110111110101001010000100000011101100110010110100100011011011000001101110111011111100000001000000110101111110001000001010000100000010001011000111101111010100000010011001101011010011010110111000000000110111001011010001011011011011100100011010001001111111001001100111101011101011011101111001001000100111011011100100110100100110010100000000011100001010011000110100000111001100111101100100011011111010000001000110100110110011101001000101100110010100111001111101100111101010101101100111010000101100001011100011101100010100011101010111101001010100001111101011111101011000001011010101011110000000010000100010000001101000010010001011001000110111110001000100101000000001011110110011110100010001010001001001100100100111101010011010001001101101010011010100001010110011100111000100101100000010110001001110000110101011101011011000101011110011110010001100101011011101000101110100100111101011111011100101100000100001010010100111001001100100011010101101011111000101011001000101011100111110111100101010011100100000110100000011111001111000110100010000101110101011001010110111001101101111010111100100000011011100111011010100010010110011000010101110101110001111010110011111011001000100011001110010100100100100111111010110001111100011010100100000111110110011100111000100011110101011101101000010000110000011110010011001011111010111001111101101000101001000000010101100001010100011101100111101101100001100001111110001001010110011101010101111001101010000110101100010100000001101001110101111001110011111010010001000011111000010000010100100010010011010010100110100100011100111001100001111010011101101001100110000010110010000111001000100000111101101110110111101000101111111001000110010000101001000111101000110010001010110000101001101111010001001110100110110000011101111011111101011111100011111101001011000101000101000111010100010111110111010111011100000010110110100110010011000111001110000000110110001001011101000101010011110101011000000101110111100000001011101000101000110001000100000001100011001101110101000001110011110100001001101000110011110000111010010011111111101011010001011001010011111110111110011010101010010000110100000001001111000111000010111100100110011001000001110000000000110100010011100011100001100000110010000011000010101111101000111111111000110100110001111000110111000101001100011110010110100110110010001100011111000001100010111110100011000001110110101100110100010010101110001110100100100111111011101101111000101000111011111000011111111000010111100101011011010111010101000100000010101100100101101010001011110011011100000100001110101011110010001110100101001111010110111011000110110100100000110011101110000110010001100001000110001011001101010000011010010100101000001001100111001111011000000100111011010101001101011100101110100111101111010110100001101100011101100001101000011111010110111100011000110000010111010111111000001010111100001111000101010100011100000110110010010001011010011101010010011110101000111100000011100011010000000110110001000011101100100000010110101100111000101100111101100101100111001110001011111010111111111101010111101100101100111011110000111101011101001100001010100011011001110111110101111011001111010100010000000010111111111101101010111110101000110111010010101001011100111110010111101111000000000110011111101001101101111110101010011010111011111011101001111001101101101000011101100001100000111000111100101000010010000101011011010010011001101100100110000110100011001000101101101110101101101010100011011100101111001100010111001101100010010011000110100010010101101111101111000001000010101010010010001100001011111101011110001101010010010001010000010100110011111010110101111110101001111101000101000011000000100110110010000101010110010100010011111000100001100011010100001110000000010011110000011000100000111011101000111111000001001011110010000110001101100010110011001001001000010101100110011100010001110101110011001100001011100010001001100111011010111001001100011001111001011001011011100100001010111010001111110101011111000011010011101101000111010101010110111111010000010011010010011011000000101110111110111111001000111011111101010101110000110111011011110110001111101100110111111101000001111101110110100110100001100110001010000100110011000011100011010000010010101011101001100101110010000100011100011011011011011100001011110000010100001101110110111110110001101100100000111111010101111000111000000100111111100010101100111001011000000011000011001101100011100110010111001101110101100110010011010011001110101011000010111110111001101101101111101110101011110010001111111100000101111111010101010101000000101010111101101010011000010100011111000000001111110100111000000101100010100101101011111111010000110111010000110001101010011110001110011100111001111011110111111001000010011111011000101001011100000110000011010100110101101111000000011111110111110101000001001000111110000101000000010100111011001100110110001001010011111010010101101110000011001000010111001111001001011100010111110110011010001010110001101000001100111010010100001001110010101010110010000100000110010110011100000110111101100111100000111000100101011101001111000011000100100101011110001001101110111001000011100100000100010011001100011101000111001011110101101001111011011010011111110111000101110000100001001010001010100001100110000101100010011000100011010000010010101011010110011001000101101100000110101111110010110001001011111110000111000110101000100000111010011101110100001011000110001010010001100010101100111101101000100110001100101100100101000010010010100001101011011011101110100010010010110011101001000101110100000000010101101010010001110010111001011111111100111111101100100101010000111011100111000010110101000001110110110001011100011111110110000110111101010011100110000010001110001110000110000101100100110110111101010110001010010100100001001010110000001100110100100110011111101000011010110101011111000111111100110100111101110011100111011100001111011101100001110001001010010101111110111001111001000000011100010101010001010100011110101011000000100110001100100100000111111011110011100111011100101010010110010100111011011101101010111001111010100000101111100010010101011001010001001010001001001111001111001000001101010101111100111101110101000010010110100000101010001111010100101110110100000000010111011101111100000110101101100010111001001010000011100000100110010000111101001011001000100110100000110101000001011111100111001111011111111101111000101110100010100100001110011000111000010101010010111110010011100011110110001011011000100100101100101000100011100101111010000010111100011111110000101000010011010011101010001001011101000111110111000000100110101100010100101001010111100001100101000010111100101001111111101001111110011110001011000001100011111101100110001010111010110100010001011111011100011001001001000111111100000101101011000100101011001011011001110001101100000110100001001111100111000110011001011010101000001001101100110111110100100000101001000011010110010000011000100001101100111000011111011100110100000110111100000110000100010110011000110110001011101010010001001110111000000100101111100111101100011101101001000010011000001000001011010011101101110001101010111100011110011100100111000110101000100111111111000111000111010000000011011100010111101011010101000110010110011000100101000011100011001100011100010010110010100000001111110001111010111011011100100110001101110000101000101110111111000101000001100011011010110011101101011110000001000111011101001000001101100000001100111101111001101111010010011001011011000010101101010011010010101011110111100001111001001010011101100010011010101101001110110001001000100000110110011001111110011001010101000011011100001100100011101100011000011000111110100000110011100011110111011100101010010101110000110111000101000000100011011111011001101100001011111101011110101101100010001100001011011011101111111010100001000110101011011111011001110010100010101000110010110111111000011010011110011000111000001011000111011100010010110011100110100101110011001001010000100110011001101000001101101010000001011111101011110100010011001101111111001111100010001100001000000011100011001000000001011111010001110110000001000001010010110000011110011101001011000101001010001101110000001111010111001000010010110010010111101101010111110100101100100010001010110111111001000011111001000100100010010101101101000010000000101000000111011001011011100110111010110110001111100001011000001111011010010101010111100100011011110010011010000011110010110000110100111011010000010001001011000010100010011110111010101111101111001011100000001110110110011101110100000111001010011000001001000000111111110000001100110001111111001110111000111010110101111111111111001010111010110111000100100001010111000000010000100000111000100100101000101101011010011000100100111011000110001001101001011111011111111011111001000001111101001011111000000000011000110010110010000011100001111010110001100001110001110101010100100111110110111001011000011010001011111010110001100101010110111000110011111011010011101010111001001110001110000011000010100011111011101101011011100010011111010000100001111110111100010011110000111110101101110110100001110000101101111110011010110000100000111110111001010011001101011011001000010101010011011010010000111000100011110100010101110001011010111110111100010101111000001101011101011001111000101100001001011001101001010011000011010011101011111110101011101000101001100110000001110111001101010001000111111011100010001100110000010010110110000101001000001000011001100010110000010010111011101001010010011001101011010011010110010100100001110001000110101001010110000101101010100001000011001010011111100110001110011101011111011011010010001100110100100000000001000110111111111000110101110011010010011001000001010001100110110111100110011110111100010111011000011110010101110110011100000100001101101000011011110110100100001010001101000110011000100110011101000101110110000010001101000011110001111110100010010011001110011010011101011110001000000101110110111101001001001011010000111110101111010010011011111101010111110110101010101100110111101100011011011000011100111100100010100001000001100110110011110011010110111010001001011110001010101100000110010000010101000001110110000011110000001100000000111111100101100111001000001100011001101010101111011100000101110010001011011011010101101110000111000010101011001100001010000101011001010101000100111001100011101001110001011000010100011100111010000101000011111110010000000100100110100000000101111100011001100111010100011001001000110001000100110000010010100011101011101010011011110111101110100101010011000101010001110010111110110101011110101010100101011010000000010001110010000101001100110010011011111001110110100001011001000001001010010001001000001100001111001100111101000111000100111101001010101011000110000000010000110010010010011001000001010001000000100100101111001000011001000110111101011001010000110100010011011110001100100110110101011101111110000011000010010010010100001100101100111100001010010111001101100000000100010101110010011101010000110100100100111001111001011011101001110000110111011001100001100001000001010000100010001011001101111110010111000001010010001000111011000110001111100100000011110011100110010101000111101010110001000011001010011110011111000100100011000011110001000111011010001110011101011111011001000011101010100000001001010011010111101000111111011001111011111000000001100000101111100110010000110101001100010111111111100010101111010011100010011001001010110101110010010001111001000011101011110000011001111011100000101111010000000110110110100001011011110000010010011011000011001011110101111100010101011011111111110011101110100000100011001111101011111111000010001111000010110110011010001001100011111001011110001010010011110000101111110010000111110011000011110100111100000100011000101011100010000000010100000011011110101000101000101101001100111001111101101010001010010010010001001101100010011011011100100100101110100100011010011011001100110100000011100000101110101011110110100011000001000100101101001100010010001000100000001100100000001000101010101110011100001100100100011000001000110010110101010010100100001000110011100000110100111111101111000110010111001100000101011101010110111110011000001001010000000010001001101011011001011000111001011110111100011010101011011100110110111000011000000101000110000010110110110111110000110110001000101000110001010011010011001110111001100011001010010100110110010000110011010011100100111101110101010001100010111110101010100001111001001000010100100110111100011101101000101001100001110011100110101001011111000001111110000110000101010101100001010000100110010100011111100010110110100001111000010100000011000000111110001010011101001100111000000000011011010110111111111101110110000010001000001001010111111011100111011101101100010011011101111000100010010000000111100010111000000100111010101001110001101111001001010011001000000101100001110001010101111111110011001111001101111011110000010011111010001000011001111000000110101111001110000110011000111100111111011010010100000001001100100001101111101111001011011010001001101010101011010110101011101001111100011011110110000111100001000011001010110101110010000001001111010000110011111010001101010100101100101110111110000011110000100011101110100111111111000111100011110001011001000101111000101101000001101111100000000010111011011000101101110001100000110111001110100110100111101111101010111010111110010101000001110011001100111110011111110000010010101101001010100111110010110001100010000110000100101100011111100000001010011010111010010010111110010011010100110100101010100010100011110000000111010110011101110101010001100110000100111111011011000011100011100000000111001111000110011100110110110101010011011111001000011011100011010111010100111000111100100001101000001001111101000001110011110111010010011010111011111110111000101110001001100110010001010100011100100000101100100100011101010110001100111100100100100010000101101001100000101100010100011000101111101111111110101010111101000111011011011100010011000001111001111101111000100001000110011010110101000010001101100111011011001111001101000101001011001101000010010100011001000000000100010101111111110010100111011001010001110110001101010000100111111100011110101000010000101110101010110011011000010100111000010010110101000010000000010100011100100100001100001111111000011101111111011011111000010101011100010111001010011000011111110100101111100011101110000101111101100101110110100110100111101100110100100100110110111011010110010110000100010111001100000001101011100100000010101111001000100101110110001011100010010111100001000000110110000111010100111000000100100010111001011101100111001100000111101011111010000111001110011011000000001010001111011100001001011000001100000111100110110010101100111001110110110001111111010010000001101010111101000100110001110110010101001100100100111111001010110111011101100000110001111110011101001010010111111001001101010001100101111100100111001000011110010111101111000110110011010010010011101101000010001110110001101001111110010001110100001100100000110010001011011011010010001111100100110111101001100011101110100001011000011011010010010010110100110110111101011011101010010010011010001111000000001101010010100010011011110111010000101010111111010011101111000010011111110010001010011010011000000100101101000101001011101101111010110100011001111000101110001110110110110010000100001110010000000000101111010110000110110100100011001111100101111001001011111101010011110001001110001111101010001110110100010111111000100000011110101101101111010111011101110100110101100110100001100111110001110101111110100110001101011101111100001100000001110010100111100100010000000000111101000110010100001010111101100000001011000101001010001110111101110001100000111010101100010100110001101001110010000110000010100111001011010000111100000110110110110010001110110010011000110101110110110001100010101000000111110111000110100011010000110011101101100001100000110000010111010001011011000100011110000100110110110001101001101010100001011110111011100011010010011100001010101011001100111110101011101111000010010100001000010110110001010100000101110011011111100101011110010000110110100111111010011000011010000111111111110111010010011011110010111001011000010110111010110001100001000000010011111101011001000010001011010110110101000001100111101001001101110100001010111000011010111111101110111100010011010111110000000011110101111000011100101011110011010001000110001111100010010100010110110000101000010000110101011000010110101110110111111101001101100110111010000001010100000000010110000111110001000111100000101000010001111010111101011010000101001001010101111010000101110010100111011001000000110001001011001000100010110110001111001011010111101111001000111010111001010100111011010000101111110000111101110111000000111101010010011001010111001101010111011011100111110001000000111110101100001001000110110101111111111111010000000001100011111010100111110010101110100010001010011111010000100101000110010111111001111001111111111111110000110101010000010110011001111101110100110011011111011001101100001100100011010111111001011110101011010001110110001001010010100110011000001001000001100101101000000101000010011010111100001011001000001111000101011110001010001001110010001011000011010000000011110011000001010101101000001000001001100111101110111100101111001111000000010100001110101111100010001001001001101111110000111010111111011011001011111000111101010010000110011100011110101110101100000101010110111100110101000010000101011010110110011100100110011011100100100001001111000010100011011011001011010111111011101010010100010100010101111010111110010111100011001010011110110000111001000100110100000111111001100100100100000101110110010111001101100111011110010010010100101011101011110111111011000110010101000111001111011011000111010011010010111011110011101010101111101010110100101011010110001010101001100011001011010000011001101011001111001100100001000000111011110110110000001000111010011100001011001010001110100001101110111100110000010001110100010101011011001101110101000000011111001100100110010001110000101010100001101111111010111010010110010100100101000000000111010100011001001111001101100001011011010000111011010101010111101001101111101111100100100001111110010000011101110011101111100101001111011101101010111010100100100110101110111111111011011011101000100000101100111111000111000100110010001011010110010100111000111000001011100100111000010110000100010111110010101001001111111101001010110100101100101100110111100011011000100100011010111101010110001001000110100111001001101011001000001000101111110010111001011010000110100111111110100010101100010001101110101001001001000000001011100010110010100111111100011010010000010000011011111011010100011101111001110110011011001100010011010010101110101000101011110001001001000011000010011000011011100000111011011011111100001010111001011001101001101110101010011011001010110001110001010001111000101101100011011001110001100000010110010110100001111010010010010100000010011010001100110000100101001011100101001001011000110100111000101111110001101010011111110000101000111111000011110111000000100111111001110011100011110011110001110111000101000111011100111111111110100011000001110001111111110111001111010010001110001100011001101000010001010000011001110001001001110100101011011111111011011000010111001101000100111110100011010000111100010010010010101001110001101001011010111001000001010001000000101000101111000010000000011111100101010000011101101100110011110111011010000000111001000110001011100001100001111100011000010101111111101110011010011010110110001011011111010010100001010010001110011011011010110011000100011011010100101111101001010000110001000100100001111111111001010000111010011011011110001111011001100111010000111111000111011001110011100110101111111001000100101111101100101010100011011011010100100110001101011111010001010011111110111111001011010001000100010101111010111010010001111011111010111101111001000110110000011101010000100010011010000100101001011011110001111101110000100100111100001110000110110111000000001111100111111011001111111111101001100101111110111000101010001000011111110011111010011100011001011011111110000000010001100010010010100100111110110111110010011101111101111001001000110110010110111011101110111110110001111000100110001011101000010011110010110101101110100110010111011100110000111100010101110011010010011011110110011111010111101100100010110100001100010011100110001101011000110000000110011001010010010000010101000111000011111111101101010110010010001101011111111100111110010100001100000110000100110000010000111001101110010101111110000100011001011111010000000110010100100011000001100001100011100101001011101000010001011101100000010010011101010011111000011111001111100110110000111101000100111011101100100110010100011010100101010110101110101001101010101001110001001110010100011110000000100001100000001010010000110100011100101001010111011111111001010000100001001001000001101001111110100001000111101111001110011000001000010000111011101111001001111111011011001010000000100101111000011110111010011110001100110111100001010110010100100100000010101100110110100011110000100010101000111011011110100000010100100011000010011010101011111000111101100000010100001000010000010011001000101000000001111101100001111101100010010101110010110111010100011100010001010001110111010011100001111101001100010100101011111111001010111010100101011010101110001001011000011110000010010011011000110001011111011011101010011100011110111000001010111101110111001010010001101100111100111101001010101011010100010111001111111000101111111100011000000001110011110111011111011110001001111011110000000101010010010010110110000010110111000000000100101111010000110011110100000110101011111011101011101101110000110011010011101110110000000001110110101011011001000101111111011010101000111000100011110110110111010011101011111000011011001100010011011111010110100001110111010011000100000110110010100111111010000111110001110000001110101111100111000001111001011100001110000110100000111101110101001010011110000011101010100101100000111111111010010001001001010101111000010111001001100001001101001111010110011100000001110000011011100000111110010011111011110111000100111001010100000011000011101100110011111001010110001111001000010101000100001111011011110011100100111011110101011001000011101100011010000110101011010010010101001010011101100011111000001010010101101111001001011011100010010100010110010001100010010111100011000000100100010101111110101101111111000101100011101110111010111010011100101000001001101101110001110100011110000"))
33
+
34
+
35
+ -- Grouping test cases
36
+ tests :: Test
37
+ tests = TestList [TestLabel "Test1" test1, TestLabel "Test2" test2, TestLabel "Test3" test3, TestLabel "Test4" test4, TestLabel "Test5" test5, TestLabel "Test6" test6]
38
+
39
+ -- Running the tests
40
+ main :: IO Counts
41
+ main = runTestTT tests
count_the_number_of_substrings_with_dominant_ones/java_tests/Main.java ADDED
@@ -0,0 +1,20 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ import static org.junit.jupiter.api.Assertions.*;
3
+ import org.junit.jupiter.api.Test;
4
+ import java.util.List;
5
+ import java.util.Arrays;
6
+ public class Main {
7
+ //Program start
8
+
9
+ //Program end
10
+
11
+ @Test
12
+ public void test1() {
13
+ assertEquals(5, numberOfSubstrings("00011"));
14
+ }
15
+ @Test
16
+ public void test2() {
17
+ assertEquals(16, numberOfSubstrings("101101"));
18
+ }
19
+
20
+ }
count_the_number_of_substrings_with_dominant_ones/meta.json ADDED
@@ -0,0 +1,47 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "id": 3479,
3
+ "name": "count_the_number_of_substrings_with_dominant_ones",
4
+ "difficulty": "Medium",
5
+ "link": "https://leetcode.com/problems/count-the-number-of-substrings-with-dominant-ones/",
6
+ "date": "2024-07-21 00:00:00",
7
+ "task_description": "You are given a binary string `s`. Return the number of substrings with **dominant** ones. A string has **dominant** ones if the number of ones in the string is **greater than or equal to** the **square** of the number of zeros in the string. **Example 1:** **Input:** s = \"00011\" **Output:** 5 **Explanation:** The substrings with dominant ones are shown in the table below. i j s[i..j] Number of Zeros Number of Ones 3 3 1 0 1 4 4 1 0 1 2 3 01 1 1 3 4 11 0 2 2 4 011 1 2 **Example 2:** **Input:** s = \"101101\" **Output:** 16 **Explanation:** The substrings with **non-dominant** ones are shown in the table below. Since there are 21 substrings total and 5 of them have non-dominant ones, it follows that there are 16 substrings with dominant ones. i j s[i..j] Number of Zeros Number of Ones 1 1 0 1 0 4 4 0 1 0 1 4 0110 2 2 0 4 10110 2 3 1 5 01101 2 3 **Constraints:** `1 <= s.length <= 4 * 104` `s` consists only of characters `'0'` and `'1'`.",
8
+ "public_test_cases": [
9
+ {
10
+ "label": "Example 1",
11
+ "input": "s = \"00011\"",
12
+ "output": "5 "
13
+ },
14
+ {
15
+ "label": "Example 2",
16
+ "input": "s = \"101101\"",
17
+ "output": "16 "
18
+ }
19
+ ],
20
+ "private_test_cases": [
21
+ {
22
+ "input": "1",
23
+ "output": 1
24
+ },
25
+ {
26
+ "input": "1010111010",
27
+ "output": 34
28
+ },
29
+ {
30
+ "input": "0010100001001111110110010010001010111111010111011000110010110010011100101011110011010010000101010100",
31
+ "output": 333
32
+ },
33
+ {
34
+ "input": "1000101010001111010001000111110110100101100001011001011001100000000100011100011000101111011010010100011111101011100110010110100001110010111011011011111101100101111111001101011010010000001001101110111011110000010101100011011000000001010110100110000000001010101000101101011111010111101000011011001010101000111011101110101111101110011011011111011101010000010000000001000011110101010011001010110100101100010101011011011110110111011110011011111010101001101000000111000001100011010110010110100110101101000100111101000111110110010101110001001010011010010111101001110001100011100111000111100001010001100010000010110101110010010000000101110100001110000110100110000111001001000100011010111011010010111101111011001110110001001011110010111100000110110010101000101101110100101110111010000011100111110011001011000111110000110100011111101110101101110100100010001111100010110001110000010110011110010001001010000110101111011101100011101011100100011100010101110100010000101001111001010110000000111010111111011010001110",
35
+ "output": 3489
36
+ },
37
+ {
38
+ "input": "1000100000110011000011000101010001110110100011100011001000100010100100100001010110111011100110010110000110000100010101000001100000101111110100001000111111110010111111111100100101111110110000101101000100010001110000010100110010101101011010010110011000100011110000101101010111001111110001110111010111010010001010110010100111110010011011010100101100010011000010000010001111010111011101000000010011111110011011010110110100111110001011101010111000000100011000100101011000000001101111001111100111000100000001001000010000110011010011101000111100101001101100010111101110111000100001011100001001100001101000110110010110000011011000111100111101001010001101000101111001100110100111110000011101101000011110100010001101101101001010100110000011101111100111001011001110011010111000000000100111101111101001100000111001111101001110010010011110101111100101000100011101000001010000111111101100000101110101001011100001011010001010100001110100000101111100000101101011111101000100101000101100000111001001100100010111010011100101100101100001110101101000011000001110101001001000111111101110001110111111011010110011011101001100100101101111110110110001001011111110011011100001101100000111111011111111000011010000001111111000111010010100011111000011101110001010010000010000110001000100011111111101110101100001011010001110001000010010000111010011101011100000001100101100010110001101011011111100001100001111000011001000110101110011101000001101000011010001011010010001100101011100111111101000000110110000000110001100110100110110110001011111111110001000111110100110111111110110001111000011100011010001010011110101110100011000100101111101110000110110011011001011011000101011001110010110001001001101011001001111010110111110010100111101000100110010100101010110101111111011000111111110110011100100010011011000110000111001001111010101001001101011001100001101010100100100110011001110011011111111001011110001010101110100010010011001101101000100111100110011110111011010001010101110110000011011000101011000101111101001111010010011011001110110001001000111001111101110010001111001101011001101011101111011011010111010100011000100011110110010110011000000001010100000001000000111010001001101011110100110011111100011001001101100001000111100001100110001111001100100000000000101011000011110010000001110011000101010110010100010000001101001110100110010011011000001100101101110011001111001010101011110010001111010001100001011101100101100110011000001010011111110011110110011110100110011101000000100101000011001000001101001110111101011101100001010111001001001110110001001011100011110001001101001110101000101101011010000010011100000000111100100110110001110011110000101010111011101111110001111000010101001111100000101000000101110011110001110011101000101101110010011101011100100101101011010110001111010010001101000011010000101000010000111010001001111001001111000110111111101010101101110010100001001100100110010110100110101010111110111110111010000011011001001111100100110010101010100100111011101111101110101100010011110110110100010110010110111100100110011011100011011101111000100011011110000000011101001111111101111110000000001001011000010010100000000111111000000001011011101010010000000110111011000010001110111110110100100001110101100001011000010001110110111100011000110000111000100010110101111000011010011011111100010001011100100011111011110000110001010110111101101101000001001000011101011101101000010001000110100000110010111100100001000100010010111101001110101100011011000001011111101001000010110101100011111111010000001110010011101100000000101101001000010011001010011001111110000111000100110110101001001110011001101001100110010001011100011001001111000101000011001000000101011110010111010111000100110011111000111010111110110100000100001000110100011100000010110111001010111010010010100110001010111100100101001000101001100010001001111001100100010111010000001001010000010100100001100100101001000111101011010001010001010111010110101100001110100101101100000001011100010100010000010011001000001110100100011110111011001010101111011000001111000110010011011010110000111011101000111001011111010001110000110110001011100111101000100001111011110000111001001011110011011100001000010011110110101100000011010001011110011001100111110011011101100000011010101101111101010111000001111001001000101000000000101000101000111110001010001000001011100001101010110011001110101000000011110110010100100001000011100100001000110011001111110001110101101101110110010000110110000000001100110111010000100110001101000101001010110101111110010000000100010010110010111000100010011110110001110101111111100110001110110110101100010010111100000110001001011100000101000101010110001100001010001001111010110110111111100010100111101010111010001011101101011111011011110010010010101100100000111111101010000000011010101010011011101111111001110110001010000001110100011111000101110011101001001111111111100011110111110110001010101000111011110000100001100010011011011010010110100000101010001010110101111101111110000010110011110100011111010100001010000000000110110110110110100011000111100111101011000001110000101101001000101000011000100101011010000011110001011110011100101011100111001011000010010111010000010000010010011011101010101100000110010101110011111011100011101001011110111011110110010000010011010010111000111110101001001011001101000000101101010110111010100000111000000111001000011110010111111000010011111011011000110001001011010011001010111010000101101011110111111101101101000000101111010101111011110011110000010001100100101010001100101001111110101110101111001000101111110010110001110100100101001010101111010101010000100101001001110100111011001100010110101010010101001001010110001110101010011000110000010010000000001010100101111110110000110101010110110101010000011110010001101001110111100101111101100011110010100001101110000111000010111001001011110100111110100011011000111100100010110110011110101111110011000101101000001101110101001001000100001001110011110111010011101100111010001110000100111101001110101101011111110000100101000010100001111001110111011101011001001110010101100101011100011110101101000101110001011111000011110100001010101001110111101100110100010100111000101000110011011010010100100100010000111101111110110010000000011001110001001011101010110100001010110100000010000111001100001101101110010010011101010100101100001100001111010101111100011011100001000101101000011111010011111110111010100000101001101111011010100001001011110111001000011011001010101100100011111100001100010100010010110100011000101000110011001111011011100111010000001011110000001110001111011100100101001000111111010000001010011001010111100010100111110100100010011111111110110100111111001100001011010111011111111100111000100111010111010110000101111001010000010100101100000110111111010100000110111100001000010000011010011011111001011101011111101100100100100111100011000000000110011000001011001011001000001010001110101010111100111101101100011010010111010111100101000111010011011001110110100100111110011101111010011000100001101100111001010010100001111100001101000001100011111001101111100100011110010001010111010110110001001101110111110010110101110001001111111101101110000011111001100001101011001100100110110011111011111010101111100111100111100001000011010001101010100111010000110111111111101011100000010111000101101101111000001100110010100010001000000100001100010011011100111011110111111111001100001110001001100001011010000010000001001010010011100111110111011011010010100011011000011110101000110111011011011010111010010010011101111010001010111111011110110011011110111111100111100011101001010011011000100010010000111101111111011110001101001101100010000010000111101001011101010100110110110110101011011111001001110011011111011110011010010101101111011101111111000001011110111001001101011000110010010100101000000010110100101110110101100111011101110110101110001001000111010111001110101001001001100100011101101110101101011011111110110000000001000101100111010100001010010010111101011111000101010010100011000110001100110000010000100111111001011000011111101001001111010101110100010111001111101110010111011110100001101011100101000101011000100110000111001100111010000110011010100010110111111010100011111100110010010010011000011010000001101111110111111010011101100101100011110001000100001110010111001110110101101111010001011011010110101001111010101011010111111010010011111011011101101001101001100001000010000010011001001111000001010110011000011000111000010100011111111101100110000001011000011011111001010010001010110110100010001001111011000011111001011111000010001011000110001000010010000011000010010101000100100101010001100100011110001011001010011110001100001011000100111110011110101101101010011100110000000101010010100001101000001100011001100001111001000110110110011111110001011101111011011111010010100001101100011100001000010111110011111100001010100100101111110110011010110100011001100111110101110110000110100111111000100101010111111010011000001001100011001111010000011111011111110001001100101000000001010101000000000100111000001111000110100010000100001010010000010010010110110001001101101101011100010001110100010011001001010000000101110010000000110010010001110100011010000011101110011011000101111001001111010000000011001100011001000110010111001000100000001011110100001100010000111110100101011101011001000110000010000011100100100100000100111111110110110100001101010000001011010000111000101001101111010011110011001101011000011100100101000100100100110100011010111110110010010011111011100100000110100000110000010001000110000010101100010011111100100000111111010100000111110011111100101101000101100100111100101100111110101111101110011111000001100001111111000010100100000000001101001100100101001101101011110111111111101111000111100110001011010000100100000111111110010010101101110110111101110010101110000111011110010010110111101111100101000110000010000000110100110111011100110010100010000000000111110110101101111111100001011110011001100010101101110001110100100100000101000000001101101011100010000100111000111001111100010101100111000100111000111011000101001010010111011110100011111000111011111001010000010100101010101111010000110110001110001001000011100010100001010001100111000101101110000000001000011000110110111100101110101111111100001011100001010100001000000001011010100111000000110010110001001011101101001100011110111111110101010000100100101110101000011110101001101110100001001100011111100100110110100111010000011101100111100101011011100010100101110011101111000101111110100111001010010101010011011001010010011110100010111111001000110011000001010111110101010101111000011010111000001110011000011110101001101010010101101000100100011110110100001001000001001100101001011101100011011111001011110001011010101110001111010010001111011101000001010101101010010101001101000110110000101100001001111110010010010011001011000000100100110000001100001100101000001111101100010101100000011001111001011000001111001111110001100100100111000010011001100001011101101101100110001111010111001010011001010011001011111010000010101000011100100101101100100101001100100100011111010111101111110101010011011000110101110001010100110000111111100111000100010011101111011100000001111100001101011001100111101001100111111100001111101111101001101101001010110100111100000001011100000011101101110101011001001100010111101011010110010110000110100101111101001010100010111011010011110110101011111100011100111011111011110101101101111100011100110001011111111011100101010010100011001101100111001001110111100001100110000100100111101000111100111001011110111000101011110000100011100000000100101111110111100000000011100010011101001011010001100001010011101010111011101000100111010011001101101000001101110011101101100111111010011101001110010100010100110111001101110111101001011101101000011111010100100100000000001001001001111100100101111001101001100010010111001110101011111001011001000100010011001011001110101010100000010011100001100000011011001100010100001101111001010001111000000001001111100101111110110011010110010010000000100001000111000100111010100001110110011000001110001001010101011011011000100100110111000101001101001100011110001111010011010110100110011111001011101111011000010011101101111110100111101111000110010001011111111111111011001101110011111001111010100110101100110000011111011011011001101110100001000010111011100111010000110011100010000010001011010100000111101100000110111101010000010101101110101100110000110000110110100101000111010101001001000000111101000000111001010011000110011111010000010110110111101110000101110000011111100111001110001110001011101000010101011100010000100010101001110111010100011100000010101110000111001001111111110010001011011101111100110010011000010011111000000011001110011010011100110010101000001001000001011000100100001011010110000011001111111100110010110100101000000010011111110100111110011011101100101110101110111100010010001010001101110111110111101011101000000101001000100100111101011110011001101111111111010100001010001001110000000110110000101010011100101000100010011100111000000111100010010010000011110001101000010111111100110011000111011010001000111101100111110110011001000101101000001010110101111001100010110100011111111100100101011100101000110011011001110111001010100110000011111011011101000011101000001000001101110101001000100110011001001110011111100101111010100010000100100001001100110010001010000111101011011110110000100111000010010100111111011110011010011100100101000110001011010100100010101000001001000110011000011111100010010000001101101011001001111001011110101010111111100010001010110011101110101011010011000111101101001110011010100101000111010001101011110100110111101010010100001101100010101110100100010100011101001101010100101100100010000110100100000100110011101111111101101101010110001000001011010101110011001010110011110110110011101110110001101100111011110000101101111100011100100011000011011001001111011000001110011111010010011000001100001000000101000011101010101100011010110101001100101110011011100001101001111101010010001001110111110111011011001110000111010111111100000001110110100000001000010011001001000000111010000011101110010010100000100001011111110000110101110000100111011001100101101101011111110100110110011101100000110100111111011111100011101110000100000000011100101010000111101000010111011111100010000110000111110110111010001110101101100011100111110011000110010100010111111100011011100010101110001010001010011000111001001100101100101101101010110100100001101001100011100100110010100101100000000111010001011100000110001000100111110111000111001110101001111110000111011011111011101110111111110100001001011100101010010000010000000011001101101001101100010001000000001011111011001011010110001111011101000110110011111110011101010111101011101011111101001001011111010101100011001100011001101011100010011101011000100111010100001010110010011001001000111111001111011001101111001000001111100000001010101111011011010110101101010100000000111110111111100101111010001000010110110010100110101101000100001001010111101101010001111110100110100001100100001111111011010000110000100111000010101111110100111101110100110111111010010011101111001110001101000001010111001001001000110110000001111101000110111100101010110100101000000101010101000010110101010110011111100101111110001001111100010101011111011101000110100010101100101110010111001100101101111000011111000111101011100010011011001001111010011000100110011111001111001111111101001101110101100110111111000011010101001011001011011000101111000110111001011100001011100000001100100110010100110011000000011011000001111011100011100111000111100111001111110011000101000101011000111001011011101100110010101111000110010100010110000011100001010001100110011100110000001101000001100100100011110111111101100000010110000100110110010001100111100100011011000100110011110101000011001100100111000010100011101100011101000100001111111110010110101111100100100000101011101110000110110011100010001001100010101110010011101110001010001101100011001111000000111000001001000001100001101000010011010110000101001000110110101010100011101010001101100101101011000111100110111010010101010100000110111000100101001011110100000100101010110010001000111010001000001111110100111001110110111110010111011111111101101011100011010111101000110001100000111111001010000011010000100001111000101010110101001100110010011111000101101000100010010101000001001011000101000111111110111001011010011011111111100110111010001111000010000110111011011011101010110001100011101000111100011001110001001010010001101111111011100011101111101100111010011111001110111001001010101100011111111100011101100110001110110011101001100111001101000001110001001101110001111111001101000100010101100010100010011010011010000100110100110100000101000001011111000000000010101010111111110100000111000100011100011111111000110111010100010111111011000001011110011001000011000110011110100110001111001010000111011100001000010011011010110111100100101101110100000000111100010111001101111110110011111000000100111100101110101011110110101011010000000110101111010101111011101101001100000111110100001001010111000000010010011111011011001100000110101010111110011100011000110110100010100100110010111001000010101011100100001011011011100111000110001111100010110101010110110111101011001100001011110100011101110000000101001101001111011001001001101011110111001011010001110000111000011100001010010110011101110110010111110101000100011001011100011000100001100000100001010010111001010100101011111100010001101010110100010001001110100010010011110110100001001000101100010010101000110111001101011101100110011011000101011011100011101110000101011000101101010100101100110010111010110011011111000111101111001001000110010011001011011011110000011100100101110110000001111010001010010111001001110111100001110010100111100001111110010110100110000110000111011011011101010000011000011101001111001100001011110001101100110011111110010101011010001011101000010110101111000110100000010111011101010010110110011011111111000100110110100010110011101100100011110000101000001110000001000000001011101011100110100100010110001110100010110110110001101100010110111110101001010000100000011101100110010110100100011011011000001101110111011111100000001000000110101111110001000001010000100000010001011000111101111010100000010011001101011010011010110111000000000110111001011010001011011011011100100011010001001111111001001100111101011101011011101111001001000100111011011100100110100100110010100000000011100001010011000110100000111001100111101100100011011111010000001000110100110110011101001000101100110010100111001111101100111101010101101100111010000101100001011100011101100010100011101010111101001010100001111101011111101011000001011010101011110000000010000100010000001101000010010001011001000110111110001000100101000000001011110110011110100010001010001001001100100100111101010011010001001101101010011010100001010110011100111000100101100000010110001001110000110101011101011011000101011110011110010001100101011011101000101110100100111101011111011100101100000100001010010100111001001100100011010101101011111000101011001000101011100111110111100101010011100100000110100000011111001111000110100010000101110101011001010110111001101101111010111100100000011011100111011010100010010110011000010101110101110001111010110011111011001000100011001110010100100100100111111010110001111100011010100100000111110110011100111000100011110101011101101000010000110000011110010011001011111010111001111101101000101001000000010101100001010100011101100111101101100001100001111110001001010110011101010101111001101010000110101100010100000001101001110101111001110011111010010001000011111000010000010100100010010011010010100110100100011100111001100001111010011101101001100110000010110010000111001000100000111101101110110111101000101111111001000110010000101001000111101000110010001010110000101001101111010001001110100110110000011101111011111101011111100011111101001011000101000101000111010100010111110111010111011100000010110110100110010011000111001110000000110110001001011101000101010011110101011000000101110111100000001011101000101000110001000100000001100011001101110101000001110011110100001001101000110011110000111010010011111111101011010001011001010011111110111110011010101010010000110100000001001111000111000010111100100110011001000001110000000000110100010011100011100001100000110010000011000010101111101000111111111000110100110001111000110111000101001100011110010110100110110010001100011111000001100010111110100011000001110110101100110100010010101110001110100100100111111011101101111000101000111011111000011111111000010111100101011011010111010101000100000010101100100101101010001011110011011100000100001110101011110010001110100101001111010110111011000110110100100000110011101110000110010001100001000110001011001101010000011010010100101000001001100111001111011000000100111011010101001101011100101110100111101111010110100001101100011101100001101000011111010110111100011000110000010111010111111000001010111100001111000101010100011100000110110010010001011010011101010010011110101000111100000011100011010000000110110001000011101100100000010110101100111000101100111101100101100111001110001011111010111111111101010111101100101100111011110000111101011101001100001010100011011001110111110101111011001111010100010000000010111111111101101010111110101000110111010010101001011100111110010111101111000000000110011111101001101101111110101010011010111011111011101001111001101101101000011101100001100000111000111100101000010010000101011011010010011001101100100110000110100011001000101101101110101101101010100011011100101111001100010111001101100010010011000110100010010101101111101111000001000010101010010010001100001011111101011110001101010010010001010000010100110011111010110101111110101001111101000101000011000000100110110010000101010110010100010011111000100001100011010100001110000000010011110000011000100000111011101000111111000001001011110010000110001101100010110011001001001000010101100110011100010001110101110011001100001011100010001001100111011010111001001100011001111001011001011011100100001010111010001111110101011111000011010011101101000111010101010110111111010000010011010010011011000000101110111110111111001000111011111101010101110000110111011011110110001111101100110111111101000001111101110110100110100001100110001010000100110011000011100011010000010010101011101001100101110010000100011100011011011011011100001011110000010100001101110110111110110001101100100000111111010101111000111000000100111111100010101100111001011000000011000011001101100011100110010111001101110101100110010011010011001110101011000010111110111001101101101111101110101011110010001111111100000101111111010101010101000000101010111101101010011000010100011111000000001111110100111000000101100010100101101011111111010000110111010000110001101010011110001110011100111001111011110111111001000010011111011000101001011100000110000011010100110101101111000000011111110111110101000001001000111110000101000000010100111011001100110110001001010011111010010101101110000011001000010111001111001001011100010111110110011010001010110001101000001100111010010100001001110010101010110010000100000110010110011100000110111101100111100000111000100101011101001111000011000100100101011110001001101110111001000011100100000100010011001100011101000111001011110101101001111011011010011111110111000101110000100001001010001010100001100110000101100010011000100011010000010010101011010110011001000101101100000110101111110010110001001011111110000111000110101000100000111010011101110100001011000110001010010001100010101100111101101000100110001100101100100101000010010010100001101011011011101110100010010010110011101001000101110100000000010101101010010001110010111001011111111100111111101100100101010000111011100111000010110101000001110110110001011100011111110110000110111101010011100110000010001110001110000110000101100100110110111101010110001010010100100001001010110000001100110100100110011111101000011010110101011111000111111100110100111101110011100111011100001111011101100001110001001010010101111110111001111001000000011100010101010001010100011110101011000000100110001100100100000111111011110011100111011100101010010110010100111011011101101010111001111010100000101111100010010101011001010001001010001001001111001111001000001101010101111100111101110101000010010110100000101010001111010100101110110100000000010111011101111100000110101101100010111001001010000011100000100110010000111101001011001000100110100000110101000001011111100111001111011111111101111000101110100010100100001110011000111000010101010010111110010011100011110110001011011000100100101100101000100011100101111010000010111100011111110000101000010011010011101010001001011101000111110111000000100110101100010100101001010111100001100101000010111100101001111111101001111110011110001011000001100011111101100110001010111010110100010001011111011100011001001001000111111100000101101011000100101011001011011001110001101100000110100001001111100111000110011001011010101000001001101100110111110100100000101001000011010110010000011000100001101100111000011111011100110100000110111100000110000100010110011000110110001011101010010001001110111000000100101111100111101100011101101001000010011000001000001011010011101101110001101010111100011110011100100111000110101000100111111111000111000111010000000011011100010111101011010101000110010110011000100101000011100011001100011100010010110010100000001111110001111010111011011100100110001101110000101000101110111111000101000001100011011010110011101101011110000001000111011101001000001101100000001100111101111001101111010010011001011011000010101101010011010010101011110111100001111001001010011101100010011010101101001110110001001000100000110110011001111110011001010101000011011100001100100011101100011000011000111110100000110011100011110111011100101010010101110000110111000101000000100011011111011001101100001011111101011110101101100010001100001011011011101111111010100001000110101011011111011001110010100010101000110010110111111000011010011110011000111000001011000111011100010010110011100110100101110011001001010000100110011001101000001101101010000001011111101011110100010011001101111111001111100010001100001000000011100011001000000001011111010001110110000001000001010010110000011110011101001011000101001010001101110000001111010111001000010010110010010111101101010111110100101100100010001010110111111001000011111001000100100010010101101101000010000000101000000111011001011011100110111010110110001111100001011000001111011010010101010111100100011011110010011010000011110010110000110100111011010000010001001011000010100010011110111010101111101111001011100000001110110110011101110100000111001010011000001001000000111111110000001100110001111111001110111000111010110101111111111111001010111010110111000100100001010111000000010000100000111000100100101000101101011010011000100100111011000110001001101001011111011111111011111001000001111101001011111000000000011000110010110010000011100001111010110001100001110001110101010100100111110110111001011000011010001011111010110001100101010110111000110011111011010011101010111001001110001110000011000010100011111011101101011011100010011111010000100001111110111100010011110000111110101101110110100001110000101101111110011010110000100000111110111001010011001101011011001000010101010011011010010000111000100011110100010101110001011010111110111100010101111000001101011101011001111000101100001001011001101001010011000011010011101011111110101011101000101001100110000001110111001101010001000111111011100010001100110000010010110110000101001000001000011001100010110000010010111011101001010010011001101011010011010110010100100001110001000110101001010110000101101010100001000011001010011111100110001110011101011111011011010010001100110100100000000001000110111111111000110101110011010010011001000001010001100110110111100110011110111100010111011000011110010101110110011100000100001101101000011011110110100100001010001101000110011000100110011101000101110110000010001101000011110001111110100010010011001110011010011101011110001000000101110110111101001001001011010000111110101111010010011011111101010111110110101010101100110111101100011011011000011100111100100010100001000001100110110011110011010110111010001001011110001010101100000110010000010101000001110110000011110000001100000000111111100101100111001000001100011001101010101111011100000101110010001011011011010101101110000111000010101011001100001010000101011001010101000100111001100011101001110001011000010100011100111010000101000011111110010000000100100110100000000101111100011001100111010100011001001000110001000100110000010010100011101011101010011011110111101110100101010011000101010001110010111110110101011110101010100101011010000000010001110010000101001100110010011011111001110110100001011001000001001010010001001000001100001111001100111101000111000100111101001010101011000110000000010000110010010010011001000001010001000000100100101111001000011001000110111101011001010000110100010011011110001100100110110101011101111110000011000010010010010100001100101100111100001010010111001101100000000100010101110010011101010000110100100100111001111001011011101001110000110111011001100001100001000001010000100010001011001101111110010111000001010010001000111011000110001111100100000011110011100110010101000111101010110001000011001010011110011111000100100011000011110001000111011010001110011101011111011001000011101010100000001001010011010111101000111111011001111011111000000001100000101111100110010000110101001100010111111111100010101111010011100010011001001010110101110010010001111001000011101011110000011001111011100000101111010000000110110110100001011011110000010010011011000011001011110101111100010101011011111111110011101110100000100011001111101011111111000010001111000010110110011010001001100011111001011110001010010011110000101111110010000111110011000011110100111100000100011000101011100010000000010100000011011110101000101000101101001100111001111101101010001010010010010001001101100010011011011100100100101110100100011010011011001100110100000011100000101110101011110110100011000001000100101101001100010010001000100000001100100000001000101010101110011100001100100100011000001000110010110101010010100100001000110011100000110100111111101111000110010111001100000101011101010110111110011000001001010000000010001001101011011001011000111001011110111100011010101011011100110110111000011000000101000110000010110110110111110000110110001000101000110001010011010011001110111001100011001010010100110110010000110011010011100100111101110101010001100010111110101010100001111001001000010100100110111100011101101000101001100001110011100110101001011111000001111110000110000101010101100001010000100110010100011111100010110110100001111000010100000011000000111110001010011101001100111000000000011011010110111111111101110110000010001000001001010111111011100111011101101100010011011101111000100010010000000111100010111000000100111010101001110001101111001001010011001000000101100001110001010101111111110011001111001101111011110000010011111010001000011001111000000110101111001110000110011000111100111111011010010100000001001100100001101111101111001011011010001001101010101011010110101011101001111100011011110110000111100001000011001010110101110010000001001111010000110011111010001101010100101100101110111110000011110000100011101110100111111111000111100011110001011001000101111000101101000001101111100000000010111011011000101101110001100000110111001110100110100111101111101010111010111110010101000001110011001100111110011111110000010010101101001010100111110010110001100010000110000100101100011111100000001010011010111010010010111110010011010100110100101010100010100011110000000111010110011101110101010001100110000100111111011011000011100011100000000111001111000110011100110110110101010011011111001000011011100011010111010100111000111100100001101000001001111101000001110011110111010010011010111011111110111000101110001001100110010001010100011100100000101100100100011101010110001100111100100100100010000101101001100000101100010100011000101111101111111110101010111101000111011011011100010011000001111001111101111000100001000110011010110101000010001101100111011011001111001101000101001011001101000010010100011001000000000100010101111111110010100111011001010001110110001101010000100111111100011110101000010000101110101010110011011000010100111000010010110101000010000000010100011100100100001100001111111000011101111111011011111000010101011100010111001010011000011111110100101111100011101110000101111101100101110110100110100111101100110100100100110110111011010110010110000100010111001100000001101011100100000010101111001000100101110110001011100010010111100001000000110110000111010100111000000100100010111001011101100111001100000111101011111010000111001110011011000000001010001111011100001001011000001100000111100110110010101100111001110110110001111111010010000001101010111101000100110001110110010101001100100100111111001010110111011101100000110001111110011101001010010111111001001101010001100101111100100111001000011110010111101111000110110011010010010011101101000010001110110001101001111110010001110100001100100000110010001011011011010010001111100100110111101001100011101110100001011000011011010010010010110100110110111101011011101010010010011010001111000000001101010010100010011011110111010000101010111111010011101111000010011111110010001010011010011000000100101101000101001011101101111010110100011001111000101110001110110110110010000100001110010000000000101111010110000110110100100011001111100101111001001011111101010011110001001110001111101010001110110100010111111000100000011110101101101111010111011101110100110101100110100001100111110001110101111110100110001101011101111100001100000001110010100111100100010000000000111101000110010100001010111101100000001011000101001010001110111101110001100000111010101100010100110001101001110010000110000010100111001011010000111100000110110110110010001110110010011000110101110110110001100010101000000111110111000110100011010000110011101101100001100000110000010111010001011011000100011110000100110110110001101001101010100001011110111011100011010010011100001010101011001100111110101011101111000010010100001000010110110001010100000101110011011111100101011110010000110110100111111010011000011010000111111111110111010010011011110010111001011000010110111010110001100001000000010011111101011001000010001011010110110101000001100111101001001101110100001010111000011010111111101110111100010011010111110000000011110101111000011100101011110011010001000110001111100010010100010110110000101000010000110101011000010110101110110111111101001101100110111010000001010100000000010110000111110001000111100000101000010001111010111101011010000101001001010101111010000101110010100111011001000000110001001011001000100010110110001111001011010111101111001000111010111001010100111011010000101111110000111101110111000000111101010010011001010111001101010111011011100111110001000000111110101100001001000110110101111111111111010000000001100011111010100111110010101110100010001010011111010000100101000110010111111001111001111111111111110000110101010000010110011001111101110100110011011111011001101100001100100011010111111001011110101011010001110110001001010010100110011000001001000001100101101000000101000010011010111100001011001000001111000101011110001010001001110010001011000011010000000011110011000001010101101000001000001001100111101110111100101111001111000000010100001110101111100010001001001001101111110000111010111111011011001011111000111101010010000110011100011110101110101100000101010110111100110101000010000101011010110110011100100110011011100100100001001111000010100011011011001011010111111011101010010100010100010101111010111110010111100011001010011110110000111001000100110100000111111001100100100100000101110110010111001101100111011110010010010100101011101011110111111011000110010101000111001111011011000111010011010010111011110011101010101111101010110100101011010110001010101001100011001011010000011001101011001111001100100001000000111011110110110000001000111010011100001011001010001110100001101110111100110000010001110100010101011011001101110101000000011111001100100110010001110000101010100001101111111010111010010110010100100101000000000111010100011001001111001101100001011011010000111011010101010111101001101111101111100100100001111110010000011101110011101111100101001111011101101010111010100100100110101110111111111011011011101000100000101100111111000111000100110010001011010110010100111000111000001011100100111000010110000100010111110010101001001111111101001010110100101100101100110111100011011000100100011010111101010110001001000110100111001001101011001000001000101111110010111001011010000110100111111110100010101100010001101110101001001001000000001011100010110010100111111100011010010000010000011011111011010100011101111001110110011011001100010011010010101110101000101011110001001001000011000010011000011011100000111011011011111100001010111001011001101001101110101010011011001010110001110001010001111000101101100011011001110001100000010110010110100001111010010010010100000010011010001100110000100101001011100101001001011000110100111000101111110001101010011111110000101000111111000011110111000000100111111001110011100011110011110001110111000101000111011100111111111110100011000001110001111111110111001111010010001110001100011001101000010001010000011001110001001001110100101011011111111011011000010111001101000100111110100011010000111100010010010010101001110001101001011010111001000001010001000000101000101111000010000000011111100101010000011101101100110011110111011010000000111001000110001011100001100001111100011000010101111111101110011010011010110110001011011111010010100001010010001110011011011010110011000100011011010100101111101001010000110001000100100001111111111001010000111010011011011110001111011001100111010000111111000111011001110011100110101111111001000100101111101100101010100011011011010100100110001101011111010001010011111110111111001011010001000100010101111010111010010001111011111010111101111001000110110000011101010000100010011010000100101001011011110001111101110000100100111100001110000110110111000000001111100111111011001111111111101001100101111110111000101010001000011111110011111010011100011001011011111110000000010001100010010010100100111110110111110010011101111101111001001000110110010110111011101110111110110001111000100110001011101000010011110010110101101110100110010111011100110000111100010101110011010010011011110110011111010111101100100010110100001100010011100110001101011000110000000110011001010010010000010101000111000011111111101101010110010010001101011111111100111110010100001100000110000100110000010000111001101110010101111110000100011001011111010000000110010100100011000001100001100011100101001011101000010001011101100000010010011101010011111000011111001111100110110000111101000100111011101100100110010100011010100101010110101110101001101010101001110001001110010100011110000000100001100000001010010000110100011100101001010111011111111001010000100001001001000001101001111110100001000111101111001110011000001000010000111011101111001001111111011011001010000000100101111000011110111010011110001100110111100001010110010100100100000010101100110110100011110000100010101000111011011110100000010100100011000010011010101011111000111101100000010100001000010000010011001000101000000001111101100001111101100010010101110010110111010100011100010001010001110111010011100001111101001100010100101011111111001010111010100101011010101110001001011000011110000010010011011000110001011111011011101010011100011110111000001010111101110111001010010001101100111100111101001010101011010100010111001111111000101111111100011000000001110011110111011111011110001001111011110000000101010010010010110110000010110111000000000100101111010000110011110100000110101011111011101011101101110000110011010011101110110000000001110110101011011001000101111111011010101000111000100011110110110111010011101011111000011011001100010011011111010110100001110111010011000100000110110010100111111010000111110001110000001110101111100111000001111001011100001110000110100000111101110101001010011110000011101010100101100000111111111010010001001001010101111000010111001001100001001101001111010110011100000001110000011011100000111110010011111011110111000100111001010100000011000011101100110011111001010110001111001000010101000100001111011011110011100100111011110101011001000011101100011010000110101011010010010101001010011101100011111000001010010101101111001001011011100010010100010110010001100010010111100011000000100100010101111110101101111111000101100011101110111010111010011100101000001001101101110001110100011110000",
39
+ "output": 133742
40
+ }
41
+ ],
42
+ "haskell_template": "numberOfSubstrings :: String -> Int\nnumberOfSubstrings s ",
43
+ "ocaml_template": "let numberOfSubstrings (s: string) : int = ",
44
+ "scala_template": "def numberOfSubstrings(s: String): Int = { \n \n}",
45
+ "java_template": "class Solution {\n public int numberOfSubstrings(String s) {\n \n }\n}",
46
+ "python_template": "class Solution(object):\n def numberOfSubstrings(self, s):\n \"\"\"\n :type s: str\n :rtype: int\n \"\"\"\n "
47
+ }
count_the_number_of_substrings_with_dominant_ones/ocaml_tests/main.ml ADDED
@@ -0,0 +1,42 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ module Main = struct
3
+ open OUnit2
4
+
5
+ (* Program start *)
6
+ let numberOfSubstrings (s: string) : int = failwith "Not implemented"
7
+
8
+ (* Program end *)
9
+
10
+ (* Test cases *)
11
+
12
+ let test1 _ = assert_equal 5 (numberOfSubstrings "00011")
13
+
14
+ let test2 _ = assert_equal 16 (numberOfSubstrings "101101")
15
+
16
+ let test3 _ = assert_equal 16 (numberOfSubstrings "1")
17
+
18
+ let test4 _ = assert_equal 16 (numberOfSubstrings "1010111010")
19
+
20
+ let test5 _ = assert_equal 16 (numberOfSubstrings "0010100001001111110110010010001010111111010111011000110010110010011100101011110011010010000101010100")
21
+
22
+ let test6 _ = assert_equal 16 (numberOfSubstrings "1000101010001111010001000111110110100101100001011001011001100000000100011100011000101111011010010100011111101011100110010110100001110010111011011011111101100101111111001101011010010000001001101110111011110000010101100011011000000001010110100110000000001010101000101101011111010111101000011011001010101000111011101110101111101110011011011111011101010000010000000001000011110101010011001010110100101100010101011011011110110111011110011011111010101001101000000111000001100011010110010110100110101101000100111101000111110110010101110001001010011010010111101001110001100011100111000111100001010001100010000010110101110010010000000101110100001110000110100110000111001001000100011010111011010010111101111011001110110001001011110010111100000110110010101000101101110100101110111010000011100111110011001011000111110000110100011111101110101101110100100010001111100010110001110000010110011110010001001010000110101111011101100011101011100100011100010101110100010000101001111001010110000000111010111111011010001110")
23
+
24
+ let test7 _ = assert_equal 16 (numberOfSubstrings "1000100000110011000011000101010001110110100011100011001000100010100100100001010110111011100110010110000110000100010101000001100000101111110100001000111111110010111111111100100101111110110000101101000100010001110000010100110010101101011010010110011000100011110000101101010111001111110001110111010111010010001010110010100111110010011011010100101100010011000010000010001111010111011101000000010011111110011011010110110100111110001011101010111000000100011000100101011000000001101111001111100111000100000001001000010000110011010011101000111100101001101100010111101110111000100001011100001001100001101000110110010110000011011000111100111101001010001101000101111001100110100111110000011101101000011110100010001101101101001010100110000011101111100111001011001110011010111000000000100111101111101001100000111001111101001110010010011110101111100101000100011101000001010000111111101100000101110101001011100001011010001010100001110100000101111100000101101011111101000100101000101100000111001001100100010111010011100101100101100001110101101000011000001110101001001000111111101110001110111111011010110011011101001100100101101111110110110001001011111110011011100001101100000111111011111111000011010000001111111000111010010100011111000011101110001010010000010000110001000100011111111101110101100001011010001110001000010010000111010011101011100000001100101100010110001101011011111100001100001111000011001000110101110011101000001101000011010001011010010001100101011100111111101000000110110000000110001100110100110110110001011111111110001000111110100110111111110110001111000011100011010001010011110101110100011000100101111101110000110110011011001011011000101011001110010110001001001101011001001111010110111110010100111101000100110010100101010110101111111011000111111110110011100100010011011000110000111001001111010101001001101011001100001101010100100100110011001110011011111111001011110001010101110100010010011001101101000100111100110011110111011010001010101110110000011011000101011000101111101001111010010011011001110110001001000111001111101110010001111001101011001101011101111011011010111010100011000100011110110010110011000000001010100000001000000111010001001101011110100110011111100011001001101100001000111100001100110001111001100100000000000101011000011110010000001110011000101010110010100010000001101001110100110010011011000001100101101110011001111001010101011110010001111010001100001011101100101100110011000001010011111110011110110011110100110011101000000100101000011001000001101001110111101011101100001010111001001001110110001001011100011110001001101001110101000101101011010000010011100000000111100100110110001110011110000101010111011101111110001111000010101001111100000101000000101110011110001110011101000101101110010011101011100100101101011010110001111010010001101000011010000101000010000111010001001111001001111000110111111101010101101110010100001001100100110010110100110101010111110111110111010000011011001001111100100110010101010100100111011101111101110101100010011110110110100010110010110111100100110011011100011011101111000100011011110000000011101001111111101111110000000001001011000010010100000000111111000000001011011101010010000000110111011000010001110111110110100100001110101100001011000010001110110111100011000110000111000100010110101111000011010011011111100010001011100100011111011110000110001010110111101101101000001001000011101011101101000010001000110100000110010111100100001000100010010111101001110101100011011000001011111101001000010110101100011111111010000001110010011101100000000101101001000010011001010011001111110000111000100110110101001001110011001101001100110010001011100011001001111000101000011001000000101011110010111010111000100110011111000111010111110110100000100001000110100011100000010110111001010111010010010100110001010111100100101001000101001100010001001111001100100010111010000001001010000010100100001100100101001000111101011010001010001010111010110101100001110100101101100000001011100010100010000010011001000001110100100011110111011001010101111011000001111000110010011011010110000111011101000111001011111010001110000110110001011100111101000100001111011110000111001001011110011011100001000010011110110101100000011010001011110011001100111110011011101100000011010101101111101010111000001111001001000101000000000101000101000111110001010001000001011100001101010110011001110101000000011110110010100100001000011100100001000110011001111110001110101101101110110010000110110000000001100110111010000100110001101000101001010110101111110010000000100010010110010111000100010011110110001110101111111100110001110110110101100010010111100000110001001011100000101000101010110001100001010001001111010110110111111100010100111101010111010001011101101011111011011110010010010101100100000111111101010000000011010101010011011101111111001110110001010000001110100011111000101110011101001001111111111100011110111110110001010101000111011110000100001100010011011011010010110100000101010001010110101111101111110000010110011110100011111010100001010000000000110110110110110100011000111100111101011000001110000101101001000101000011000100101011010000011110001011110011100101011100111001011000010010111010000010000010010011011101010101100000110010101110011111011100011101001011110111011110110010000010011010010111000111110101001001011001101000000101101010110111010100000111000000111001000011110010111111000010011111011011000110001001011010011001010111010000101101011110111111101101101000000101111010101111011110011110000010001100100101010001100101001111110101110101111001000101111110010110001110100100101001010101111010101010000100101001001110100111011001100010110101010010101001001010110001110101010011000110000010010000000001010100101111110110000110101010110110101010000011110010001101001110111100101111101100011110010100001101110000111000010111001001011110100111110100011011000111100100010110110011110101111110011000101101000001101110101001001000100001001110011110111010011101100111010001110000100111101001110101101011111110000100101000010100001111001110111011101011001001110010101100101011100011110101101000101110001011111000011110100001010101001110111101100110100010100111000101000110011011010010100100100010000111101111110110010000000011001110001001011101010110100001010110100000010000111001100001101101110010010011101010100101100001100001111010101111100011011100001000101101000011111010011111110111010100000101001101111011010100001001011110111001000011011001010101100100011111100001100010100010010110100011000101000110011001111011011100111010000001011110000001110001111011100100101001000111111010000001010011001010111100010100111110100100010011111111110110100111111001100001011010111011111111100111000100111010111010110000101111001010000010100101100000110111111010100000110111100001000010000011010011011111001011101011111101100100100100111100011000000000110011000001011001011001000001010001110101010111100111101101100011010010111010111100101000111010011011001110110100100111110011101111010011000100001101100111001010010100001111100001101000001100011111001101111100100011110010001010111010110110001001101110111110010110101110001001111111101101110000011111001100001101011001100100110110011111011111010101111100111100111100001000011010001101010100111010000110111111111101011100000010111000101101101111000001100110010100010001000000100001100010011011100111011110111111111001100001110001001100001011010000010000001001010010011100111110111011011010010100011011000011110101000110111011011011010111010010010011101111010001010111111011110110011011110111111100111100011101001010011011000100010010000111101111111011110001101001101100010000010000111101001011101010100110110110110101011011111001001110011011111011110011010010101101111011101111111000001011110111001001101011000110010010100101000000010110100101110110101100111011101110110101110001001000111010111001110101001001001100100011101101110101101011011111110110000000001000101100111010100001010010010111101011111000101010010100011000110001100110000010000100111111001011000011111101001001111010101110100010111001111101110010111011110100001101011100101000101011000100110000111001100111010000110011010100010110111111010100011111100110010010010011000011010000001101111110111111010011101100101100011110001000100001110010111001110110101101111010001011011010110101001111010101011010111111010010011111011011101101001101001100001000010000010011001001111000001010110011000011000111000010100011111111101100110000001011000011011111001010010001010110110100010001001111011000011111001011111000010001011000110001000010010000011000010010101000100100101010001100100011110001011001010011110001100001011000100111110011110101101101010011100110000000101010010100001101000001100011001100001111001000110110110011111110001011101111011011111010010100001101100011100001000010111110011111100001010100100101111110110011010110100011001100111110101110110000110100111111000100101010111111010011000001001100011001111010000011111011111110001001100101000000001010101000000000100111000001111000110100010000100001010010000010010010110110001001101101101011100010001110100010011001001010000000101110010000000110010010001110100011010000011101110011011000101111001001111010000000011001100011001000110010111001000100000001011110100001100010000111110100101011101011001000110000010000011100100100100000100111111110110110100001101010000001011010000111000101001101111010011110011001101011000011100100101000100100100110100011010111110110010010011111011100100000110100000110000010001000110000010101100010011111100100000111111010100000111110011111100101101000101100100111100101100111110101111101110011111000001100001111111000010100100000000001101001100100101001101101011110111111111101111000111100110001011010000100100000111111110010010101101110110111101110010101110000111011110010010110111101111100101000110000010000000110100110111011100110010100010000000000111110110101101111111100001011110011001100010101101110001110100100100000101000000001101101011100010000100111000111001111100010101100111000100111000111011000101001010010111011110100011111000111011111001010000010100101010101111010000110110001110001001000011100010100001010001100111000101101110000000001000011000110110111100101110101111111100001011100001010100001000000001011010100111000000110010110001001011101101001100011110111111110101010000100100101110101000011110101001101110100001001100011111100100110110100111010000011101100111100101011011100010100101110011101111000101111110100111001010010101010011011001010010011110100010111111001000110011000001010111110101010101111000011010111000001110011000011110101001101010010101101000100100011110110100001001000001001100101001011101100011011111001011110001011010101110001111010010001111011101000001010101101010010101001101000110110000101100001001111110010010010011001011000000100100110000001100001100101000001111101100010101100000011001111001011000001111001111110001100100100111000010011001100001011101101101100110001111010111001010011001010011001011111010000010101000011100100101101100100101001100100100011111010111101111110101010011011000110101110001010100110000111111100111000100010011101111011100000001111100001101011001100111101001100111111100001111101111101001101101001010110100111100000001011100000011101101110101011001001100010111101011010110010110000110100101111101001010100010111011010011110110101011111100011100111011111011110101101101111100011100110001011111111011100101010010100011001101100111001001110111100001100110000100100111101000111100111001011110111000101011110000100011100000000100101111110111100000000011100010011101001011010001100001010011101010111011101000100111010011001101101000001101110011101101100111111010011101001110010100010100110111001101110111101001011101101000011111010100100100000000001001001001111100100101111001101001100010010111001110101011111001011001000100010011001011001110101010100000010011100001100000011011001100010100001101111001010001111000000001001111100101111110110011010110010010000000100001000111000100111010100001110110011000001110001001010101011011011000100100110111000101001101001100011110001111010011010110100110011111001011101111011000010011101101111110100111101111000110010001011111111111111011001101110011111001111010100110101100110000011111011011011001101110100001000010111011100111010000110011100010000010001011010100000111101100000110111101010000010101101110101100110000110000110110100101000111010101001001000000111101000000111001010011000110011111010000010110110111101110000101110000011111100111001110001110001011101000010101011100010000100010101001110111010100011100000010101110000111001001111111110010001011011101111100110010011000010011111000000011001110011010011100110010101000001001000001011000100100001011010110000011001111111100110010110100101000000010011111110100111110011011101100101110101110111100010010001010001101110111110111101011101000000101001000100100111101011110011001101111111111010100001010001001110000000110110000101010011100101000100010011100111000000111100010010010000011110001101000010111111100110011000111011010001000111101100111110110011001000101101000001010110101111001100010110100011111111100100101011100101000110011011001110111001010100110000011111011011101000011101000001000001101110101001000100110011001001110011111100101111010100010000100100001001100110010001010000111101011011110110000100111000010010100111111011110011010011100100101000110001011010100100010101000001001000110011000011111100010010000001101101011001001111001011110101010111111100010001010110011101110101011010011000111101101001110011010100101000111010001101011110100110111101010010100001101100010101110100100010100011101001101010100101100100010000110100100000100110011101111111101101101010110001000001011010101110011001010110011110110110011101110110001101100111011110000101101111100011100100011000011011001001111011000001110011111010010011000001100001000000101000011101010101100011010110101001100101110011011100001101001111101010010001001110111110111011011001110000111010111111100000001110110100000001000010011001001000000111010000011101110010010100000100001011111110000110101110000100111011001100101101101011111110100110110011101100000110100111111011111100011101110000100000000011100101010000111101000010111011111100010000110000111110110111010001110101101100011100111110011000110010100010111111100011011100010101110001010001010011000111001001100101100101101101010110100100001101001100011100100110010100101100000000111010001011100000110001000100111110111000111001110101001111110000111011011111011101110111111110100001001011100101010010000010000000011001101101001101100010001000000001011111011001011010110001111011101000110110011111110011101010111101011101011111101001001011111010101100011001100011001101011100010011101011000100111010100001010110010011001001000111111001111011001101111001000001111100000001010101111011011010110101101010100000000111110111111100101111010001000010110110010100110101101000100001001010111101101010001111110100110100001100100001111111011010000110000100111000010101111110100111101110100110111111010010011101111001110001101000001010111001001001000110110000001111101000110111100101010110100101000000101010101000010110101010110011111100101111110001001111100010101011111011101000110100010101100101110010111001100101101111000011111000111101011100010011011001001111010011000100110011111001111001111111101001101110101100110111111000011010101001011001011011000101111000110111001011100001011100000001100100110010100110011000000011011000001111011100011100111000111100111001111110011000101000101011000111001011011101100110010101111000110010100010110000011100001010001100110011100110000001101000001100100100011110111111101100000010110000100110110010001100111100100011011000100110011110101000011001100100111000010100011101100011101000100001111111110010110101111100100100000101011101110000110110011100010001001100010101110010011101110001010001101100011001111000000111000001001000001100001101000010011010110000101001000110110101010100011101010001101100101101011000111100110111010010101010100000110111000100101001011110100000100101010110010001000111010001000001111110100111001110110111110010111011111111101101011100011010111101000110001100000111111001010000011010000100001111000101010110101001100110010011111000101101000100010010101000001001011000101000111111110111001011010011011111111100110111010001111000010000110111011011011101010110001100011101000111100011001110001001010010001101111111011100011101111101100111010011111001110111001001010101100011111111100011101100110001110110011101001100111001101000001110001001101110001111111001101000100010101100010100010011010011010000100110100110100000101000001011111000000000010101010111111110100000111000100011100011111111000110111010100010111111011000001011110011001000011000110011110100110001111001010000111011100001000010011011010110111100100101101110100000000111100010111001101111110110011111000000100111100101110101011110110101011010000000110101111010101111011101101001100000111110100001001010111000000010010011111011011001100000110101010111110011100011000110110100010100100110010111001000010101011100100001011011011100111000110001111100010110101010110110111101011001100001011110100011101110000000101001101001111011001001001101011110111001011010001110000111000011100001010010110011101110110010111110101000100011001011100011000100001100000100001010010111001010100101011111100010001101010110100010001001110100010010011110110100001001000101100010010101000110111001101011101100110011011000101011011100011101110000101011000101101010100101100110010111010110011011111000111101111001001000110010011001011011011110000011100100101110110000001111010001010010111001001110111100001110010100111100001111110010110100110000110000111011011011101010000011000011101001111001100001011110001101100110011111110010101011010001011101000010110101111000110100000010111011101010010110110011011111111000100110110100010110011101100100011110000101000001110000001000000001011101011100110100100010110001110100010110110110001101100010110111110101001010000100000011101100110010110100100011011011000001101110111011111100000001000000110101111110001000001010000100000010001011000111101111010100000010011001101011010011010110111000000000110111001011010001011011011011100100011010001001111111001001100111101011101011011101111001001000100111011011100100110100100110010100000000011100001010011000110100000111001100111101100100011011111010000001000110100110110011101001000101100110010100111001111101100111101010101101100111010000101100001011100011101100010100011101010111101001010100001111101011111101011000001011010101011110000000010000100010000001101000010010001011001000110111110001000100101000000001011110110011110100010001010001001001100100100111101010011010001001101101010011010100001010110011100111000100101100000010110001001110000110101011101011011000101011110011110010001100101011011101000101110100100111101011111011100101100000100001010010100111001001100100011010101101011111000101011001000101011100111110111100101010011100100000110100000011111001111000110100010000101110101011001010110111001101101111010111100100000011011100111011010100010010110011000010101110101110001111010110011111011001000100011001110010100100100100111111010110001111100011010100100000111110110011100111000100011110101011101101000010000110000011110010011001011111010111001111101101000101001000000010101100001010100011101100111101101100001100001111110001001010110011101010101111001101010000110101100010100000001101001110101111001110011111010010001000011111000010000010100100010010011010010100110100100011100111001100001111010011101101001100110000010110010000111001000100000111101101110110111101000101111111001000110010000101001000111101000110010001010110000101001101111010001001110100110110000011101111011111101011111100011111101001011000101000101000111010100010111110111010111011100000010110110100110010011000111001110000000110110001001011101000101010011110101011000000101110111100000001011101000101000110001000100000001100011001101110101000001110011110100001001101000110011110000111010010011111111101011010001011001010011111110111110011010101010010000110100000001001111000111000010111100100110011001000001110000000000110100010011100011100001100000110010000011000010101111101000111111111000110100110001111000110111000101001100011110010110100110110010001100011111000001100010111110100011000001110110101100110100010010101110001110100100100111111011101101111000101000111011111000011111111000010111100101011011010111010101000100000010101100100101101010001011110011011100000100001110101011110010001110100101001111010110111011000110110100100000110011101110000110010001100001000110001011001101010000011010010100101000001001100111001111011000000100111011010101001101011100101110100111101111010110100001101100011101100001101000011111010110111100011000110000010111010111111000001010111100001111000101010100011100000110110010010001011010011101010010011110101000111100000011100011010000000110110001000011101100100000010110101100111000101100111101100101100111001110001011111010111111111101010111101100101100111011110000111101011101001100001010100011011001110111110101111011001111010100010000000010111111111101101010111110101000110111010010101001011100111110010111101111000000000110011111101001101101111110101010011010111011111011101001111001101101101000011101100001100000111000111100101000010010000101011011010010011001101100100110000110100011001000101101101110101101101010100011011100101111001100010111001101100010010011000110100010010101101111101111000001000010101010010010001100001011111101011110001101010010010001010000010100110011111010110101111110101001111101000101000011000000100110110010000101010110010100010011111000100001100011010100001110000000010011110000011000100000111011101000111111000001001011110010000110001101100010110011001001001000010101100110011100010001110101110011001100001011100010001001100111011010111001001100011001111001011001011011100100001010111010001111110101011111000011010011101101000111010101010110111111010000010011010010011011000000101110111110111111001000111011111101010101110000110111011011110110001111101100110111111101000001111101110110100110100001100110001010000100110011000011100011010000010010101011101001100101110010000100011100011011011011011100001011110000010100001101110110111110110001101100100000111111010101111000111000000100111111100010101100111001011000000011000011001101100011100110010111001101110101100110010011010011001110101011000010111110111001101101101111101110101011110010001111111100000101111111010101010101000000101010111101101010011000010100011111000000001111110100111000000101100010100101101011111111010000110111010000110001101010011110001110011100111001111011110111111001000010011111011000101001011100000110000011010100110101101111000000011111110111110101000001001000111110000101000000010100111011001100110110001001010011111010010101101110000011001000010111001111001001011100010111110110011010001010110001101000001100111010010100001001110010101010110010000100000110010110011100000110111101100111100000111000100101011101001111000011000100100101011110001001101110111001000011100100000100010011001100011101000111001011110101101001111011011010011111110111000101110000100001001010001010100001100110000101100010011000100011010000010010101011010110011001000101101100000110101111110010110001001011111110000111000110101000100000111010011101110100001011000110001010010001100010101100111101101000100110001100101100100101000010010010100001101011011011101110100010010010110011101001000101110100000000010101101010010001110010111001011111111100111111101100100101010000111011100111000010110101000001110110110001011100011111110110000110111101010011100110000010001110001110000110000101100100110110111101010110001010010100100001001010110000001100110100100110011111101000011010110101011111000111111100110100111101110011100111011100001111011101100001110001001010010101111110111001111001000000011100010101010001010100011110101011000000100110001100100100000111111011110011100111011100101010010110010100111011011101101010111001111010100000101111100010010101011001010001001010001001001111001111001000001101010101111100111101110101000010010110100000101010001111010100101110110100000000010111011101111100000110101101100010111001001010000011100000100110010000111101001011001000100110100000110101000001011111100111001111011111111101111000101110100010100100001110011000111000010101010010111110010011100011110110001011011000100100101100101000100011100101111010000010111100011111110000101000010011010011101010001001011101000111110111000000100110101100010100101001010111100001100101000010111100101001111111101001111110011110001011000001100011111101100110001010111010110100010001011111011100011001001001000111111100000101101011000100101011001011011001110001101100000110100001001111100111000110011001011010101000001001101100110111110100100000101001000011010110010000011000100001101100111000011111011100110100000110111100000110000100010110011000110110001011101010010001001110111000000100101111100111101100011101101001000010011000001000001011010011101101110001101010111100011110011100100111000110101000100111111111000111000111010000000011011100010111101011010101000110010110011000100101000011100011001100011100010010110010100000001111110001111010111011011100100110001101110000101000101110111111000101000001100011011010110011101101011110000001000111011101001000001101100000001100111101111001101111010010011001011011000010101101010011010010101011110111100001111001001010011101100010011010101101001110110001001000100000110110011001111110011001010101000011011100001100100011101100011000011000111110100000110011100011110111011100101010010101110000110111000101000000100011011111011001101100001011111101011110101101100010001100001011011011101111111010100001000110101011011111011001110010100010101000110010110111111000011010011110011000111000001011000111011100010010110011100110100101110011001001010000100110011001101000001101101010000001011111101011110100010011001101111111001111100010001100001000000011100011001000000001011111010001110110000001000001010010110000011110011101001011000101001010001101110000001111010111001000010010110010010111101101010111110100101100100010001010110111111001000011111001000100100010010101101101000010000000101000000111011001011011100110111010110110001111100001011000001111011010010101010111100100011011110010011010000011110010110000110100111011010000010001001011000010100010011110111010101111101111001011100000001110110110011101110100000111001010011000001001000000111111110000001100110001111111001110111000111010110101111111111111001010111010110111000100100001010111000000010000100000111000100100101000101101011010011000100100111011000110001001101001011111011111111011111001000001111101001011111000000000011000110010110010000011100001111010110001100001110001110101010100100111110110111001011000011010001011111010110001100101010110111000110011111011010011101010111001001110001110000011000010100011111011101101011011100010011111010000100001111110111100010011110000111110101101110110100001110000101101111110011010110000100000111110111001010011001101011011001000010101010011011010010000111000100011110100010101110001011010111110111100010101111000001101011101011001111000101100001001011001101001010011000011010011101011111110101011101000101001100110000001110111001101010001000111111011100010001100110000010010110110000101001000001000011001100010110000010010111011101001010010011001101011010011010110010100100001110001000110101001010110000101101010100001000011001010011111100110001110011101011111011011010010001100110100100000000001000110111111111000110101110011010010011001000001010001100110110111100110011110111100010111011000011110010101110110011100000100001101101000011011110110100100001010001101000110011000100110011101000101110110000010001101000011110001111110100010010011001110011010011101011110001000000101110110111101001001001011010000111110101111010010011011111101010111110110101010101100110111101100011011011000011100111100100010100001000001100110110011110011010110111010001001011110001010101100000110010000010101000001110110000011110000001100000000111111100101100111001000001100011001101010101111011100000101110010001011011011010101101110000111000010101011001100001010000101011001010101000100111001100011101001110001011000010100011100111010000101000011111110010000000100100110100000000101111100011001100111010100011001001000110001000100110000010010100011101011101010011011110111101110100101010011000101010001110010111110110101011110101010100101011010000000010001110010000101001100110010011011111001110110100001011001000001001010010001001000001100001111001100111101000111000100111101001010101011000110000000010000110010010010011001000001010001000000100100101111001000011001000110111101011001010000110100010011011110001100100110110101011101111110000011000010010010010100001100101100111100001010010111001101100000000100010101110010011101010000110100100100111001111001011011101001110000110111011001100001100001000001010000100010001011001101111110010111000001010010001000111011000110001111100100000011110011100110010101000111101010110001000011001010011110011111000100100011000011110001000111011010001110011101011111011001000011101010100000001001010011010111101000111111011001111011111000000001100000101111100110010000110101001100010111111111100010101111010011100010011001001010110101110010010001111001000011101011110000011001111011100000101111010000000110110110100001011011110000010010011011000011001011110101111100010101011011111111110011101110100000100011001111101011111111000010001111000010110110011010001001100011111001011110001010010011110000101111110010000111110011000011110100111100000100011000101011100010000000010100000011011110101000101000101101001100111001111101101010001010010010010001001101100010011011011100100100101110100100011010011011001100110100000011100000101110101011110110100011000001000100101101001100010010001000100000001100100000001000101010101110011100001100100100011000001000110010110101010010100100001000110011100000110100111111101111000110010111001100000101011101010110111110011000001001010000000010001001101011011001011000111001011110111100011010101011011100110110111000011000000101000110000010110110110111110000110110001000101000110001010011010011001110111001100011001010010100110110010000110011010011100100111101110101010001100010111110101010100001111001001000010100100110111100011101101000101001100001110011100110101001011111000001111110000110000101010101100001010000100110010100011111100010110110100001111000010100000011000000111110001010011101001100111000000000011011010110111111111101110110000010001000001001010111111011100111011101101100010011011101111000100010010000000111100010111000000100111010101001110001101111001001010011001000000101100001110001010101111111110011001111001101111011110000010011111010001000011001111000000110101111001110000110011000111100111111011010010100000001001100100001101111101111001011011010001001101010101011010110101011101001111100011011110110000111100001000011001010110101110010000001001111010000110011111010001101010100101100101110111110000011110000100011101110100111111111000111100011110001011001000101111000101101000001101111100000000010111011011000101101110001100000110111001110100110100111101111101010111010111110010101000001110011001100111110011111110000010010101101001010100111110010110001100010000110000100101100011111100000001010011010111010010010111110010011010100110100101010100010100011110000000111010110011101110101010001100110000100111111011011000011100011100000000111001111000110011100110110110101010011011111001000011011100011010111010100111000111100100001101000001001111101000001110011110111010010011010111011111110111000101110001001100110010001010100011100100000101100100100011101010110001100111100100100100010000101101001100000101100010100011000101111101111111110101010111101000111011011011100010011000001111001111101111000100001000110011010110101000010001101100111011011001111001101000101001011001101000010010100011001000000000100010101111111110010100111011001010001110110001101010000100111111100011110101000010000101110101010110011011000010100111000010010110101000010000000010100011100100100001100001111111000011101111111011011111000010101011100010111001010011000011111110100101111100011101110000101111101100101110110100110100111101100110100100100110110111011010110010110000100010111001100000001101011100100000010101111001000100101110110001011100010010111100001000000110110000111010100111000000100100010111001011101100111001100000111101011111010000111001110011011000000001010001111011100001001011000001100000111100110110010101100111001110110110001111111010010000001101010111101000100110001110110010101001100100100111111001010110111011101100000110001111110011101001010010111111001001101010001100101111100100111001000011110010111101111000110110011010010010011101101000010001110110001101001111110010001110100001100100000110010001011011011010010001111100100110111101001100011101110100001011000011011010010010010110100110110111101011011101010010010011010001111000000001101010010100010011011110111010000101010111111010011101111000010011111110010001010011010011000000100101101000101001011101101111010110100011001111000101110001110110110110010000100001110010000000000101111010110000110110100100011001111100101111001001011111101010011110001001110001111101010001110110100010111111000100000011110101101101111010111011101110100110101100110100001100111110001110101111110100110001101011101111100001100000001110010100111100100010000000000111101000110010100001010111101100000001011000101001010001110111101110001100000111010101100010100110001101001110010000110000010100111001011010000111100000110110110110010001110110010011000110101110110110001100010101000000111110111000110100011010000110011101101100001100000110000010111010001011011000100011110000100110110110001101001101010100001011110111011100011010010011100001010101011001100111110101011101111000010010100001000010110110001010100000101110011011111100101011110010000110110100111111010011000011010000111111111110111010010011011110010111001011000010110111010110001100001000000010011111101011001000010001011010110110101000001100111101001001101110100001010111000011010111111101110111100010011010111110000000011110101111000011100101011110011010001000110001111100010010100010110110000101000010000110101011000010110101110110111111101001101100110111010000001010100000000010110000111110001000111100000101000010001111010111101011010000101001001010101111010000101110010100111011001000000110001001011001000100010110110001111001011010111101111001000111010111001010100111011010000101111110000111101110111000000111101010010011001010111001101010111011011100111110001000000111110101100001001000110110101111111111111010000000001100011111010100111110010101110100010001010011111010000100101000110010111111001111001111111111111110000110101010000010110011001111101110100110011011111011001101100001100100011010111111001011110101011010001110110001001010010100110011000001001000001100101101000000101000010011010111100001011001000001111000101011110001010001001110010001011000011010000000011110011000001010101101000001000001001100111101110111100101111001111000000010100001110101111100010001001001001101111110000111010111111011011001011111000111101010010000110011100011110101110101100000101010110111100110101000010000101011010110110011100100110011011100100100001001111000010100011011011001011010111111011101010010100010100010101111010111110010111100011001010011110110000111001000100110100000111111001100100100100000101110110010111001101100111011110010010010100101011101011110111111011000110010101000111001111011011000111010011010010111011110011101010101111101010110100101011010110001010101001100011001011010000011001101011001111001100100001000000111011110110110000001000111010011100001011001010001110100001101110111100110000010001110100010101011011001101110101000000011111001100100110010001110000101010100001101111111010111010010110010100100101000000000111010100011001001111001101100001011011010000111011010101010111101001101111101111100100100001111110010000011101110011101111100101001111011101101010111010100100100110101110111111111011011011101000100000101100111111000111000100110010001011010110010100111000111000001011100100111000010110000100010111110010101001001111111101001010110100101100101100110111100011011000100100011010111101010110001001000110100111001001101011001000001000101111110010111001011010000110100111111110100010101100010001101110101001001001000000001011100010110010100111111100011010010000010000011011111011010100011101111001110110011011001100010011010010101110101000101011110001001001000011000010011000011011100000111011011011111100001010111001011001101001101110101010011011001010110001110001010001111000101101100011011001110001100000010110010110100001111010010010010100000010011010001100110000100101001011100101001001011000110100111000101111110001101010011111110000101000111111000011110111000000100111111001110011100011110011110001110111000101000111011100111111111110100011000001110001111111110111001111010010001110001100011001101000010001010000011001110001001001110100101011011111111011011000010111001101000100111110100011010000111100010010010010101001110001101001011010111001000001010001000000101000101111000010000000011111100101010000011101101100110011110111011010000000111001000110001011100001100001111100011000010101111111101110011010011010110110001011011111010010100001010010001110011011011010110011000100011011010100101111101001010000110001000100100001111111111001010000111010011011011110001111011001100111010000111111000111011001110011100110101111111001000100101111101100101010100011011011010100100110001101011111010001010011111110111111001011010001000100010101111010111010010001111011111010111101111001000110110000011101010000100010011010000100101001011011110001111101110000100100111100001110000110110111000000001111100111111011001111111111101001100101111110111000101010001000011111110011111010011100011001011011111110000000010001100010010010100100111110110111110010011101111101111001001000110110010110111011101110111110110001111000100110001011101000010011110010110101101110100110010111011100110000111100010101110011010010011011110110011111010111101100100010110100001100010011100110001101011000110000000110011001010010010000010101000111000011111111101101010110010010001101011111111100111110010100001100000110000100110000010000111001101110010101111110000100011001011111010000000110010100100011000001100001100011100101001011101000010001011101100000010010011101010011111000011111001111100110110000111101000100111011101100100110010100011010100101010110101110101001101010101001110001001110010100011110000000100001100000001010010000110100011100101001010111011111111001010000100001001001000001101001111110100001000111101111001110011000001000010000111011101111001001111111011011001010000000100101111000011110111010011110001100110111100001010110010100100100000010101100110110100011110000100010101000111011011110100000010100100011000010011010101011111000111101100000010100001000010000010011001000101000000001111101100001111101100010010101110010110111010100011100010001010001110111010011100001111101001100010100101011111111001010111010100101011010101110001001011000011110000010010011011000110001011111011011101010011100011110111000001010111101110111001010010001101100111100111101001010101011010100010111001111111000101111111100011000000001110011110111011111011110001001111011110000000101010010010010110110000010110111000000000100101111010000110011110100000110101011111011101011101101110000110011010011101110110000000001110110101011011001000101111111011010101000111000100011110110110111010011101011111000011011001100010011011111010110100001110111010011000100000110110010100111111010000111110001110000001110101111100111000001111001011100001110000110100000111101110101001010011110000011101010100101100000111111111010010001001001010101111000010111001001100001001101001111010110011100000001110000011011100000111110010011111011110111000100111001010100000011000011101100110011111001010110001111001000010101000100001111011011110011100100111011110101011001000011101100011010000110101011010010010101001010011101100011111000001010010101101111001001011011100010010100010110010001100010010111100011000000100100010101111110101101111111000101100011101110111010111010011100101000001001101101110001110100011110000")
25
+
26
+
27
+ (* Grouping test cases *)
28
+ let suite = "Test Suite for numberOfSubstrings" >::: [
29
+
30
+ "test1" >:: test1;
31
+ "test2" >:: test2;
32
+ "test3" >:: test3;
33
+ "test4" >:: test4;
34
+ "test5" >:: test5;
35
+ "test6" >:: test6;
36
+ "test7" >:: test7;
37
+ ]
38
+
39
+
40
+ (* Running the tests *)
41
+ let () = run_test_tt_main suite
42
+ end
count_the_number_of_substrings_with_dominant_ones/scala_tests/MySuite.scala ADDED
@@ -0,0 +1,32 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ class MySuite extends munit.FunSuite {
3
+
4
+ test("test1") {
5
+ assertEquals(Main.numberOfSubstrings("00011"), 5)
6
+ }
7
+
8
+ test("test2") {
9
+ assertEquals(Main.numberOfSubstrings("101101"), 16)
10
+ }
11
+
12
+ test("test3") {
13
+ assertEquals(Main.numberOfSubstrings(",1,"), 1)
14
+ }
15
+
16
+ test("test4") {
17
+ assertEquals(Main.numberOfSubstrings(",1,0,1,0,1,1,1,0,1,0,"), 34)
18
+ }
19
+
20
+ test("test5") {
21
+ assertEquals(Main.numberOfSubstrings(",0,0,1,0,1,0,0,0,0,1,0,0,1,1,1,1,1,1,0,1,1,0,0,1,0,0,1,0,0,0,1,0,1,0,1,1,1,1,1,1,0,1,0,1,1,1,0,1,1,0,0,0,1,1,0,0,1,0,1,1,0,0,1,0,0,1,1,1,0,0,1,0,1,0,1,1,1,1,0,0,1,1,0,1,0,0,1,0,0,0,0,1,0,1,0,1,0,1,0,0,"), 333)
22
+ }
23
+
24
+ test("test6") {
25
+ assertEquals(Main.numberOfSubstrings(",1,0,0,0,1,0,1,0,1,0,0,0,1,1,1,1,0,1,0,0,0,1,0,0,0,1,1,1,1,1,0,1,1,0,1,0,0,1,0,1,1,0,0,0,0,1,0,1,1,0,0,1,0,1,1,0,0,1,1,0,0,0,0,0,0,0,0,1,0,0,0,1,1,1,0,0,0,1,1,0,0,0,1,0,1,1,1,1,0,1,1,0,1,0,0,1,0,1,0,0,0,1,1,1,1,1,1,0,1,0,1,1,1,0,0,1,1,0,0,1,0,1,1,0,1,0,0,0,0,1,1,1,0,0,1,0,1,1,1,0,1,1,0,1,1,0,1,1,1,1,1,1,0,1,1,0,0,1,0,1,1,1,1,1,1,1,0,0,1,1,0,1,0,1,1,0,1,0,0,1,0,0,0,0,0,0,1,0,0,1,1,0,1,1,1,0,1,1,1,0,1,1,1,1,0,0,0,0,0,1,0,1,0,1,1,0,0,0,1,1,0,1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,1,0,1,0,0,0,0,0,0,1,1,0,0,0,0,1,1,1,0,1,1,0,0,1,1,0,0,1,1,1,1,1,0,0,1,0,1,0,1,1,0,0,0,1,1,1,1,0,0,1,0,0,0,0,1,0,1,0,1,0,0,0,1,0,0,0,0,1,1,1,1,0,1,1,0,1,1,1,1,0,0,1,1,1,0,0,1,0,0,1,1,1,0,1,1,1,1,0,1,0,1,0,1,1,0,0,1,0,0,0,0,1,1,1,0,1,1,0,0,0,1,1,0,1,0,0,0,0,1,1,0,1,0,1,0,1,1,0,1,0,0,1,0,0,1,0,1,0,1,0,0,1,0,1,0,0,1,1,1,0,1,1,0,0,0,1,1,1,1,1,0,0,0,0,0,1,0,1,0,0,1,0,1,0,1,1,0,1,1,1,1,0,0,1,0,0,1,0,1,1,0,1,1,1,0,0,0,1,0,0,1,0,1,0,0,0,1,0,1,1,0,0,1,0,0,0,1,1,0,0,0,1,0,0,1,0,1,1,1,1,0,0,0,1,1,0,0,0,0,0,0,1,0,0,1,0,0,0,1,0,1,0,1,1,1,1,1,1,0,1,0,1,1,0,1,1,1,1,1,1,1,0,0,0,1,0,1,1,0,0,0,1,1,1,0,1,1,1,0,1,1,1,0,1,0,1,1,1,0,1,0,0,1,1,1,0,0,1,0,1,0,0,0,0,0,1,0,0,1,1,0,1,1,0,1,1,1,0,0,0,1,1,1,0,1,0,0,0,1,1,1,1,0,0,0,0,"), 133742)
30
+ }
31
+
32
+ }
count_the_number_of_vowel_strings_in_range/.DS_Store ADDED
Binary file (6.15 kB). View file
 
count_the_number_of_vowel_strings_in_range/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 (vowelStrings [ \"are \", \"amy \", \"u \"] 0 2)," 2 (vowelStrings ["are","amy","u"] 0 2))
13
+
14
+ test2 :: Test
15
+ test2 = TestCase (assertEqual "for (vowelStrings [ \"hey \", \"aeo \", \"mu \", \"ooo \", \"artro \"] 1 4)," 3 (vowelStrings ["hey","aeo","mu","ooo","artro"] 1 4))
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_the_number_of_vowel_strings_in_range/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, vowelStrings(new ArrayList<>(Arrays.asList("are","amy","u")), 0, 2));
15
+ }
16
+ @Test
17
+ public void test2() {
18
+ assertEquals(3, vowelStrings(new ArrayList<>(Arrays.asList("hey","aeo","mu","ooo","artro")), 1, 4));
19
+ }
20
+
21
+ }
count_the_number_of_vowel_strings_in_range/meta.json ADDED
The diff for this file is too large to render. See raw diff
 
count_the_number_of_vowel_strings_in_range/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 (vowelStrings ["are";"amy";"u"] 0 2)
12
+
13
+ let test2 _ = assert_equal 3 (vowelStrings ["hey";"aeo";"mu";"ooo";"artro"] 1 4)
14
+
15
+
16
+ (* Grouping test cases *)
17
+ let suite = "Test Suite for vowelStrings" >::: [
18
+
19
+ "test1" >:: test1;
20
+ "test2" >:: test2;
21
+ ]
22
+
23
+
24
+ (* Running the tests *)
25
+ let () = run_test_tt_main suite
26
+ end
count_the_number_of_vowel_strings_in_range/scala_tests/MySuite.scala ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ class MySuite extends munit.FunSuite {
3
+
4
+ test("test1") {
5
+ assertEquals(Main.vowelStrings(List("are","amy","u"),0,2), 2)
6
+ }
7
+
8
+ test("test2") {
9
+ assertEquals(Main.vowelStrings(List("hey","aeo","mu","ooo","artro"),1,4), 3)
10
+ }
11
+
12
+ }