day 10 part 2 (1st version, need huge cleanup)

This commit is contained in:
2021-12-11 09:24:03 +01:00
parent 34acd4012b
commit fb5be18e18
3 changed files with 134 additions and 17 deletions

View File

@@ -56,8 +56,6 @@ In the above example, an illegal ) was found twice (2*3 = 6 points), an illegal
Find the first illegal character in each corrupted line of the navigation subsystem. What is the total syntax error score for those errors?
Your puzzle answer was 367059.
The first half of this puzzle is complete! It provides one gold star: *
--- Part Two ---
Now, discard the corrupted lines. The remaining lines are incomplete.
@@ -100,3 +98,7 @@ The five lines' completion strings have total scores as follows:
Autocomplete tools are an odd bunch: the winner is found by sorting all of the scores and then taking the middle score. (There will always be an odd number of scores to consider.) In this example, the middle score is 288957 because there are the same number of scores smaller and larger than it.
Find the completion string for each incomplete line, score the completion strings, and sort the scores. What is the middle score?
Your puzzle answer was 1952146692.
Both parts of this puzzle are complete! They provide two gold stars: **