b.rs (193B)
1 mod common; 2 use common::*; 3 4 fn main() { 5 let overlap = |a: (i64, i64), b: (i64, i64)| 6 (a.0 >= b.0 && a.0 <= b.1) || (b.0 >= a.0 && b.0 <= a.1); 7 println!("{}", count(overlap)); 8 }
![]() | aocMy solutions for the Advent of Code |
git clone https://git.tronto.net/aoc | |
Download | Log | Files | Refs | README |
b.rs (193B)
1 mod common; 2 use common::*; 3 4 fn main() { 5 let overlap = |a: (i64, i64), b: (i64, i64)| 6 (a.0 >= b.0 && a.0 <= b.1) || (b.0 >= a.0 && b.0 <= a.1); 7 println!("{}", count(overlap)); 8 }