From e618ba369704afeb7e1f9339f6ca4cf3b1ac4bbd Mon Sep 17 00:00:00 2001 From: Kyle Farnung Date: Wed, 6 Dec 2023 18:14:22 -0800 Subject: [PATCH] [2023] Solution for day 7 --- 2023/day07/README.md | 87 ++ 2023/day07/build.gradle.kts | 11 + .../adventofcode/aoc2023/day07/App.java | 43 + .../adventofcode/aoc2023/day07/Hand.java | 144 +++ .../adventofcode/aoc2023/day07/AppTest.java | 38 + 2023/day07/src/test/resources/input.txt | 1000 +++++++++++++++++ 2023/settings.gradle.kts | 2 +- 7 files changed, 1324 insertions(+), 1 deletion(-) create mode 100644 2023/day07/README.md create mode 100644 2023/day07/build.gradle.kts create mode 100644 2023/day07/src/main/java/com/github/kfarnung/adventofcode/aoc2023/day07/App.java create mode 100644 2023/day07/src/main/java/com/github/kfarnung/adventofcode/aoc2023/day07/Hand.java create mode 100644 2023/day07/src/test/java/com/github/kfarnung/adventofcode/aoc2023/day07/AppTest.java create mode 100644 2023/day07/src/test/resources/input.txt diff --git a/2023/day07/README.md b/2023/day07/README.md new file mode 100644 index 0000000..186b874 --- /dev/null +++ b/2023/day07/README.md @@ -0,0 +1,87 @@ +# Day 7: Camel Cards + +[https://adventofcode.com/2023/day/7](https://adventofcode.com/2023/day/7) + +## Description + +### Part One + +Your all-expenses-paid trip turns out to be a one-way, five-minute ride in an [airship](https://en.wikipedia.org/wiki/Airship). (At least it's a cool airship!) It drops you off at the edge of a vast desert and descends back to Island Island. + +"Did you bring the parts?" + +You turn around to see an Elf completely covered in white clothing, wearing goggles, and riding a large [camel](https://en.wikipedia.org/wiki/Dromedary). + +"Did you bring the parts?" she asks again, louder this time. You aren't sure what parts she's looking for; you're here to figure out why the sand stopped. + +"The parts! For the sand, yes! Come with me; I will show you." She beckons you onto the camel. + +After riding a bit across the sands of Desert Island, you can see what look like very large rocks covering half of the horizon. The Elf explains that the rocks are all along the part of Desert Island that is directly above Island Island, making it hard to even get there. Normally, they use big machines to move the rocks and filter the sand, but the machines have broken down because Desert Island recently stopped receiving the _parts_ they need to fix the machines. + +You've already assumed it'll be your job to figure out why the parts stopped when she asks if you can help. You agree automatically. + +Because the journey will take a few days, she offers to teach you the game of _Camel Cards_. Camel Cards is sort of similar to [poker](https://en.wikipedia.org/wiki/List_of_poker_hands) except it's designed to be easier to play while riding a camel. + +In Camel Cards, you get a list of _hands_, and your goal is to order them based on the _strength_ of each hand. A hand consists of _five cards_ labeled one of `A`, `K`, `Q`, `J`, `T`, `9`, `8`, `7`, `6`, `5`, `4`, `3`, or `2`. The relative strength of each card follows this order, where `A` is the highest and `2` is the lowest. + +Every hand is exactly one _type_. From strongest to weakest, they are: + +* _Five of a kind_, where all five cards have the same label: `AAAAA` +* _Four of a kind_, where four cards have the same label and one card has a different label: `AA8AA` +* _Full house_, where three cards have the same label, and the remaining two cards share a different label: `23332` +* _Three of a kind_, where three cards have the same label, and the remaining two cards are each different from any other card in the hand: `TTT98` +* _Two pair_, where two cards share one label, two other cards share a second label, and the remaining card has a third label: `23432` +* _One pair_, where two cards share one label, and the other three cards have a different label from the pair and each other: `A23A4` +* _High card_, where all cards' labels are distinct: `23456` + +Hands are primarily ordered based on type; for example, every _full house_ is stronger than any _three of a kind_. + +If two hands have the same type, a second ordering rule takes effect. Start by comparing the _first card in each hand_. If these cards are different, the hand with the stronger first card is considered stronger. If the first card in each hand have the _same label_, however, then move on to considering the _second card in each hand_. If they differ, the hand with the higher second card wins; otherwise, continue with the third card in each hand, then the fourth, then the fifth. + +So, `33332` and `2AAAA` are both _four of a kind_ hands, but `33332` is stronger because its first card is stronger. Similarly, `77888` and `77788` are both a _full house_, but `77888` is stronger because its third card is stronger (and both hands have the same first and second card). + +To play Camel Cards, you are given a list of hands and their corresponding _bid_ (your puzzle input). For example: + + 32T3K 765 + T55J5 684 + KK677 28 + KTJJT 220 + QQQJA 483 + + +This example shows five hands; each hand is followed by its _bid_ amount. Each hand wins an amount equal to its bid multiplied by its _rank_, where the weakest hand gets rank 1, the second-weakest hand gets rank 2, and so on up to the strongest hand. Because there are five hands in this example, the strongest hand will have rank 5 and its bid will be multiplied by 5. + +So, the first step is to put the hands in order of strength: + +* `32T3K` is the only _one pair_ and the other hands are all a stronger type, so it gets rank _1_. +* `KK677` and `KTJJT` are both _two pair_. Their first cards both have the same label, but the second card of `KK677` is stronger (`K` vs `T`), so `KTJJT` gets rank _2_ and `KK677` gets rank _3_. +* `T55J5` and `QQQJA` are both _three of a kind_. `QQQJA` has a stronger first card, so it gets rank _5_ and `T55J5` gets rank _4_. + +Now, you can determine the total winnings of this set of hands by adding up the result of multiplying each hand's bid with its rank (`765` \* 1 + `220` \* 2 + `28` \* 3 + `684` \* 4 + `483` \* 5). So the _total winnings_ in this example are _`6440`_. + +Find the rank of every hand in your set. _What are the total winnings?_ + +### Part Two + +To make things a little more interesting, the Elf introduces one additional rule. Now, `J` cards are [jokers](https://en.wikipedia.org/wiki/Joker_(playing_card)) - wildcards that can act like whatever card would make the hand the strongest type possible. + +To balance this, _`J` cards are now the weakest_ individual cards, weaker even than `2`. The other cards stay in the same order: `A`, `K`, `Q`, `T`, `9`, `8`, `7`, `6`, `5`, `4`, `3`, `2`, `J`. + +`J` cards can pretend to be whatever card is best for the purpose of determining hand type; for example, `QJJQ2` is now considered _four of a kind_. However, for the purpose of breaking ties between two hands of the same type, `J` is always treated as `J`, not the card it's pretending to be: `JKKK2` is weaker than `QQQQ2` because `J` is weaker than `Q`. + +Now, the above example goes very differently: + + 32T3K 765 + T55J5 684 + KK677 28 + KTJJT 220 + QQQJA 483 + + +* `32T3K` is still the only _one pair_; it doesn't contain any jokers, so its strength doesn't increase. +* `KK677` is now the only _two pair_, making it the second-weakest hand. +* `T55J5`, `KTJJT`, and `QQQJA` are now all _four of a kind_! `T55J5` gets rank 3, `QQQJA` gets rank 4, and `KTJJT` gets rank 5. + +With the new joker rule, the total winnings in this example are _`5905`_. + +Using the new joker rule, find the rank of every hand in your set. _What are the new total winnings?_ diff --git a/2023/day07/build.gradle.kts b/2023/day07/build.gradle.kts new file mode 100644 index 0000000..4029d22 --- /dev/null +++ b/2023/day07/build.gradle.kts @@ -0,0 +1,11 @@ +plugins { + id("com.github.kfarnung.adventofcode.aoc2023.java-application-conventions") +} + +dependencies { + implementation(project(":utilities")) +} + +application { + mainClass.set("com.github.kfarnung.adventofcode.aoc2023.day07.App") +} diff --git a/2023/day07/src/main/java/com/github/kfarnung/adventofcode/aoc2023/day07/App.java b/2023/day07/src/main/java/com/github/kfarnung/adventofcode/aoc2023/day07/App.java new file mode 100644 index 0000000..e277215 --- /dev/null +++ b/2023/day07/src/main/java/com/github/kfarnung/adventofcode/aoc2023/day07/App.java @@ -0,0 +1,43 @@ +/* + * Solution for Advent of Code 2023 day 7. + */ +package com.github.kfarnung.adventofcode.aoc2023.day07; + +import java.io.IOException; +import java.util.ArrayList; +import java.util.List; +import static com.github.kfarnung.adventofcode.aoc2023.utilities.InputUtils.readLinesFromFile; + +public class App { + public static void main(String[] args) { + try { + List lines = readLinesFromFile(args[0]); + System.out.printf("Part 1: %s%n", getPart1(lines)); + System.out.printf("Part 2: %s%n", getPart2(lines)); + } catch (IOException e) { + e.printStackTrace(); + } + } + + public static String getPart1(List lines) { + return calculateScore(lines, false); + } + + public static String getPart2(List lines) { + return calculateScore(lines, true); + } + + public static String calculateScore(List lines, boolean jokersWild) { + + List hands = new ArrayList<>(); + for (String line : lines) { + hands.add(new Hand(line, jokersWild)); + } + hands.sort(null); + long total = 0; + for (int i = 0; i < hands.size(); i++) { + total += hands.get(i).getBid() * (i + 1); + } + return Long.toString(total); + } +} diff --git a/2023/day07/src/main/java/com/github/kfarnung/adventofcode/aoc2023/day07/Hand.java b/2023/day07/src/main/java/com/github/kfarnung/adventofcode/aoc2023/day07/Hand.java new file mode 100644 index 0000000..e2f0d24 --- /dev/null +++ b/2023/day07/src/main/java/com/github/kfarnung/adventofcode/aoc2023/day07/Hand.java @@ -0,0 +1,144 @@ +package com.github.kfarnung.adventofcode.aoc2023.day07; + +import java.util.HashMap; +import java.util.Map; + +public class Hand implements Comparable { + public enum HandType { + HIGH_CARD, + PAIR, + TWO_PAIR, + THREE_OF_A_KIND, + FULL_HOUSE, + FOUR_OF_A_KIND, + FIVE_OF_A_KIND, + } + + public enum CardValue { + JOKER, + TWO, + THREE, + FOUR, + FIVE, + SIX, + SEVEN, + EIGHT, + NINE, + TEN, + JACK, + QUEEN, + KING, + ACE, + } + + private final CardValue[] cards; + private final HandType score; + private final int bid; + + public Hand(String hand, boolean jokersWild) { + String[] parts = hand.split(" "); + this.bid = Integer.parseInt(parts[1]); + + char[] cards = parts[0].toCharArray(); + this.cards = translateCards(cards, jokersWild); + this.score = calculateScore(cards, jokersWild); + } + + private static CardValue[] translateCards(char[] cards, boolean jokersWild) { + CardValue[] cardValues = new CardValue[cards.length]; + for (int i = 0; i < cards.length; i++) { + cardValues[i] = translateCard(cards[i], jokersWild); + } + return cardValues; + } + + private static CardValue translateCard(char card, boolean jokersWild) { + switch (card) { + case '2': + return CardValue.TWO; + case '3': + return CardValue.THREE; + case '4': + return CardValue.FOUR; + case '5': + return CardValue.FIVE; + case '6': + return CardValue.SIX; + case '7': + return CardValue.SEVEN; + case '8': + return CardValue.EIGHT; + case '9': + return CardValue.NINE; + case 'T': + return CardValue.TEN; + case 'J': + if (jokersWild) { + return CardValue.JOKER; + } + return CardValue.JACK; + case 'Q': + return CardValue.QUEEN; + case 'K': + return CardValue.KING; + case 'A': + return CardValue.ACE; + default: + throw new IllegalArgumentException("Invalid card: " + card); + } + } + + private static HandType calculateScore(char[] cards, boolean jokersWild) { + Map cardCounts = new HashMap<>(); + int jokerCount = 0; + for (char card : cards) { + if (jokersWild && card == 'J') { + jokerCount++; + continue; + } + + cardCounts.put(card, cardCounts.getOrDefault(card, 0) + 1); + } + + if (cardCounts.size() == 1 || jokerCount == 5) { + return HandType.FIVE_OF_A_KIND; + } else if (cardCounts.size() == 2) { + if (cardCounts.containsValue(4 - jokerCount)) { + return HandType.FOUR_OF_A_KIND; + } else { + return HandType.FULL_HOUSE; + } + } else if (cardCounts.size() == 3) { + if (cardCounts.containsValue(3 - jokerCount)) { + return HandType.THREE_OF_A_KIND; + } else { + return HandType.TWO_PAIR; + } + } else if (cardCounts.size() == 4) { + return HandType.PAIR; + } else if (cardCounts.size() == 5) { + return HandType.HIGH_CARD; + } else { + throw new IllegalArgumentException("Invalid hand: " + new String(cards)); + } + } + + public int getBid() { + return bid; + } + + @Override + public int compareTo(Hand o) { + if (score != o.score) { + return score.compareTo(o.score); + } + + for (int i = 0; i < cards.length; i++) { + if (cards[i] != o.cards[i]) { + return cards[i].compareTo(o.cards[i]); + } + } + + return 0; + } +} diff --git a/2023/day07/src/test/java/com/github/kfarnung/adventofcode/aoc2023/day07/AppTest.java b/2023/day07/src/test/java/com/github/kfarnung/adventofcode/aoc2023/day07/AppTest.java new file mode 100644 index 0000000..988d798 --- /dev/null +++ b/2023/day07/src/test/java/com/github/kfarnung/adventofcode/aoc2023/day07/AppTest.java @@ -0,0 +1,38 @@ +/* + * Test cases for Advent of Code 2023 day 7. + */ +package com.github.kfarnung.adventofcode.aoc2023.day07; + +import java.io.IOException; +import java.util.List; + +import org.junit.jupiter.api.Test; + +import static com.github.kfarnung.adventofcode.aoc2023.utilities.InputUtils.readLinesFromResources; +import static org.junit.jupiter.api.Assertions.assertEquals; + +class AppTest { + private final List input = List.of( + "32T3K 765", + "T55J5 684", + "KK677 28", + "KTJJT 220", + "QQQJA 483" + ); + + @Test + void testGetPart1() throws IOException { + assertEquals("6440", App.getPart1(input)); + + List realInput = readLinesFromResources(this, "input.txt"); + assertEquals("253910319", App.getPart1(realInput)); + } + + @Test + void testGetPart2() throws IOException { + assertEquals("5905", App.getPart2(input)); + + List realInput = readLinesFromResources(this, "input.txt"); + assertEquals("254083736", App.getPart2(realInput)); + } +} diff --git a/2023/day07/src/test/resources/input.txt b/2023/day07/src/test/resources/input.txt new file mode 100644 index 0000000..20ce6b3 --- /dev/null +++ b/2023/day07/src/test/resources/input.txt @@ -0,0 +1,1000 @@ +5J984 114 +766KQ 685 +6KQK6 169 +2A663 361 +7T849 916 +AKKQA 144 +99KKK 430 +787J8 587 +7JJ77 757 +5AA9A 561 +A7T4J 166 +Q9A7J 843 +32QT5 11 +88555 936 +99899 421 +K88KK 784 +AA222 806 +6A5T7 911 +5A53A 896 +8J544 827 +99952 377 +9JQ44 950 +KQKK3 670 +963J5 490 +7JJ99 91 +Q6QQJ 571 +26622 866 +68J8T 395 +TQK56 106 +5JJK9 285 +A67AA 197 +99949 645 +56422 955 +A94AJ 636 +8888K 729 +K5993 584 +777J8 445 +2T42T 514 +JTK7J 7 +TA5TT 18 +96J29 249 +44254 801 +44579 130 +QQQAA 903 +A3839 159 +AATAA 511 +6K59A 347 +Q7968 27 +63636 315 +28282 136 +7J44Q 603 +T6JT6 538 +5KA3Q 692 +87Q88 787 +99599 574 +T9AAJ 299 +A737K 663 +7K539 80 +555QQ 240 +5AAAK 897 +233AA 294 +2T233 793 +J5559 357 +T7AJ7 569 +72729 807 +KKQKK 163 +K6KK6 997 +254K5 34 +J7TTK 155 +62Q8T 975 +3AAQK 621 +6QJJQ 500 +AK736 276 +KK666 840 +Q7Q57 260 +836T6 859 +2K22K 5 +97589 216 +ATA2A 783 +5JJ5J 864 +6QJJ6 158 +59K9K 323 +KKK77 893 +33AAA 922 +Q6A3K 669 +6238K 333 +QAQ46 283 +954QK 268 +634TA 471 +22823 393 +A8TQ8 749 +33T3T 727 +5AA77 288 +77KQ7 622 +587KK 42 +AAAKA 736 +T7J77 939 +89A5T 881 +A494K 467 +35T4A 641 +QT85K 937 +7J5T7 337 +QQ4KA 989 +9TA46 492 +7KKKK 224 +JQ478 431 +69665 609 +32Q2Q 967 +QQ9QJ 977 +TAJQK 710 +94448 200 +J4422 678 +2A822 340 +A72K7 179 +J8JJ6 290 +8KAK6 549 +644J6 659 +444K9 612 +3KA97 402 +J3333 928 +96855 261 +Q3K43 779 +33494 303 +4T297 687 +J998A 349 +T999T 860 +79246 341 +97J8J 990 +2J954 448 +338A8 281 +K9999 724 +6666A 327 +JJJ8J 704 +KK5J5 942 +328T5 573 +TT6T4 699 +JQQQQ 961 +Q37TQ 354 +6668K 608 +82222 368 +4449J 650 +TA6AQ 172 +T5J29 383 +52555 24 +A98KA 175 +A2J63 65 +45594 149 +9J784 930 +KJKTK 350 +44484 839 +56585 273 +JQQ46 945 +8JKKK 400 +KK4T4 617 +5K553 1 +2227T 225 +T3TTK 853 +8TT88 404 +8TJ64 270 +A927K 594 +A79A7 589 +JT499 957 +Q88Q8 730 +2A2TQ 913 +AQT58 87 +444AQ 737 +7777J 452 +TTT39 8 +JAAAA 243 +43533 102 +53333 598 +6QQQ6 711 +33JTT 308 +98QQJ 124 +66644 300 +64K36 46 +JT8K9 921 +35AA3 848 +2QQ72 161 +2A4QQ 90 +6J777 52 +9T299 75 +JJ999 204 +7977K 499 +32357 742 +JQTKT 810 +89998 81 +82QTQ 734 +778AQ 522 +T992A 847 +TT85T 138 +K9KQK 841 +Q6654 367 +333JQ 122 +QQ655 219 +76699 966 +4J784 66 +7AJ84 557 +J363T 548 +23487 732 +6635A 604 +22J92 223 +44494 983 +JTTKK 214 +993AA 61 +35462 147 +T6666 94 +5QQ22 946 +58QQ5 607 +569K8 520 +97J7A 940 +9955K 356 +99J9A 797 +57566 863 +77KK7 447 +6K999 504 +QQ6A6 111 +49979 712 +Q888T 882 +45875 611 +Q8A9A 735 +6Q2QQ 648 +44545 370 +4A994 177 +5KQKK 86 +TT9TT 241 +TQQ4T 145 +2366J 705 +J5388 796 +555TK 317 +KK822 959 +T44JA 614 +2Q762 295 +33539 570 +AA7J7 215 +22277 314 +366JA 129 +58888 17 +8A8A8 302 +54499 919 +884JJ 412 +5Q554 150 +AT96K 649 +27K2K 190 +4J2K7 776 +99QA7 886 +A4558 760 +TT3TT 850 +92522 183 +33777 460 +99246 802 +45995 373 +66866 618 +KA77K 496 +66QQ8 221 +55755 780 +658KQ 994 +78T77 910 +K55K5 951 +T9KA7 728 +K6923 97 +T7977 189 +7AAAA 275 +J9666 255 +66736 918 +339Q9 803 +34333 599 +J9599 157 +JATTA 267 +Q336K 312 +J6598 40 +Q8Q8J 537 +T2TTT 76 +7T7T7 502 +24222 682 +55K5J 865 +29692 743 +99276 543 +5KQQQ 938 +7T78K 889 +6577Q 310 +645KA 78 +68222 854 +33K25 998 +66K66 207 +59939 510 +7858J 521 +A9947 55 +T2J3Q 374 +9QJ39 898 +AATA8 733 +AT38T 700 +K7Q29 384 +26JQK 19 +J5333 263 +52K95 525 +QQAQT 459 +88868 808 +9QJ55 233 +3KAA2 651 +7633A 953 +45542 126 +96T88 494 +KKK95 182 +3TQ56 572 +8QTTT 747 +5TTT3 428 +445J5 164 +5788T 399 +7KQKQ 653 +A5688 826 +T3JTT 51 +7JJ79 713 +355AT 782 +TQJKQ 388 +KKT9K 409 +22332 465 +A6566 824 +AJA99 2 +654J6 43 +55T45 948 +7989T 697 +2249J 206 +33336 991 +8932A 472 +5A6T6 245 +2T2TT 429 +9JQJ9 242 +J7JAA 746 +78TQ4 809 +99494 563 +28JA3 547 +A3A9A 389 +9QQTT 696 +73T89 390 +825JQ 186 +737Q3 654 +K33T3 481 +QQ8QQ 418 +66A5A 201 +5Q327 965 +23233 970 +T33TT 26 +T45JJ 420 +88684 32 +KT696 758 +A3A8A 324 +JTA78 518 +J3838 539 +KJAAA 606 +92999 237 +39933 22 +922KA 365 +T44T4 871 +49J3T 680 +66688 716 +8Q68Q 721 +6676J 844 +2K426 986 +Q6J3K 952 +96A64 104 +84448 907 +A9A76 888 +TTT4T 887 +44TKT 805 +22QQ2 123 +78293 208 +58T59 634 +92TKQ 773 +J9J9J 184 +JQQQK 218 +5T88T 885 +T6TT9 980 +22J22 154 +7Q777 364 +47474 909 +AAAA9 979 +75655 292 +TJ942 693 +Q4AT4 9 +T8J85 745 +JJK7K 777 +76T8A 309 +88A7A 332 +74Q3J 656 +56TJ5 211 +23K72 475 +QK8K8 318 +2922Q 264 +T4QQ9 666 +97999 676 +K83T8 173 +552J7 553 +6J7KA 162 +ATA7T 778 +AA94K 681 +83K63 414 +K77K3 441 +544JJ 305 +J2252 625 +46JJ8 25 +4282A 466 +66468 630 +98Q5Q 739 +62346 371 +4K89Q 926 +8222K 462 +4T33T 794 +82T38 534 +5A55A 973 +AAKKJ 535 +6A342 505 +TQTTT 588 +KA8A4 256 +J2454 116 +89K5J 723 +43855 199 +38T47 140 +J9AA2 551 +24242 422 +T2KTK 963 +5493Q 532 +67446 647 +J5QQQ 133 +KK6KK 748 +JTTA8 6 +5A78A 644 +59552 29 +7JAAA 449 +6QK43 686 +8288K 668 +777KJ 917 +87656 869 +55322 901 +5AA5A 544 +48888 222 +4Q794 101 +97979 360 +5J37Q 93 +2QKK9 497 +52525 134 +7847K 923 +TAJTT 879 +4ATQK 64 +53Q22 440 +K843Q 195 +555T5 286 +JQQAA 643 +JQQJQ 506 +J329J 329 +72222 981 +79J99 877 +9QQ97 236 +QJ676 593 +TTJJT 446 +KQAKK 394 +68886 738 +7238T 799 +K32K3 258 +29442 673 +8Q87Q 212 +6J965 444 +A7J45 454 +J99KK 637 +42AA2 105 +J6556 478 +33ATJ 473 +26A6Q 517 +QJQJ5 932 +K45TT 425 +894TK 944 +99A97 411 +A8557 583 +T2T99 398 +K43Q2 397 +K3TT3 72 +QQQQ6 278 +Q5KK5 450 +TT222 660 +TTT7T 185 +4JTQJ 56 +77A77 375 +78888 345 +7AQT2 905 +84A58 899 +4KQ28 230 +T8529 16 +42424 894 +99922 451 +Q9QQ2 352 +32299 403 +2K465 396 +68Q3T 313 +4AJ44 635 +993J3 108 +27772 845 +JAA3A 818 +43242 468 +JQ52J 718 +4K3KK 702 +22KK3 493 +Q5QKA 82 +22666 413 +J3Q29 120 +694K3 876 +888Q8 229 +2AQQ9 271 +843Q9 890 +6476J 250 +82T49 457 +AJ2K2 988 +Q678T 674 +Q4T9T 792 +25274 519 +555TQ 714 +52858 852 +579JJ 355 +JT664 771 +68JQT 559 +K4KKK 455 +QAA9Q 321 +2T2JA 836 +K68J2 706 +JTTT5 69 +TQ58T 580 +ATKT7 464 +7J977 765 +T4487 536 +8K382 672 +54533 284 +92A99 392 +K995J 344 +78737 67 +A5623 319 +389QA 307 +J4244 210 +7799J 156 +3A44A 89 +44458 825 +263K5 213 +TTTJT 228 +33833 862 +333Q9 616 +8J888 639 +4J446 372 +8Q423 193 +4T55T 57 +8949J 731 +KK5K5 331 +Q99AQ 279 +6T262 73 +A725T 53 +59555 4 +2A27A 165 +3A72A 23 +2K5A5 358 +K98TA 822 +55554 100 +777T7 474 +QJAKK 369 +352J5 586 +8A639 615 +63Q3J 655 +26QQJ 829 +TTT66 417 +6QA8A 949 +47A78 31 +47J74 437 +86342 419 +36T59 508 +6Q8K6 891 +646AA 987 +46666 342 +85QK8 320 +98588 289 +96969 251 +K5QQK 85 +J7775 755 +88484 435 +4JAQT 426 +4J5J6 816 +522Q8 741 +83QA5 868 +3J6J3 984 +2J2QQ 15 +44644 247 +6AA6A 912 +4922A 96 +TTAAA 160 +A9JTJ 433 +J5799 59 +K7K72 453 +TTJ9T 873 +J844T 821 +45343 744 +555A5 385 +T724J 812 +46TT7 830 +KQJ29 768 +3K33K 343 +J977K 381 +999J2 664 +4863K 92 +48Q6K 434 +44J4J 971 +99Q99 458 +89898 432 +78772 37 +753J2 756 +7K75A 143 +45556 578 +4Q6AT 287 +K35JK 992 +999KK 338 +Q6KQQ 856 +Q2264 469 +47TKA 107 +85559 280 +88777 239 +45TTJ 766 +QQ988 180 +7A3A3 456 +23397 556 +7TJK2 470 +6T6T6 366 +A585J 391 +2K2Q4 914 +AA6AJ 135 +A4AA4 560 +4TK48 823 +34944 566 +33977 226 +T8TTJ 833 +777K7 170 +9J388 683 +95955 304 +TTQQJ 205 +2T6A2 501 +52424 690 +JAT2J 512 +95566 769 +TA3KJ 633 +55A45 487 +AA333 209 +A5K29 601 +8AA8A 3 +27AK6 610 +44445 786 +2K44Q 137 +9KA59 359 +TQ488 118 +36886 934 +J7KJ5 993 +77787 410 +A777A 44 +76732 626 +3K3KT 838 +KK46K 513 +J3633 781 +J3733 555 +99399 804 +9K6T4 552 +9K9QT 171 +5TT59 408 +8T37J 929 +2864K 12 +55333 259 +4485K 662 +Q7QQQ 336 +TTTTA 638 +Q3T33 947 +98993 296 +J4334 642 +3J999 139 +3QQ44 60 +43K92 597 +56733 695 +22Q39 117 +4J2J8 775 +3QQQ3 217 +66558 795 +AA2K2 762 +22JJ2 531 +85742 851 +87QTK 20 +8JT6T 187 +244Q4 188 +2TT49 335 +44K44 152 +883A9 585 +T6J32 376 +5JK2J 148 +J8J38 379 +36KT2 567 +JT662 602 +JQ5KT 83 +2222Q 627 +Q699Q 763 +9Q24Q 798 +TJ7A5 576 +8958Q 109 +2T73T 322 +Q7493 88 +3J33J 872 +9J8J8 722 +J7A2K 191 +55758 119 +Q6466 326 +79352 115 +3T3K6 252 +464Q4 995 +356J8 740 +J9JQT 540 +96233 554 +92AJ5 79 +42228 709 +4J84K 346 +74A4A 178 +89229 277 +2T6J2 565 +Q9Q99 49 +T33Q2 45 +9Q9A3 985 +63969 541 +Q44QQ 524 +A9999 935 +ATTTA 815 +Q75JQ 238 +4787J 596 +QQ7Q7 564 +5J7T3 386 +98T99 382 +T8J82 884 +64464 297 +TTT2J 753 +699J9 623 +5J755 167 +333A3 751 +JJAAA 867 +A8A58 969 +TKKKK 232 +TT57T 1000 +JJJJJ 35 +Q8Q2Q 906 +44A44 363 +38A2K 203 +J5KAQ 691 +K2KK6 328 +6AQQQ 878 +7K5TA 999 +AQ272 95 +86JAT 298 +7TATQ 125 +3K382 439 +3TT99 509 +TKJJ2 99 +6J4K2 752 +28687 244 +A243A 689 +QQQA8 168 +6AK5Q 407 +3J739 870 +T565T 933 +QTAAQ 351 +539K8 311 +77T9Q 819 +889T5 98 +55T9J 924 +2Q5J3 968 +KQ32Q 631 +5K225 142 +57788 715 +AQQAA 198 +JQ24K 77 +78788 174 +2293J 488 +77772 958 +57995 849 +KT87T 754 +J895J 141 +T36KA 254 +AAA2A 334 +3A999 58 +TJ2JT 416 +K2227 545 +5J3T5 550 +64964 925 +63T69 41 +2TQQ4 837 +KJA87 533 +3778J 528 +JQJ9A 21 +42J36 227 +529K7 196 +QT8K3 832 +J8QQ5 84 +8K6J4 976 +J8JQ8 231 +5AJ8A 591 +Q9T66 498 +7557J 70 +T48JT 476 +75552 632 +AAAQA 282 +75725 401 +T996Q 405 +467T8 39 +KQKQK 620 +4Q237 265 +A9JAA 892 +A3K7Q 772 +3Q6J5 132 +634J3 904 +Q6255 272 +8A9A8 13 +QQQQ5 590 +56566 112 +66477 701 +56QJQ 640 +QAK84 875 +4KQQT 68 +63QTQ 526 +K425T 71 +888KK 362 +J984K 489 +6666J 931 +33732 770 +7227J 482 +KK5K2 895 +A2588 707 +58333 248 +3928K 253 +KKTQK 131 +94A77 121 +Q8688 527 +JQK99 339 +KT335 491 +2J22A 387 +32977 717 +6A6A8 834 +2K2KK 54 +A997A 726 +6J66J 652 +27979 151 +A66T6 235 +4J444 694 +4A8K4 579 +J6AJ4 28 +244QA 74 +366KJ 220 +7T3T3 814 +49494 954 +8866Q 811 +T3K42 613 +7Q878 257 +6793Q 813 +K993K 262 +2544A 306 +9J999 62 +4TT98 47 +22225 790 +JATKA 855 +43726 629 +6T556 820 +AJT2T 523 +2227A 978 +6QQJ6 427 +A4A7A 529 +88882 63 +88T88 791 +555JA 677 +J8J88 708 +KK9KK 516 +45455 831 +T54TT 463 +J3T66 661 +535J9 10 +3A2AA 671 +2J22T 764 +JQ7KK 725 +33337 720 +ATT3J 192 +Q7QTQ 153 +27A3Q 767 +J63JA 423 +KT453 293 +27TTJ 658 +K7Q54 477 +64Q46 436 +984TQ 679 +AAJ54 817 +4K424 858 +55T7Q 575 +79377 274 +4JQ54 194 +434Q2 181 +AJQ8K 128 +2TT92 595 +37J7T 605 +QQ8Q4 920 +4999T 484 +K4K7K 880 +9222K 443 +77767 646 +AJJAJ 964 +A782J 785 +35A7K 789 +QJ42J 703 +4J243 14 +JTAAA 835 +A7425 479 +A5TTA 546 +9Q298 562 +53935 582 +6643Q 406 +4TJJT 507 +26666 234 +QQ5Q2 480 +557AA 624 +TQ35Q 495 +72767 38 +T95A4 146 +88KA5 996 +35735 592 +KJJKK 577 +453K6 883 +AA4AA 542 +67895 530 +KKKKJ 684 +6469Q 316 +648J5 842 +74747 483 +3J63A 874 +4K5TA 960 +65555 915 +26K2K 759 +TT933 941 +AA2J6 667 +33344 675 +KKKAA 788 +55656 600 +634T7 36 +7TTQJ 438 +TJ444 902 +2266J 291 +77775 325 +66JQ6 378 +69669 461 +27K86 568 +493AT 688 +5JJ5A 503 +T5TTT 956 +TJT73 982 +8J272 380 +KT9TT 103 +463A4 48 +66TTK 719 +27QJJ 246 +JQ5Q5 330 +A39T2 900 +QQ33T 800 +5JJ55 774 +38526 424 +77774 828 +A547T 761 +5449J 110 +KKAA4 301 +6T549 176 +39AA3 972 +55977 628 +727A4 127 +4J247 665 +97777 202 +K5Q38 353 +5J555 558 +KA587 943 +77667 908 +KJ7T4 348 +69667 974 +3JT38 750 +33AAQ 415 +TJ22T 962 +76876 927 +75722 515 +A3822 581 +7Q44Q 857 +QQQAQ 33 +9AA9A 266 +Q7QJ2 619 +J7K72 846 +7A6A6 861 +666Q6 657 +333JA 113 +7243A 442 +2KT94 50 +8898T 485 +3AJ53 30 +42J22 698 +585J6 269 +QT527 486 diff --git a/2023/settings.gradle.kts b/2023/settings.gradle.kts index 3ce1451..20ae017 100644 --- a/2023/settings.gradle.kts +++ b/2023/settings.gradle.kts @@ -11,4 +11,4 @@ plugins { } rootProject.name = "aoc2023" -include("day01", "day02", "day03", "day04", "day05", "day06", "utilities") +include("day01", "day02", "day03", "day04", "day05", "day06", "day07", "utilities")