51 lines
836 B
Rust
51 lines
836 B
Rust
#![feature(test)]
|
|
use anyhow::Result;
|
|
use aoc::Solver;
|
|
|
|
// -- Runners --
|
|
fn main() -> Result<()> {
|
|
Day::solve()
|
|
}
|
|
|
|
#[cfg(test)]
|
|
mod tests {
|
|
use super::*;
|
|
|
|
#[test]
|
|
fn part1_test1() -> Result<()> {
|
|
Day::test(Day::part1, "test-1", TEST)
|
|
}
|
|
|
|
// Benchmarks
|
|
extern crate test;
|
|
#[bench]
|
|
#[ignore]
|
|
fn part1_bench(b: &mut test::Bencher) {
|
|
Day::benchmark(aoc::Part::ONE, b)
|
|
}
|
|
#[bench]
|
|
#[ignore]
|
|
fn part2_bench(b: &mut test::Bencher) {
|
|
Day::benchmark(aoc::Part::TWO, b)
|
|
}
|
|
}
|
|
|
|
// -- Solution --
|
|
pub struct Day;
|
|
impl aoc::Solver for Day {
|
|
type Output1 = TYPE;
|
|
type Output2 = TYPE;
|
|
|
|
fn day() -> u8 {
|
|
DAY
|
|
}
|
|
|
|
fn part1(input: &str) -> Self::Output1 {
|
|
DEFAULT
|
|
}
|
|
|
|
fn part2(input: &str) -> Self::Output2 {
|
|
DEFAULT
|
|
}
|
|
}
|