My solutions of Advent of Code 2022
- Creates a new source file
src/bin/day_${day_number}_${title}.rs
- Creates an empty test input file
test_inputs/day_${day_number}_${title}.txt
- Creates an empty input file
inputs/day_${day_number}_${title}.txt
- Executes the program for given day on test input data
- Executes the program for given day on input data
fn main() {
let args: Vec<String> = env::args().collect();
let filename = &args[1];
let contents = fs::read_to_string(filename).expect("Cannot read file");
let numbers = contents.lines().map(|v| v.parse::<i64>().unwrap());
}
- Put together utility functions for working with intervals