From 3d84bc901035bec848f466ed45e6e92c62e58402 Mon Sep 17 00:00:00 2001 From: x0x7 Date: Wed, 4 Dec 2024 14:23:25 -0500 Subject: [PATCH] Add 2024/day4/problem1.txt --- 2024/day4/problem1.txt | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 2024/day4/problem1.txt diff --git a/2024/day4/problem1.txt b/2024/day4/problem1.txt new file mode 100644 index 0000000..1f94f50 --- /dev/null +++ b/2024/day4/problem1.txt @@ -0,0 +1,40 @@ +--- Day 4: Ceres Search --- +"Looks like the Chief's not here. Next!" One of The Historians pulls out a device and pushes the only button on it. After a brief flash, you recognize the interior of the Ceres monitoring station! + +As the search for the Chief continues, a small Elf who lives on the station tugs on your shirt; she'd like to know if you could help her with her word search (your puzzle input). She only has to find one word: XMAS. + +This word search allows words to be horizontal, vertical, diagonal, written backwards, or even overlapping other words. It's a little unusual, though, as you don't merely need to find one instance of XMAS - you need to find all of them. Here are a few ways XMAS might appear, where irrelevant characters have been replaced with .: + + +..X... +.SAMX. +.A..A. +XMAS.S +.X.... +The actual word search will be full of letters instead. For example: + +MMMSXXMASM +MSAMXMSMSA +AMXSXMAAMM +MSAMASMSMX +XMASAMXAMM +XXAMMXXAMA +SMSMSASXSS +SAXAMASAAA +MAMMMXMMMM +MXMXAXMASX +In this word search, XMAS occurs a total of 18 times; here's the same word search again, but where letters not involved in any XMAS have been replaced with .: + +....XXMAS. +.SAMXMS... +...S..A... +..A.A.MS.X +XMASAMX.MM +X.....XA.A +S.S.S.S.SS +.A.A.A.A.A +..M.M.M.MM +.X.X.XMASX +Take a look at the little Elf's word search. How many times does XMAS appear? + +To begin, get your puzzle input. \ No newline at end of file