Skip to content

Commit

Permalink
reafctor
Browse files Browse the repository at this point in the history
  • Loading branch information
Fadi88 committed Dec 26, 2024
2 parents d9e0df3 + 0b24b46 commit 6d3f8f7
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 14 deletions.
9 changes: 0 additions & 9 deletions 2024/.vscode/launch.json

This file was deleted.

3 changes: 0 additions & 3 deletions 2024/.vscode/settings.json

This file was deleted.

4 changes: 2 additions & 2 deletions 2024/day25/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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));
Expand Down

0 comments on commit 6d3f8f7

Please sign in to comment.