You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
67 lines
1.6 KiB
67 lines
1.6 KiB
#![feature(str_strip)]
|
|
extern crate reqwest;
|
|
extern crate tempfile;
|
|
|
|
use crate::problem1::lib::Problem1;
|
|
use crate::problem2::lib::Problem2;
|
|
use crate::problem3::lib::Problem3;
|
|
use crate::problem4::lib::Problem4;
|
|
use crate::problem5::lib::Problem5;
|
|
use crate::problem6::lib::Problem6;
|
|
use crate::problem7::lib::Problem7;
|
|
use crate::problem8::lib::Problem8;
|
|
|
|
mod problem1;
|
|
mod problem2;
|
|
mod problem3;
|
|
mod problem4;
|
|
mod problem5;
|
|
mod problem6;
|
|
mod problem7;
|
|
mod problem8;
|
|
mod util;
|
|
|
|
|
|
pub trait Problem {
|
|
// Parses input and generates state
|
|
fn new(input: &String) -> Self;
|
|
|
|
// Runs on state
|
|
fn run_part1(&self);
|
|
fn run_part2(&self);
|
|
}
|
|
|
|
fn main() {
|
|
// let problem1 = Problem1::new(&util::get_problem(1));
|
|
// problem1.run_part1();
|
|
// problem1.run_part2();
|
|
|
|
//let problem2 = Problem2::new(&util::get_problem(2));
|
|
//problem2.run_part1();
|
|
//problem2.run_part2();
|
|
|
|
// let problem3 = Problem3::new(&util::get_problem(3));
|
|
// problem3.run_part1();
|
|
// problem3.run_part2();
|
|
|
|
// let problem4 = Problem4::new(&util::get_problem(4));
|
|
// problem4.run_part1();
|
|
// problem4.run_part2();
|
|
|
|
// let problem5 = Problem5::new(&util::get_problem(5));
|
|
// problem5.run_part1();
|
|
// problem5.run_part2();
|
|
|
|
// let problem6 = Problem6::new(&util::get_problem(6));
|
|
// problem6.run_part1();
|
|
// problem6.run_part2();
|
|
|
|
/*let problem7 = Problem7::new(&util::get_problem(7));
|
|
problem7.run_part1();
|
|
problem7.run_part2();*/
|
|
|
|
let problem8 = Problem8::new(&util::get_problem(8));
|
|
problem8.run_part1();
|
|
problem8.run_part2();
|
|
}
|