mirror of
https://github.com/Noratrieb/advent-of-code.git
synced 2026-01-17 02:55:01 +01:00
init 12
This commit is contained in:
parent
01e3733421
commit
4a45b157dd
6 changed files with 1069 additions and 0 deletions
15
2023/day12/Cargo.toml
Normal file
15
2023/day12/Cargo.toml
Normal file
|
|
@ -0,0 +1,15 @@
|
||||||
|
[package]
|
||||||
|
name = "day12"
|
||||||
|
version = "0.1.0"
|
||||||
|
edition = "2021"
|
||||||
|
|
||||||
|
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||||
|
|
||||||
|
[dependencies]
|
||||||
|
nom.workspace = true
|
||||||
|
helper.workspace = true
|
||||||
|
divan.workspace = true
|
||||||
|
|
||||||
|
[[bench]]
|
||||||
|
name = "benches"
|
||||||
|
harness = false
|
||||||
3
2023/day12/benches/benches.rs
Normal file
3
2023/day12/benches/benches.rs
Normal file
|
|
@ -0,0 +1,3 @@
|
||||||
|
fn main() {
|
||||||
|
day12::bench();
|
||||||
|
}
|
||||||
1000
2023/day12/input.txt
Normal file
1000
2023/day12/input.txt
Normal file
File diff suppressed because it is too large
Load diff
0
2023/day12/input_small.txt
Normal file
0
2023/day12/input_small.txt
Normal file
48
2023/day12/src/lib.rs
Normal file
48
2023/day12/src/lib.rs
Normal file
|
|
@ -0,0 +1,48 @@
|
||||||
|
use helper::{Day, Variants};
|
||||||
|
|
||||||
|
pub fn main() {
|
||||||
|
helper::main::<Day12>(include_str!("../input.txt"));
|
||||||
|
}
|
||||||
|
|
||||||
|
struct Day12;
|
||||||
|
|
||||||
|
helper::define_variants! {
|
||||||
|
day => crate::Day12;
|
||||||
|
part1 {
|
||||||
|
basic => crate::part1;
|
||||||
|
}
|
||||||
|
part2 {
|
||||||
|
basic => crate::part2;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
impl Day for Day12 {
|
||||||
|
fn part1() -> Variants {
|
||||||
|
part1_variants!(construct_variants)
|
||||||
|
}
|
||||||
|
|
||||||
|
fn part2() -> Variants {
|
||||||
|
part2_variants!(construct_variants)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
fn part1(_input: &str) -> u64 {
|
||||||
|
0
|
||||||
|
}
|
||||||
|
|
||||||
|
fn part2(_input: &str) -> u64 {
|
||||||
|
0
|
||||||
|
}
|
||||||
|
|
||||||
|
helper::tests! {
|
||||||
|
day12 Day12;
|
||||||
|
part1 {
|
||||||
|
small => 0;
|
||||||
|
default => 0;
|
||||||
|
}
|
||||||
|
part2 {
|
||||||
|
small => 0;
|
||||||
|
default => 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
helper::benchmarks! {}
|
||||||
3
2023/day12/src/main.rs
Normal file
3
2023/day12/src/main.rs
Normal file
|
|
@ -0,0 +1,3 @@
|
||||||
|
fn main() {
|
||||||
|
day12::main();
|
||||||
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue