aoc

My solutions for the Advent of Code
git clone https://git.tronto.net/aoc
Download | Log | Files | Refs | README

a.rs (189B)


      1 mod common;
      2 use common::*;
      3 
      4 fn main() {
      5     let contained = |a: (i64, i64), b: (i64, i64)| a.0 >= b.0 && a.1 <= b.1;
      6     println!("{}", count(|a, b| contained(a, b) || contained(b, a)));
      7 }