From b8cb2cb0b9413e287cf2a100a18b25deae8b1d8f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mika=C3=ABl=20Capelle?= Date: Sat, 3 Dec 2022 11:42:09 +0100 Subject: [PATCH] Day 3. --- 2022/day1.py | 5 +- 2022/day2.py | 9 +- 2022/day3.py | 25 ++++ 2022/inputs/day3.txt | 300 +++++++++++++++++++++++++++++++++++++++++++ README.md | 7 + 5 files changed, 338 insertions(+), 8 deletions(-) create mode 100644 2022/day3.py create mode 100644 2022/inputs/day3.txt create mode 100644 README.md diff --git a/2022/day1.py b/2022/day1.py index 0a20466..af1a525 100644 --- a/2022/day1.py +++ b/2022/day1.py @@ -1,9 +1,8 @@ # -*- encoding: utf-8 -*- -from pathlib import Path +import sys -with open(Path(__file__).parent.joinpath("inputs", "day1.txt")) as fp: - lines = fp.readlines() +lines = sys.stdin.readlines() # we store the list of calories for each elf in values, and we use the last element # of values to accumulate diff --git a/2022/day2.py b/2022/day2.py index 132654e..fc68605 100644 --- a/2022/day2.py +++ b/2022/day2.py @@ -1,6 +1,8 @@ # -*- encoding: utf-8 -*- -from pathlib import Path +import sys + +lines = sys.stdin.readlines() # the solution relies on replacing rock / paper / scissor by values 0 / 1 / 2 and using # modulo-3 arithmetic @@ -11,10 +13,7 @@ from pathlib import Path # we read the lines in a Nx2 in array with value 0/1/2 instead of A/B/C or X/Y/Z for # easier manipulation -with open(Path(__file__).parent.joinpath("inputs", "day2.txt")) as fp: - values = [ - (ord(row[0]) - ord("A"), ord(row[2]) - ord("X")) for row in fp.readlines() - ] +values = [(ord(row[0]) - ord("A"), ord(row[2]) - ord("X")) for row in lines] def score_1(ux: int, vx: int) -> int: diff --git a/2022/day3.py b/2022/day3.py new file mode 100644 index 0000000..9391aa7 --- /dev/null +++ b/2022/day3.py @@ -0,0 +1,25 @@ +# -*- encoding: utf-8 -*- + +import string +import sys + +lines = [line.strip() for line in sys.stdin.readlines()] + +# extract content of each part +parts = [(set(line[: len(line) // 2]), set(line[len(line) // 2 :])) for line in lines] + +# priorities +priorities = {c: i + 1 for i, c in enumerate(string.ascii_letters)} + +# part 1 +part1 = sum(priorities[c] for p1, p2 in parts for c in p1.intersection(p2)) +print(f"score 1 is {part1}") + +# part 2 +n_per_group = 3 +part2 = sum( + priorities[c] + for i in range(0, len(lines), n_per_group) + for c in set.intersection(*map(set, (lines[i : i + n_per_group]))) +) +print(f"score 2 is {part2}") diff --git a/2022/inputs/day3.txt b/2022/inputs/day3.txt new file mode 100644 index 0000000..6cef3e4 --- /dev/null +++ b/2022/inputs/day3.txt @@ -0,0 +1,300 @@ +LLBPGtltrGPBMMsLcLMMVMpVRhhfCDTwRwRdTfwDllRRRDhC +gNFJHJFgtZFJjZJHNNFWZWZwwDjCwSDhfCDbdwjfwDTTDT +gmQNZnZNHWnqmQpLtVLMBsPpBqrL +HlHldQtHlctzppdQtjdczHhJRnnhGNVmVRJmVjCVFCNh +LgWNgggZJZGFhCZr +DbqPswwMvDPqzlBNHtzfHdwd +tJgtJwwCtNvPHHPtHzDsdRTsBRDDWgWTgT +QhLQjLGjZQFlFZmnmGLDrzWfRldrTrzTBRWTzs +bFFmFZjhSFHvBCvCvJpb +MSGcvnvMGMJgWJDpdndZwBnppfCp +VPVfQQVbshZNZwdNDwNs +LtLbjmQRLmVhQtTbfgWjJgFFcrqqrGSqWg +fHfCNCwwHfGhcntntrrgHrQnrn +FVqpSpbPpjSVMjqvVmVvMzlzwJnbtnnlzQQlrWzJgt +PTqqRRPSRSmqSpPpSpRZwGCLGscCNLZZZTNdNZ +pQQQslVSVzzCQnZSlplzbLcHZHcrrrbZqFbZjbFm +gWtvPgdMDDtFDHHjJJbbccbrLW +MhNvwwDfDfdtvRQnpFNNTlSRSn +ZTnSnTTzqvFmVzvWWm +ClpCgltHNrtgsHdpLCHtDCNLVvQvVwVmwcsWQGMMQvcGcFcv +JmrgCHCNJtlmHmNhnJjnnnjJhPfhSJ +BgRRZTgHHvRTRmRNLNNhQWlmGFfJlWlhsQshpF +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DlDlnPPFFHTMTdMZjTTcjsqqcsdfGdcp +HLzZfHWWQwpgVHjVHr +JlMlMGGDMtJGdtJhqtlccDgVCSTFFSCSDTggpvFTjSgS +JcGRMlthtlVNMJRfzWsPnQsnnZNZns +zVfvMpsbtQmtBlFWBZ +lLSrlNTNRSFRFhhHRmPR +dnSJjjwJJGwwnzVlvpszvccM +SmlcCrpnrnznGzSBBSfzNbtsQsWZQcFbWctcbbZb +JHgwJPjvdghbbWdDZGNLZb +JjghvvhRwhwJVhHTzmfRfzGSMrzBfnGC +JbCmrbnzmntnVJjbCHJJFQFvqgJgQgqLDQ +NGhhhhPMGhWsSSchWlNsCLBBlLFQCgqvgCFFgQBg +PdcNWWcdGdPssPPNTSNNtzbTwjntzbbVwtZpCVnb +tGNgtsNQHsJmwwzddmQw +hMhhDBwMhDDfCRRBjFDDTTWjdWmrmdWqjlmmmjJz +RSpSSBhppDhRncRLswZLGvtGvNcNtL diff --git a/README.md b/README.md new file mode 100644 index 0000000..9f7469c --- /dev/null +++ b/README.md @@ -0,0 +1,7 @@ +# Advent Of Code + +To run any script, you need to pipe the input: + +```bash +cat 2022/inputs/day2.txt | python 2022/day2.py +```