diff --git a/2024/.vscode/launch.json b/2024/.vscode/launch.json deleted file mode 100644 index 5b41424..0000000 --- a/2024/.vscode/launch.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - // Use IntelliSense to learn about possible attributes. - // Hover to view descriptions of existing attributes. - // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 - "version": "0.2.0", - "configurations": [ - - ] -} \ No newline at end of file diff --git a/2024/.vscode/settings.json b/2024/.vscode/settings.json deleted file mode 100644 index 2b73450..0000000 --- a/2024/.vscode/settings.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "rust-analyzer.checkOnSave": false -} \ No newline at end of file diff --git a/2024/day25/main.rs b/2024/day25/main.rs index 586f6c6..f866ff1 100644 --- a/2024/day25/main.rs +++ b/2024/day25/main.rs @@ -30,13 +30,13 @@ fn does_fit(p: (&[usize], &[usize])) -> bool { zip(k, l).all(|(ki, li)| ki + li <= 7) } fn part_1() { - let input_file = include_str!("input.txt"); // Include the file at compile time + let input_file = include_str!("input.txt"); let mut key_heights = Vec::new(); let mut lock_heights = Vec::new(); for block in input_file.split("\n\n") { let lines: Vec<&str> = block.lines().collect(); - if lines[0].contains('.') { + if lines[0].contains('#') { lock_heights.push(get_heights(&lines)); } else { key_heights.push(get_heights(&lines));