From f69ff1ffd7b13a3fc0b13c08eeeeaee8b773732d Mon Sep 17 00:00:00 2001 From: endernon Date: Wed, 4 Dec 2024 23:38:59 +0000 Subject: [PATCH] i finally solved it --- 2024/day4/part1/src/main.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/2024/day4/part1/src/main.rs b/2024/day4/part1/src/main.rs index 8e2c485..5d5c4a5 100644 --- a/2024/day4/part1/src/main.rs +++ b/2024/day4/part1/src/main.rs @@ -41,10 +41,10 @@ fn main() { let widthleft = x >= 4; - let widthright = (lenx - x) >= 4; + let widthright = (lenx - x) >= 3; // search algorithm starts here - // check if the char is s + // check if the char is X if frfrvec[y][x] == 'X' { println!("x is {x}"); println!("y is {y}");