1
0

Finally working \o/

This commit is contained in:
Pcornat 2022-12-10 12:29:37 +01:00
parent 88549528a8
commit 660cca5d23
Signed by: Pcornat
GPG Key ID: 2F3932FF46D9ECA0

View File

@ -4,7 +4,9 @@ pub fn mutual_inclusion(first_pair: &[u32], second_pair: &[u32]) -> bool {
}
pub fn complete_overlap(first_pair: &[u32], second_pair: &[u32]) -> bool {
(second_pair[0] <= first_pair[0] && first_pair[0] <= second_pair[1]) || (second_pair[0] <= first_pair[1] && first_pair[1] <= second_pair[1])
first_pair[0] >= second_pair[0] && first_pair[0] <= second_pair[1]
|| first_pair[1] >= second_pair[0] && first_pair[1] <= second_pair[1]
|| mutual_inclusion(first_pair, second_pair)
}
pub fn solve(file_path: &str, unary_operator: &dyn Fn(&[u32], &[u32]) -> bool) -> i32 {