From f0a02d0f5d190cb6ecb8b84a257bad1a0cbd0c9e Mon Sep 17 00:00:00 2001 From: x0x7 Date: Wed, 4 Dec 2024 17:44:28 -0500 Subject: [PATCH] Add 2024/day4/problem2.txt --- 2024/day4/problem2.txt | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 2024/day4/problem2.txt diff --git a/2024/day4/problem2.txt b/2024/day4/problem2.txt new file mode 100644 index 0000000..e16b0a2 --- /dev/null +++ b/2024/day4/problem2.txt @@ -0,0 +1,25 @@ +--- Part Two --- +The Elf looks quizzically at you. Did you misunderstand the assignment? + +Looking for the instructions, you flip over the word search to find that this isn't actually an XMAS puzzle; it's an X-MAS puzzle in which you're supposed to find two MAS in the shape of an X. One way to achieve that is like this: + +M.S +.A. +M.S +Irrelevant characters have again been replaced with . in the above diagram. Within the X, each MAS can be written forwards or backwards. + +Here's the same example from before, but this time all of the X-MASes have been kept instead: + +.M.S...... +..A..MSMS. +.M.S.MAA.. +..A.ASMSM. +.M.S.M.... +.......... +S.S.S.S.S. +.A.A.A.A.. +M.M.M.M.M. +.......... +In this example, an X-MAS appears 9 times. + +Flip the word search from the instructions back over to the word search side and try again. How many times does an X-MAS appear? \ No newline at end of file