prepare files y2024d16
This commit is contained in:
		
							
								
								
									
										64
									
								
								y2024/src/days/d16.rs
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										64
									
								
								y2024/src/days/d16.rs
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,64 @@ | ||||
| pub fn process_part1(input: &str) -> i32 { | ||||
|     0 | ||||
| } | ||||
|  | ||||
| pub fn process_part2(input: &str) -> i32 { | ||||
|     0 | ||||
| } | ||||
|  | ||||
| #[cfg(test)] | ||||
| mod tests { | ||||
|     use super::*; | ||||
|  | ||||
|     const INPUT_1: &str = "############### | ||||
| #.......#....E# | ||||
| #.#.###.#.###.# | ||||
| #.....#.#...#.# | ||||
| #.###.#####.#.# | ||||
| #.#.#.......#.# | ||||
| #.#.#####.###.# | ||||
| #...........#.# | ||||
| ###.#.#####.#.# | ||||
| #...#.....#.#.# | ||||
| #.#.#.###.#.#.# | ||||
| #.....#...#.#.# | ||||
| #.###.#.#.#.#.# | ||||
| #S..#.....#...# | ||||
| ###############"; | ||||
|  | ||||
|     const INPUT_2: &str = "################# | ||||
| #...#...#...#..E# | ||||
| #.#.#.#.#.#.#.#.# | ||||
| #.#.#.#...#...#.# | ||||
| #.#.#.#.###.#.#.# | ||||
| #...#.#.#.....#.# | ||||
| #.#.#.#.#.#####.# | ||||
| #.#...#.#.#.....# | ||||
| #.#.#####.#.###.# | ||||
| #.#.#.......#...# | ||||
| #.#.###.#####.### | ||||
| #.#.#...#.....#.# | ||||
| #.#.#.#####.###.# | ||||
| #.#.#.........#.# | ||||
| #.#.#.#########.# | ||||
| #S#.............# | ||||
| #################"; | ||||
|  | ||||
|     #[test] | ||||
|     fn part1_1() { | ||||
|         let result = process_part1(INPUT_1); | ||||
|         assert_eq!(result, 7036); | ||||
|     } | ||||
|  | ||||
|     #[test] | ||||
|     fn part1_2() { | ||||
|         let result = process_part1(INPUT_2); | ||||
|         assert_eq!(result, 11048); | ||||
|     } | ||||
|  | ||||
|     #[test] | ||||
|     fn part2() { | ||||
|         let result = process_part2(INPUT_1); | ||||
|         assert_eq!(result, 0); | ||||
|     } | ||||
| } | ||||
		Reference in New Issue
	
	Block a user