Prepare all days, allow params
This commit is contained in:
parent
6206cc2e72
commit
b90d770c8a
18 changed files with 290 additions and 20 deletions
16
src/days/d09.rs
Normal file
16
src/days/d09.rs
Normal file
|
@ -0,0 +1,16 @@
|
||||||
|
use std::fs;
|
||||||
|
|
||||||
|
pub fn solve() {
|
||||||
|
let path = "res/09/input";
|
||||||
|
|
||||||
|
#[allow(unused)]
|
||||||
|
let contents = fs::read_to_string(path).expect("Something went wrong reading the file");
|
||||||
|
|
||||||
|
let result: usize = 0;
|
||||||
|
|
||||||
|
println!("Result 1: {}", result);
|
||||||
|
|
||||||
|
let result: usize = 0;
|
||||||
|
|
||||||
|
println!("Result 2: {}", result);
|
||||||
|
}
|
16
src/days/d10.rs
Normal file
16
src/days/d10.rs
Normal file
|
@ -0,0 +1,16 @@
|
||||||
|
use std::fs;
|
||||||
|
|
||||||
|
pub fn solve() {
|
||||||
|
let path = "res/10/input";
|
||||||
|
|
||||||
|
#[allow(unused)]
|
||||||
|
let contents = fs::read_to_string(path).expect("Something went wrong reading the file");
|
||||||
|
|
||||||
|
let result: usize = 0;
|
||||||
|
|
||||||
|
println!("Result 1: {}", result);
|
||||||
|
|
||||||
|
let result: usize = 0;
|
||||||
|
|
||||||
|
println!("Result 2: {}", result);
|
||||||
|
}
|
16
src/days/d11.rs
Normal file
16
src/days/d11.rs
Normal file
|
@ -0,0 +1,16 @@
|
||||||
|
use std::fs;
|
||||||
|
|
||||||
|
pub fn solve() {
|
||||||
|
let path = "res/11/input";
|
||||||
|
|
||||||
|
#[allow(unused)]
|
||||||
|
let contents = fs::read_to_string(path).expect("Something went wrong reading the file");
|
||||||
|
|
||||||
|
let result: usize = 0;
|
||||||
|
|
||||||
|
println!("Result 1: {}", result);
|
||||||
|
|
||||||
|
let result: usize = 0;
|
||||||
|
|
||||||
|
println!("Result 2: {}", result);
|
||||||
|
}
|
16
src/days/d12.rs
Normal file
16
src/days/d12.rs
Normal file
|
@ -0,0 +1,16 @@
|
||||||
|
use std::fs;
|
||||||
|
|
||||||
|
pub fn solve() {
|
||||||
|
let path = "res/12/input";
|
||||||
|
|
||||||
|
#[allow(unused)]
|
||||||
|
let contents = fs::read_to_string(path).expect("Something went wrong reading the file");
|
||||||
|
|
||||||
|
let result: usize = 0;
|
||||||
|
|
||||||
|
println!("Result 1: {}", result);
|
||||||
|
|
||||||
|
let result: usize = 0;
|
||||||
|
|
||||||
|
println!("Result 2: {}", result);
|
||||||
|
}
|
16
src/days/d13.rs
Normal file
16
src/days/d13.rs
Normal file
|
@ -0,0 +1,16 @@
|
||||||
|
use std::fs;
|
||||||
|
|
||||||
|
pub fn solve() {
|
||||||
|
let path = "res/13/input";
|
||||||
|
|
||||||
|
#[allow(unused)]
|
||||||
|
let contents = fs::read_to_string(path).expect("Something went wrong reading the file");
|
||||||
|
|
||||||
|
let result: usize = 0;
|
||||||
|
|
||||||
|
println!("Result 1: {}", result);
|
||||||
|
|
||||||
|
let result: usize = 0;
|
||||||
|
|
||||||
|
println!("Result 2: {}", result);
|
||||||
|
}
|
16
src/days/d14.rs
Normal file
16
src/days/d14.rs
Normal file
|
@ -0,0 +1,16 @@
|
||||||
|
use std::fs;
|
||||||
|
|
||||||
|
pub fn solve() {
|
||||||
|
let path = "res/14/input";
|
||||||
|
|
||||||
|
#[allow(unused)]
|
||||||
|
let contents = fs::read_to_string(path).expect("Something went wrong reading the file");
|
||||||
|
|
||||||
|
let result: usize = 0;
|
||||||
|
|
||||||
|
println!("Result 1: {}", result);
|
||||||
|
|
||||||
|
let result: usize = 0;
|
||||||
|
|
||||||
|
println!("Result 2: {}", result);
|
||||||
|
}
|
16
src/days/d15.rs
Normal file
16
src/days/d15.rs
Normal file
|
@ -0,0 +1,16 @@
|
||||||
|
use std::fs;
|
||||||
|
|
||||||
|
pub fn solve() {
|
||||||
|
let path = "res/15/input";
|
||||||
|
|
||||||
|
#[allow(unused)]
|
||||||
|
let contents = fs::read_to_string(path).expect("Something went wrong reading the file");
|
||||||
|
|
||||||
|
let result: usize = 0;
|
||||||
|
|
||||||
|
println!("Result 1: {}", result);
|
||||||
|
|
||||||
|
let result: usize = 0;
|
||||||
|
|
||||||
|
println!("Result 2: {}", result);
|
||||||
|
}
|
16
src/days/d16.rs
Normal file
16
src/days/d16.rs
Normal file
|
@ -0,0 +1,16 @@
|
||||||
|
use std::fs;
|
||||||
|
|
||||||
|
pub fn solve() {
|
||||||
|
let path = "res/16/input";
|
||||||
|
|
||||||
|
#[allow(unused)]
|
||||||
|
let contents = fs::read_to_string(path).expect("Something went wrong reading the file");
|
||||||
|
|
||||||
|
let result: usize = 0;
|
||||||
|
|
||||||
|
println!("Result 1: {}", result);
|
||||||
|
|
||||||
|
let result: usize = 0;
|
||||||
|
|
||||||
|
println!("Result 2: {}", result);
|
||||||
|
}
|
16
src/days/d17.rs
Normal file
16
src/days/d17.rs
Normal file
|
@ -0,0 +1,16 @@
|
||||||
|
use std::fs;
|
||||||
|
|
||||||
|
pub fn solve() {
|
||||||
|
let path = "res/17/input";
|
||||||
|
|
||||||
|
#[allow(unused)]
|
||||||
|
let contents = fs::read_to_string(path).expect("Something went wrong reading the file");
|
||||||
|
|
||||||
|
let result: usize = 0;
|
||||||
|
|
||||||
|
println!("Result 1: {}", result);
|
||||||
|
|
||||||
|
let result: usize = 0;
|
||||||
|
|
||||||
|
println!("Result 2: {}", result);
|
||||||
|
}
|
16
src/days/d18.rs
Normal file
16
src/days/d18.rs
Normal file
|
@ -0,0 +1,16 @@
|
||||||
|
use std::fs;
|
||||||
|
|
||||||
|
pub fn solve() {
|
||||||
|
let path = "res/18/input";
|
||||||
|
|
||||||
|
#[allow(unused)]
|
||||||
|
let contents = fs::read_to_string(path).expect("Something went wrong reading the file");
|
||||||
|
|
||||||
|
let result: usize = 0;
|
||||||
|
|
||||||
|
println!("Result 1: {}", result);
|
||||||
|
|
||||||
|
let result: usize = 0;
|
||||||
|
|
||||||
|
println!("Result 2: {}", result);
|
||||||
|
}
|
16
src/days/d19.rs
Normal file
16
src/days/d19.rs
Normal file
|
@ -0,0 +1,16 @@
|
||||||
|
use std::fs;
|
||||||
|
|
||||||
|
pub fn solve() {
|
||||||
|
let path = "res/19/input";
|
||||||
|
|
||||||
|
#[allow(unused)]
|
||||||
|
let contents = fs::read_to_string(path).expect("Something went wrong reading the file");
|
||||||
|
|
||||||
|
let result: usize = 0;
|
||||||
|
|
||||||
|
println!("Result 1: {}", result);
|
||||||
|
|
||||||
|
let result: usize = 0;
|
||||||
|
|
||||||
|
println!("Result 2: {}", result);
|
||||||
|
}
|
16
src/days/d20.rs
Normal file
16
src/days/d20.rs
Normal file
|
@ -0,0 +1,16 @@
|
||||||
|
use std::fs;
|
||||||
|
|
||||||
|
pub fn solve() {
|
||||||
|
let path = "res/20/input";
|
||||||
|
|
||||||
|
#[allow(unused)]
|
||||||
|
let contents = fs::read_to_string(path).expect("Something went wrong reading the file");
|
||||||
|
|
||||||
|
let result: usize = 0;
|
||||||
|
|
||||||
|
println!("Result 1: {}", result);
|
||||||
|
|
||||||
|
let result: usize = 0;
|
||||||
|
|
||||||
|
println!("Result 2: {}", result);
|
||||||
|
}
|
16
src/days/d21.rs
Normal file
16
src/days/d21.rs
Normal file
|
@ -0,0 +1,16 @@
|
||||||
|
use std::fs;
|
||||||
|
|
||||||
|
pub fn solve() {
|
||||||
|
let path = "res/21/input";
|
||||||
|
|
||||||
|
#[allow(unused)]
|
||||||
|
let contents = fs::read_to_string(path).expect("Something went wrong reading the file");
|
||||||
|
|
||||||
|
let result: usize = 0;
|
||||||
|
|
||||||
|
println!("Result 1: {}", result);
|
||||||
|
|
||||||
|
let result: usize = 0;
|
||||||
|
|
||||||
|
println!("Result 2: {}", result);
|
||||||
|
}
|
16
src/days/d22.rs
Normal file
16
src/days/d22.rs
Normal file
|
@ -0,0 +1,16 @@
|
||||||
|
use std::fs;
|
||||||
|
|
||||||
|
pub fn solve() {
|
||||||
|
let path = "res/22/input";
|
||||||
|
|
||||||
|
#[allow(unused)]
|
||||||
|
let contents = fs::read_to_string(path).expect("Something went wrong reading the file");
|
||||||
|
|
||||||
|
let result: usize = 0;
|
||||||
|
|
||||||
|
println!("Result 1: {}", result);
|
||||||
|
|
||||||
|
let result: usize = 0;
|
||||||
|
|
||||||
|
println!("Result 2: {}", result);
|
||||||
|
}
|
16
src/days/d23.rs
Normal file
16
src/days/d23.rs
Normal file
|
@ -0,0 +1,16 @@
|
||||||
|
use std::fs;
|
||||||
|
|
||||||
|
pub fn solve() {
|
||||||
|
let path = "res/23/input";
|
||||||
|
|
||||||
|
#[allow(unused)]
|
||||||
|
let contents = fs::read_to_string(path).expect("Something went wrong reading the file");
|
||||||
|
|
||||||
|
let result: usize = 0;
|
||||||
|
|
||||||
|
println!("Result 1: {}", result);
|
||||||
|
|
||||||
|
let result: usize = 0;
|
||||||
|
|
||||||
|
println!("Result 2: {}", result);
|
||||||
|
}
|
16
src/days/d24.rs
Normal file
16
src/days/d24.rs
Normal file
|
@ -0,0 +1,16 @@
|
||||||
|
use std::fs;
|
||||||
|
|
||||||
|
pub fn solve() {
|
||||||
|
let path = "res/24/input";
|
||||||
|
|
||||||
|
#[allow(unused)]
|
||||||
|
let contents = fs::read_to_string(path).expect("Something went wrong reading the file");
|
||||||
|
|
||||||
|
let result: usize = 0;
|
||||||
|
|
||||||
|
println!("Result 1: {}", result);
|
||||||
|
|
||||||
|
let result: usize = 0;
|
||||||
|
|
||||||
|
println!("Result 2: {}", result);
|
||||||
|
}
|
16
src/days/d25.rs
Normal file
16
src/days/d25.rs
Normal file
|
@ -0,0 +1,16 @@
|
||||||
|
use std::fs;
|
||||||
|
|
||||||
|
pub fn solve() {
|
||||||
|
let path = "res/25/input";
|
||||||
|
|
||||||
|
#[allow(unused)]
|
||||||
|
let contents = fs::read_to_string(path).expect("Something went wrong reading the file");
|
||||||
|
|
||||||
|
let result: usize = 0;
|
||||||
|
|
||||||
|
println!("Result 1: {}", result);
|
||||||
|
|
||||||
|
let result: usize = 0;
|
||||||
|
|
||||||
|
println!("Result 2: {}", result);
|
||||||
|
}
|
38
src/main.rs
38
src/main.rs
|
@ -16,23 +16,23 @@ fn main() {
|
||||||
"6" => days::d06::solve(),
|
"6" => days::d06::solve(),
|
||||||
"7" => days::d07::solve(),
|
"7" => days::d07::solve(),
|
||||||
"8" => days::d08::solve(),
|
"8" => days::d08::solve(),
|
||||||
//"9" => days::d09::solve(),
|
"9" => days::d09::solve(),
|
||||||
//"10" => days::d10::solve(),
|
"10" => days::d10::solve(),
|
||||||
//"11" => days::d11::solve(),
|
"11" => days::d11::solve(),
|
||||||
//"12" => days::d12::solve(),
|
"12" => days::d12::solve(),
|
||||||
//"13" => days::d13::solve(),
|
"13" => days::d13::solve(),
|
||||||
//"14" => days::d14::solve(),
|
"14" => days::d14::solve(),
|
||||||
//"15" => days::d15::solve(),
|
"15" => days::d15::solve(),
|
||||||
//"16" => days::d16::solve(),
|
"16" => days::d16::solve(),
|
||||||
//"17" => days::d17::solve(),
|
"17" => days::d17::solve(),
|
||||||
//"18" => days::d18::solve(),
|
"18" => days::d18::solve(),
|
||||||
//"19" => days::d19::solve(),
|
"19" => days::d19::solve(),
|
||||||
//"20" => days::d20::solve(),
|
"20" => days::d20::solve(),
|
||||||
//"21" => days::d21::solve(),
|
"21" => days::d21::solve(),
|
||||||
//"22" => days::d22::solve(),
|
"22" => days::d22::solve(),
|
||||||
//"23" => days::d23::solve(),
|
"23" => days::d23::solve(),
|
||||||
//"24" => days::d24::solve(),
|
"24" => days::d24::solve(),
|
||||||
//"25" => days::d25::solve(),
|
"25" => days::d25::solve(),
|
||||||
_ => println!("Day not implemented"),
|
_ => println!("Day not implemented"),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -78,7 +78,6 @@ fn all_days() {
|
||||||
days::d08::solve();
|
days::d08::solve();
|
||||||
time = _print_elapsed(time);
|
time = _print_elapsed(time);
|
||||||
|
|
||||||
/*
|
|
||||||
println!("\nDay 9");
|
println!("\nDay 9");
|
||||||
days::d09::solve();
|
days::d09::solve();
|
||||||
time = _print_elapsed(time);
|
time = _print_elapsed(time);
|
||||||
|
@ -131,7 +130,6 @@ fn all_days() {
|
||||||
days::d21::solve();
|
days::d21::solve();
|
||||||
time = _print_elapsed(time);
|
time = _print_elapsed(time);
|
||||||
|
|
||||||
|
|
||||||
println!("\nDay 22");
|
println!("\nDay 22");
|
||||||
days::d22::solve();
|
days::d22::solve();
|
||||||
time = _print_elapsed(time);
|
time = _print_elapsed(time);
|
||||||
|
@ -146,7 +144,7 @@ fn all_days() {
|
||||||
|
|
||||||
println!("\nDay 25");
|
println!("\nDay 25");
|
||||||
days::d25::solve();
|
days::d25::solve();
|
||||||
_print_elapsed(time);*/
|
_print_elapsed(time);
|
||||||
|
|
||||||
println!("\nTotal elapsed: {}ms", start.elapsed().as_millis())
|
println!("\nTotal elapsed: {}ms", start.elapsed().as_millis())
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue