|
|
@ -1,5 +1,6 @@
|
|
|
|
use std::io;
|
|
|
|
use std::env;
|
|
|
|
use std::io::Read;
|
|
|
|
use std::fs::File;
|
|
|
|
|
|
|
|
use std::io::prelude::*;
|
|
|
|
|
|
|
|
|
|
|
|
extern crate advent_of_code_2016;
|
|
|
|
extern crate advent_of_code_2016;
|
|
|
|
use advent_of_code_2016::*;
|
|
|
|
use advent_of_code_2016::*;
|
|
|
@ -7,8 +8,10 @@ use advent_of_code_2016::errors::*;
|
|
|
|
|
|
|
|
|
|
|
|
fn main() {
|
|
|
|
fn main() {
|
|
|
|
run(|| {
|
|
|
|
run(|| {
|
|
|
|
|
|
|
|
let filename = env::args().nth(1).ok_or("")?;
|
|
|
|
|
|
|
|
let mut f = File::open(filename).chain_err(|| "")?;
|
|
|
|
let mut input = String::new();
|
|
|
|
let mut input = String::new();
|
|
|
|
io::stdin().read_to_string(&mut input).ok();
|
|
|
|
f.read_to_string(&mut input).chain_err(|| "")?;
|
|
|
|
|
|
|
|
|
|
|
|
let solution = day_23::solve(&input)?;
|
|
|
|
let solution = day_23::solve(&input)?;
|
|
|
|
println!("{}", solution);
|
|
|
|
println!("{}", solution);
|
|
|
|