From 5b2fc7be38c43883919681b01c9ef31aab33be09 Mon Sep 17 00:00:00 2001 From: Luc Rubio Date: Wed, 4 Dec 2024 22:09:52 +0100 Subject: [PATCH] AoC 2024 day 4 part 1 --- aoc2024/src/day04/__init__.py | 0 aoc2024/src/day04/python/__init__.py | 0 aoc2024/src/day04/python/solution.py | 47 +++++++ aoc2024/test/day04/__init__.py | 0 aoc2024/test/day04/python/__init__.py | 0 aoc2024/test/day04/python/example1.txt | 5 + aoc2024/test/day04/python/example2.txt | 10 ++ aoc2024/test/day04/python/input.txt | 140 +++++++++++++++++++++ aoc2024/test/day04/python/test_solution.py | 35 ++++++ 9 files changed, 237 insertions(+) create mode 100644 aoc2024/src/day04/__init__.py create mode 100644 aoc2024/src/day04/python/__init__.py create mode 100644 aoc2024/src/day04/python/solution.py create mode 100644 aoc2024/test/day04/__init__.py create mode 100644 aoc2024/test/day04/python/__init__.py create mode 100644 aoc2024/test/day04/python/example1.txt create mode 100644 aoc2024/test/day04/python/example2.txt create mode 100644 aoc2024/test/day04/python/input.txt create mode 100644 aoc2024/test/day04/python/test_solution.py diff --git a/aoc2024/src/day04/__init__.py b/aoc2024/src/day04/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/aoc2024/src/day04/python/__init__.py b/aoc2024/src/day04/python/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/aoc2024/src/day04/python/solution.py b/aoc2024/src/day04/python/solution.py new file mode 100644 index 0000000..47e2256 --- /dev/null +++ b/aoc2024/src/day04/python/solution.py @@ -0,0 +1,47 @@ +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +from typing import Sequence + +def _extract_all_lines(input: Sequence[str]) -> Sequence[str]: + lines = [] + width = len(input[0]) + height = len(input) + # Horizontals + for line in input: + lines.append(line) + # Verticals + for x in range(width): + vertical = [] + for y in range(len(input)): + vertical.append(input[y][x]) + lines.append(''.join(vertical)) + # Decreasing diagonals + for delta in range(-width+2, width): + diagonal = [] + for y in range(height): + if 0 <= y+delta < width: + diagonal.append(input[y][y+delta]) + lines.append(''.join(diagonal)) + # Increasing diagonals + for delta in range(-width, width-2): + diagonal = [] + for y in range(height-1, -1, -1): + if 0 <= width-y+delta < width: + diagonal.append(input[y][width-y+delta]) + lines.append(''.join(diagonal)) + return lines + +def count_xmas_words(input: Sequence[str]) -> int: + lines = _extract_all_lines(input) + return sum(line.count('XMAS') for line in lines) + sum(line.count('SAMX') for line in lines) \ No newline at end of file diff --git a/aoc2024/test/day04/__init__.py b/aoc2024/test/day04/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/aoc2024/test/day04/python/__init__.py b/aoc2024/test/day04/python/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/aoc2024/test/day04/python/example1.txt b/aoc2024/test/day04/python/example1.txt new file mode 100644 index 0000000..0a908e1 --- /dev/null +++ b/aoc2024/test/day04/python/example1.txt @@ -0,0 +1,5 @@ +..X... +.SAMX. +.A..A. +XMAS.S +.X.... \ No newline at end of file diff --git a/aoc2024/test/day04/python/example2.txt b/aoc2024/test/day04/python/example2.txt new file mode 100644 index 0000000..a9562d3 --- /dev/null +++ b/aoc2024/test/day04/python/example2.txt @@ -0,0 +1,10 @@ +....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 \ No newline at end of file diff --git a/aoc2024/test/day04/python/input.txt b/aoc2024/test/day04/python/input.txt new file mode 100644 index 0000000..eb8f84a --- /dev/null +++ b/aoc2024/test/day04/python/input.txt @@ -0,0 +1,140 @@ +MMSMXMSASXMXAXMAXSASXXXMASAMX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SMSMASMMMAMMMSMMMSXSMMSSMMMMMMSMMMMSMMAAXAMAMAMAASAAXMAXSASXXSMAMSMMAAAASXSSMMMSAXAASASAMM +SXMMSMAAAAAMAAAMMSMMSXAAAAASMSAXMAMAAMAAAAAASMAAXAXAXSAMAAMASXXMASXSAMXAAAAAXXSAMXSAMXXMMMMAMAMAMMSMSMMSAMSAMAXXMXMASMXSSMMMXAAAASMMMSSMMMSA +XXXXXXMSMMMMMMSMXAXMASXMSXMAAMMSSMSSSMXSMMMMMMSAMSMMMMMSSMSXSASXMMSMAMMMSSMMAMXXMASXSAXMAMSXSXSXSXXMAMXMXXMMMAMXAXMAMSAAXMXMASXMMSXXMAMXXMAX \ No newline at end of file diff --git a/aoc2024/test/day04/python/test_solution.py b/aoc2024/test/day04/python/test_solution.py new file mode 100644 index 0000000..ab15c22 --- /dev/null +++ b/aoc2024/test/day04/python/test_solution.py @@ -0,0 +1,35 @@ +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +import unittest + +from aoc2024.src.day04.python.solution import count_xmas_words +from common.python3.AdventOfCodeTestCase import AdventOfCodeTestCase + + +class TestDay04Solution(AdventOfCodeTestCase): + def __init__(self, *args, **kwargs): + (super(TestDay04Solution, self).__init__(__file__, *args, **kwargs)) + + def test_part1_withExample_counts(self): + self.assertEqual(4, count_xmas_words(self.examples[0])) + + def test_part1_withExample2_counts(self): + self.assertEqual(18, count_xmas_words(self.examples[1])) + + def test_part1_withPuzzleInput_counts(self): + self.assertEqual(2603, count_xmas_words(self.input)) + + +if __name__ == '__main__': + unittest.main()