FPEvalDataset/LeetCodeProblem
0304
1 2module Main = struct3 open OUnit24 5 (* Program start *)6 let isPossibleToSplit (nums: int list) : bool = failwith "Not implemented"7 8 (* Program end *)9 10 (* Test cases *)11 12let test1 _ = assert_equal true (isPossibleToSplit [1;1;2;2;3;4])13 14let test2 _ = assert_equal false (isPossibleToSplit [1;1;1;1])15 16let test3 _ = assert_equal false (isPossibleToSplit [79; 98; 70; 52; 79; 93; 39; 1; 73; 8; 33; 89; 99; 78; 78; 42])17 18let test4 _ = assert_equal false (isPossibleToSplit [28; 33; 20; 86; 85; 55; 87; 90; 18; 57; 11; 11; 87; 62; 23; 74; 67; 22; 81; 31; 1; 68; 87; 26; 12; 78; 66; 88; 26; 3; 58; 99; 14; 78; 72; 6; 64; 98])19 20let test5 _ = assert_equal false (isPossibleToSplit [100; 87; 98; 2; 31; 68; 54; 5; 71; 39; 95; 53; 90; 26; 77; 13; 73; 6; 89; 55; 14; 18; 46; 9; 66; 17; 69; 89; 76; 64; 49; 90; 97; 58; 5; 5; 9; 1; 35; 76; 77; 82; 49; 8])21 22let test6 _ = assert_equal false (isPossibleToSplit [71; 63; 77; 63; 91; 18; 89; 39; 41; 49; 64; 58; 26; 99; 14; 40; 69; 44; 85; 58; 26; 48; 92; 45; 48; 77; 46; 27; 21; 25; 17; 10; 4; 72; 43; 43; 7; 48; 6; 79; 34; 56; 21; 1; 57; 89; 78; 48; 93; 49; 88; 65; 12; 74; 33; 9; 18; 73; 53; 43; 29; 3; 22; 58; 25; 46; 72; 86; 76; 5; 85; 11; 14; 14; 41; 97; 9; 54; 41; 53; 57; 33; 43; 44])23 24let test7 _ = assert_equal false (isPossibleToSplit [64; 53; 60; 80; 73; 94; 64; 27; 85; 2; 67; 46; 39; 55; 11; 75; 96; 19; 98; 40; 87; 33; 51; 66; 7; 72; 25; 13; 89; 3; 99; 15; 39; 55; 38; 96; 23; 83; 22; 22; 48; 26; 19; 33; 76; 86; 56; 32; 96; 23; 15; 100; 49; 43; 81; 38; 80; 25; 43; 39; 51; 43; 78; 45; 54; 77; 66; 75; 71; 5; 47; 18; 28; 86; 68; 78; 71; 70; 46; 12; 27; 36; 23; 76; 37; 77; 69; 56; 3; 35; 80; 40; 56; 62; 51; 44])25 26 27 (* Grouping test cases *)28 let suite = "Test Suite for isPossibleToSplit" >::: [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 suite42end43 