rustfmt
This commit is contained in:
@ -1,4 +1,4 @@
|
||||
use std::{collections::HashSet, cmp::min};
|
||||
use std::{cmp::min, collections::HashSet};
|
||||
|
||||
fn main() {
|
||||
const INPUT: &str = include_str!("../input.txt");
|
||||
@ -10,10 +10,16 @@ fn main() {
|
||||
let (first, second) = line.split_once(',').unwrap();
|
||||
|
||||
let first: (&str, &str) = first.split_once('-').unwrap();
|
||||
let first: (u64, u64) = (first.0.parse::<u64>().unwrap(), first.1.parse::<u64>().unwrap());
|
||||
let first: (u64, u64) = (
|
||||
first.0.parse::<u64>().unwrap(),
|
||||
first.1.parse::<u64>().unwrap(),
|
||||
);
|
||||
|
||||
let second: (&str, &str) = second.split_once('-').unwrap();
|
||||
let second: (u64, u64) = (second.0.parse::<u64>().unwrap(), second.1.parse::<u64>().unwrap());
|
||||
let second: (u64, u64) = (
|
||||
second.0.parse::<u64>().unwrap(),
|
||||
second.1.parse::<u64>().unwrap(),
|
||||
);
|
||||
|
||||
let first_set: HashSet<u64> = HashSet::from_iter(first.0..=first.1);
|
||||
let second_set: HashSet<u64> = HashSet::from_iter(second.0..=second.1);
|
||||
|
Reference in New Issue
Block a user