From 10e85ffcb93028107d034c7d11eb74d7392de9ef Mon Sep 17 00:00:00 2001 From: Maciej Jur Date: Fri, 16 Dec 2022 18:52:29 +0100 Subject: [PATCH] 2022 day 16 part 1 --- 2022/rust/inputs/day16.txt | 56 ++++++++++++++++++++++++++++++++ 2022/rust/src/solutions/day16.rs | 2 +- 2 files changed, 57 insertions(+), 1 deletion(-) create mode 100644 2022/rust/inputs/day16.txt diff --git a/2022/rust/inputs/day16.txt b/2022/rust/inputs/day16.txt new file mode 100644 index 0000000..7d79241 --- /dev/null +++ b/2022/rust/inputs/day16.txt @@ -0,0 +1,56 @@ +Valve AA has flow rate=0; tunnels lead to valves RZ, QQ, FH, IM, VJ +Valve FE has flow rate=0; tunnels lead to valves TM, TR +Valve QZ has flow rate=19; tunnels lead to valves HH, OY +Valve TU has flow rate=17; tunnels lead to valves NJ, IN, WN +Valve RG has flow rate=0; tunnels lead to valves IK, SZ +Valve TM has flow rate=0; tunnels lead to valves FE, JH +Valve JH has flow rate=4; tunnels lead to valves NW, QQ, TM, VH, AZ +Valve NW has flow rate=0; tunnels lead to valves JH, OB +Valve BZ has flow rate=0; tunnels lead to valves XG, XF +Valve VS has flow rate=0; tunnels lead to valves FF, GC +Valve OI has flow rate=20; tunnel leads to valve SY +Valve IK has flow rate=0; tunnels lead to valves RG, TR +Valve RO has flow rate=0; tunnels lead to valves UZ, YL +Valve LQ has flow rate=0; tunnels lead to valves IZ, PA +Valve GG has flow rate=18; tunnels lead to valves GH, VI +Valve NJ has flow rate=0; tunnels lead to valves TU, UZ +Valve SY has flow rate=0; tunnels lead to valves OI, ZL +Valve HH has flow rate=0; tunnels lead to valves QZ, WN +Valve RZ has flow rate=0; tunnels lead to valves AA, UZ +Valve OF has flow rate=0; tunnels lead to valves YL, IZ +Valve IZ has flow rate=9; tunnels lead to valves OF, FH, VH, JZ, LQ +Valve OB has flow rate=0; tunnels lead to valves UZ, NW +Valve AH has flow rate=0; tunnels lead to valves FF, ZL +Valve ZL has flow rate=11; tunnels lead to valves SY, VI, AH +Valve BF has flow rate=0; tunnels lead to valves PA, YL +Valve OH has flow rate=0; tunnels lead to valves CU, JZ +Valve VH has flow rate=0; tunnels lead to valves IZ, JH +Valve AZ has flow rate=0; tunnels lead to valves JC, JH +Valve XG has flow rate=0; tunnels lead to valves BZ, PA +Valve OY has flow rate=0; tunnels lead to valves PZ, QZ +Valve IM has flow rate=0; tunnels lead to valves FM, AA +Valve GO has flow rate=0; tunnels lead to valves VJ, TR +Valve YL has flow rate=8; tunnels lead to valves JC, RO, OF, BF, FM +Valve TY has flow rate=0; tunnels lead to valves SZ, TS +Valve UZ has flow rate=5; tunnels lead to valves OB, NJ, RO, RZ, GC +Valve XF has flow rate=21; tunnel leads to valve BZ +Valve RY has flow rate=0; tunnels lead to valves TR, FF +Valve QQ has flow rate=0; tunnels lead to valves JH, AA +Valve TS has flow rate=0; tunnels lead to valves TY, FF +Valve GC has flow rate=0; tunnels lead to valves VS, UZ +Valve JC has flow rate=0; tunnels lead to valves AZ, YL +Valve JZ has flow rate=0; tunnels lead to valves IZ, OH +Valve IN has flow rate=0; tunnels lead to valves TH, TU +Valve FM has flow rate=0; tunnels lead to valves IM, YL +Valve FH has flow rate=0; tunnels lead to valves AA, IZ +Valve VJ has flow rate=0; tunnels lead to valves AA, GO +Valve TH has flow rate=0; tunnels lead to valves CU, IN +Valve TR has flow rate=7; tunnels lead to valves FE, IK, RY, GO +Valve GH has flow rate=0; tunnels lead to valves GG, FF +Valve SZ has flow rate=10; tunnels lead to valves RG, TY +Valve PA has flow rate=16; tunnels lead to valves XG, LQ, BF +Valve PZ has flow rate=0; tunnels lead to valves CU, OY +Valve VI has flow rate=0; tunnels lead to valves ZL, GG +Valve CU has flow rate=22; tunnels lead to valves PZ, OH, TH +Valve WN has flow rate=0; tunnels lead to valves TU, HH +Valve FF has flow rate=13; tunnels lead to valves VS, RY, AH, TS, GH diff --git a/2022/rust/src/solutions/day16.rs b/2022/rust/src/solutions/day16.rs index 620377c..925a63b 100644 --- a/2022/rust/src/solutions/day16.rs +++ b/2022/rust/src/solutions/day16.rs @@ -4,7 +4,7 @@ use crate::utils; pub fn run() -> () { - let lines = utils::read_lines(utils::Source::Day(-1)); + let lines = utils::read_lines(utils::Source::Day(16)); let data = parse_data(&lines); println!("Day 16");