• Ever wanted an RSS feed of all your favorite gaming news sites? Go check out our new Gaming Headlines feed! Read more about it here.
  • We have made minor adjustments to how the search bar works on ResetEra. You can read about the changes here.

Randdalf

Member
Oct 28, 2017
4,167
Day 22: https://github.com/Randdalf/aoc19/blob/master/d22.py

I figured out 99% of this puzzle on my own (with the help of Wikipedia), but I got horribly stuck trying to figure out how to repeat the shuffles. It turns out, I actually had the answer sitting in front of me the whole time: I'd done all the rearranging of repeated shuffles on paper and spotted the repeating series, and I was fairly sure that series could be represented by a single formula, but had no idea what to search for. Feeling lost, I was browsing the Reddit answer thread, and somebody mentioned geometric series and suddenly it clicked. I haven't studied them in so long I'd completely forgotten they existed.

Satisfying to solve it. But never again please.
 

Lafazar

Member
Oct 25, 2017
1,579
Bern, Switzerland
Day 24:
I tracked every state for every depth as a 25 bit binary number as heavily implied by Part 1. Then I made binary masks of the neighbours for same, less and higher depth for each position and used binary AND between the masks and their corresponding adjacent states to get only the neighbouring bits. Then all the neighbours are summed up and the fate of each bit determined.

This took me forever because I had lots of bu... no, I won't either.
Hidden content
You need to reply to this thread in order to see this content.
 
Last edited:

Qronicle

Member
Oct 27, 2017
719
Belgium
I didn't have many budweisers today and came to the correct solution pretty fast.
Fun day today, although I don't like it when part 2 has basically nothing in common with part1.

Day 22 though -_-
I figured out I have to do everything backwards, wrote functions for that, but now...
 

ChrisR

Member
Oct 26, 2017
6,798
I know I'm behind everyone else, but I don't think my current solution to 16p2 is going to work... I started it, made a cup of coffee, came back and saw that it was still on loop 1 of 100 >_<
 

Lafazar

Member
Oct 25, 2017
1,579
Bern, Switzerland
I know I'm behind everyone else, but I don't think my current solution to 16p2 is going to work... I started it, made a cup of coffee, came back and saw that it was still on loop 1 of 100 >_<
Yeah, I had the exact same problem at first. Hint:
Check what percentage of the signal is skipped by the message offset and compare what that would mean for the given example.
 

Zevenberge

Member
Oct 27, 2017
570
Same to you (and everyone else) :) Shared first place.

My first points too :D

Played through the "choose your own adventure" game by hand. It would be heartless not to do so. You can see a lot of love has been put into it, trying to fit small jokes everywhere.
 

Lafazar

Member
Oct 25, 2017
1,579
Bern, Switzerland
Congratulations to everyone who finished this.

Day 25:
That text adventure was cute as hell. I also went through the adventure manually, drawing the map by hand. It is small enough and contains too many dangerous items (I laughed hard after taking the endless loop) so that doing it automatically would not work very well anyway.

I used GrayCode to try the different item combinations on the pressure plate, since this way I only have to drop or pick up one item before each try.

After that I had to go back to day 18 and finally found the problem and fixed it. Now it runs really quickly and gives the correct solution (it was off by 2 before because I had processed the nodes in the incorrect order for Dijkstra and made a slight detour in the middle 3x3 square in one of the paths because of that).

Since I solved the problems for all 25 days in one giant Jupyter Notebook, just for fun I measured the time it takes to run through all cells and calculate the solution for all the problems one after the other. It's 2 minutes, 3 seconds. The longest time is spent on day 12 and finding the cycles for each coordinate.

Hidden content
You need to reply to this thread in order to see this content.

This was a lot of fun, if quite time consuming. I feel I learned a whole lot about Python. Especially how powerful and useful dictionaries are, where I did not fully understand their use before. I also learned that I am quite slow and make a lot of stupid mistakes. I really need to get better and more systematic at debugging.
 

Lafazar

Member
Oct 25, 2017
1,579
Bern, Switzerland
Is it too late to join? I'm only a few weeks behind lol.
It's never too late. I find these just wonderful for learning. I learned more about programming just by looking up all the stuff that is required than I did in years. I'm going through the previous AOC events now. There are some really cool and funny ideas in these puzzles that I will certainly try to use on my pupils (of course in a much simplified version, the difficulty would be a bit high for them).
 

opticalmace

Member
Oct 27, 2017
4,030
It's never too late. I find these just wonderful for learning. I learned more about programming just by looking up all the stuff that is required than I did in years. I'm going through the previous AOC events now. There are some really cool and funny ideas in these puzzles that I will certainly try to use on my pupils (of course in a much simplified version, the difficulty would be a bit high for them).
Awesome, I'll give it a go!
 

Qronicle

Member
Oct 27, 2017
719
Belgium
Went back to day 18 today, got all examples working in a reasonable amount of time, low and behold... the result I get for my real input is wrong -_-

Anybody willing to see which result I should be getting for part 1?

This is my input:
Code:
#################################################################################
#.#.......#...........#...#............p#.....#.#...#...........#..w............#
#.#.#.###.#.#.#####.###.#.#########.###.#.###.#.#.#.#.#######.#.#######.#######.#
#...#.#...#.#.#...#.#...#.........#...#.#.#.#.#...#...#.....#.#.....#...#.......#
#.###.#.#####.#.#.###.###########.###U#.#.#.#.#.#######.###.#.#####.#.###.#######
#.#.#.#.......#.#...#...#.......#.#...#.#.#.#.#...#.......#.#...#.#.#...#.#.....#
#J#.#.#########.###.#.#.#.#######.#.###.#.#.#.#####.#######.#.#.#.#.#.#.###.###.#
#...#.........#...#.#.#.#.#.....#.#.#...#.#.#.......#.#.....#.#.#.#.#.#...#.#.#.#
###.#########.###.#.###.#.#.###.#.#.#.###.#.#########.#.#######.#.#.#####.#.#.#.#
#...#...#...#.#...#.#...#...#...#.#.#...#.....#.....#.#...#...#.#...#.L.#.#.#.#o#
#.###.###.#.#.#.###.#.#######.#.#.#.#########.#.###.#.###.#.#.#.###.#.#.#.#.#.#.#
#...#...#.#...#.#.....#...#...#.#.#.E...#...#...#.#.#...#...#.#...#...#.#...#.#.#
###.###.#.#####.#######.#.#.###.#.#.###.###.#####.#.###.#####.#.#.#####.#.###.#.#
#.....#.#...#...#...#...#...#...#.#.#...#...#.....#.#...#...#.#.#.#.....#.T..d#.#
#####.#.###.#.###.#.###.#####.###.###.#.#.#.#.###.#.#.#.###.#.#.#.###.#########.#
#...#...#...#.....#...#.....#z..#.....#.#.#...#...#.#.#.#...#.#.#...#...........#
#.#.#####.#.#########.#.###.###########.#.#######.#.#.#.#.#.#.#.###.###########.#
#.#...#...#...#.#.....#.#...#.........#.#.#.....#.#.#.#...#.#.#.#...#...#...#...#
#.###.#.#####.#.#.#####.#.###.#.#######.#.#.###.###.#.#####.#.###.###.#.#.#.#.###
#.#...#.#...#.#.#.#.....#.....#...#.....#.#...#.....#.....#.#...#.#...#...#...#.#
#.###.#.#.###.#.#.#####X#########.#.#####.###.#######.###.#.###V#.#.#########.#.#
#.S.#...#...#...#...#.#.#...#...#.#.....#..b#.....#.#...#.#.#...#.#.....#...#...#
#.#.#####.#.###.###.#.#.#.###.#.#.#####.#.#.#####.#.#.###.#.#####.#######.#.#####
#.#.#.....#...#...#...#.#.....#.#.....#.#.#.....#.#.#.#...#.....#.........#s....#
#.#.#.#######I###.#####.#######.#####.#.#.#######.#.#.#.#########.#############.#
#.#.#.#...#.....#.....#.#...#.......#.#.#.#.....#.#...#.#.......#.#...#.......#.#
###.#.###.#.#########.#.#.#.#.#####.#.#.#.#.###.#.#####.#.#####.#.#.#.###.###.#.#
#...#.#...#...#...#...#...#...#...#.#...#.#...#.#.#...#.#...#...#...#.....#m#.#.#
#.###.#.#####.#.#.#.###########.#.#.#####.###.#.#.#.#.#.###.#.#############.#.#.#
#...#.#.....#...#.#.#.#.........#.#.#...#...#.#.#...#.#.....#.................#.#
###.#.###.#.#####.#.#.#.#########.#.#.#.#.#.#.#.#####.#########################.#
#...#.....#...#.#...#.#.#.#.......#.#.#.#.#...#.....#.....#...................#.#
#.###########.#.#####.#G#.#.#####.#.#.#.#.#########.#####.#.#################.#.#
#.........#...#.......#...#.#.....#...#.#.........#.....#.#.#...............#...#
#.#######.#.###.#########.#.#.#########.#########.#.#####.#.#.###########.#.###.#
#q#.#.....#.....#.....#..k#r#.#.........#.#.......#.....#...#...#.......#.#...#.#
#.#.#.###########.###.#.###.###.#########.#.###########.#######.#.#.###.#.#####.#
#...#.#...#.......#.#.#.#.#...#.#.....#.#.#.#.....#...#.........#.#.#..g#.C.#...#
###.#.#.#.#.#######.#.#.#.###.#.#.###.#.#.#.#.###.#.#.#############.#.#####.#.###
#...#...#.......A..c#.......#.....#...........#.....#.......R.......#.....#.....#
#######################################.@.#######################################
#.....#.....#...#................f....#.................F...#.........#.........#
#.###.###.###.#.#.###.###############.#.#.#########.#.#####.#.###.###.#.#######.#
#.#.......#...#...#...#.....#.......#...#...#.....#.#.#.#...#...#...#.#.Q.#...#.#
#.#########.#######.###.###.#.#.#######.#####.###.###.#.#.#####.###.#####.#.###.#
#.........#...#.......#.#.#.#.#.....#...#.....#.......#.#.....#.#...#.......#...#
#.#######.###.#.#######.#.#.#######.#.###.#############.#####.#.#.###.#######.#.#
#.Ot#.#.....#.#...#...#.#.#...#.....#...#...#...#.......#.....#.#.......#.#...#.#
###.#.#.#####.#####.#.#.#.###.#.###.###.#.#.#.#.#####.#.#.#############.#.#.###.#
#.#.#.#.....#.......#.....#...#.#.#.#...#.#...#.....#.#.#.#..a......#.....#.#...#
#.#.#.#####.###############.###.#.#.#.###.#########.#.#.#.#####.###.#######.#.###
#.#.#.....#...........#.....#...#.#.#.#.#.#.......#.#.#.#...#...#.......#...#...#
#.#.###.#####.#####.###.#####.###.#.#.#.###.#####.#.#.#.###.#.#########.#.#####.#
#.#.....#.....#.#...#...#.....#...#.#...#...#...#...#.#...#.#.....#.......#.....#
#.###.###.#####.#.###.###.#####.#.#.###.#.###.#.#####.#.###.#.###K###############
#.....#...#...#.....#.#.....#...#...#...#.....#.#.....#.#...#.#...#.....#.....N.#
#.#####.###.###.#####.#####.#.#######.###.#####.###.#####.###.#.#.#.###.#.#####.#
#.#.....#...#...#.....#.....#.....#.#.#.#.....#...#.....#...#.#.#.#...#...#...#.#
#.#.#####.#.#.###.#####.#########.#.#.#.#####.###.#.###.###.###.#.###.#####.###.#
#.#.....#.#...#.#.#.........#.....#.#.#.#...#.#.#.#...#.........#...#.#.....#...#
#.#####M#.#####.#.#####.###.#####.#.#.#.#.#.#.#.#.###################.#.#.###.###
#...#...#.#.....#.....#...#.....#.#.#.#.#.#.#.#.#.#.........#..y..H...#.#.....#.#
###.#.###.#.###.#########.#####.#.#.#.#.#.#.#.#.#.#.#######.###########.#######.#
#.#.#...#.#h#...#.......#.#.#..x#...#...#.#.#.#.#...#.......#.........#...#.....#
#.#.###.#.###.#.#.#####.#.#.#.#.#######.#.#.#.#.#####.#####.#.###.###.###.#.###.#
#...#...#.#...#.#.#...#.#...#.#.#...#.B.#.#.#...#...#.#...#.#...#...#...#...#.#.#
#.###.###.#.###.#.#.###.###.#.###.#.#.###.#.###.#.#.#.#.#.#.#######.###.#####.#.#
#.#...#.#.#...#...#.......#.#.....#.#...#.#...#.#.#.#.#.#.#...#.....#...#.....#.#
###.###.#.#.#.#####.#######.#######.###.#.#####.#.#.#.###.###.#.#######.#.###.#.#
#...#.#...#.#.#...#.Y...#...#.....#.....#.......#.#.#...#.....#.#.....#.#...#...#
#.###.#.###.#.#.#.#######.###.###.#######.#########.###.#####.#.#.###.#####.#####
#.#...D.#v..#.#.#.#.......#...#...#...#.#...#...#.....#.....#.#.#.#.#.....#...#.#
#.###.###.###.#.#.#.#######.###.#.#.#.#.###.#.#Z#.#########.#.#.#.#.#####.###.#.#
#...#...#.#...#.#...#...#.....#.#.#.#...#.#...#.#...#.......#...#.#...#.....#...#
#.#.###.###W#.#.#####.###.#####.#.#.#####.#####.#.#.#.#####.#####.#.#P#.#.#####.#
#.#...#.....#.#.....#.......#...#.#..l..#.....#.#.#.#.#.....#.....#.#.#.#.#...#i#
#.###.#######.#####.#.#######.###.#####.#.###.#.#.#.#.#######.#####.###.###.#.#.#
#...#...#....n#.....#...#..u..#...#.....#...#.#.#.#.#.....#...#.....#...#...#...#
###.###.#######.#########.#####.###.###.#.#.###.###.#####.#.###.###.#.###.#######
#.....#..e................#.........#...#.#.............#.......#...#........j..#
#################################################################################

I'm getting 4112, which is too high apparently.
 

Randdalf

Member
Oct 28, 2017
4,167
Finished Day 25, which took way longer than it should have done because: a) I was too stubborn to not just brute force the security checkpoint (which I eventually did); and b) because I didn't expect there to only be one checkpoint. I had hacked the program's memory to automatically pass the checkpoint, but I never bothered to check the program output afterwards. I didn't expect it to just terminate immediately.

Anyway: https://github.com/Randdalf/aoc19/blob/master/d25.py

I really enjoyed this year! Overall I thought the puzzles were better than last year, certainly no very-precisely-implement-this-spec puzzles, which was great.
 

Lafazar

Member
Oct 25, 2017
1,579
Bern, Switzerland
Went back to day 18 today, got all examples working in a reasonable amount of time, low and behold... the result I get for my real input is wrong -_-

Anybody willing to see which result I should be getting for part 1?

This is my input:
Code:
#################################################################################
#.#.......#...........#...#............p#.....#.#...#...........#..w............#
#.#.#.###.#.#.#####.###.#.#########.###.#.###.#.#.#.#.#######.#.#######.#######.#
#...#.#...#.#.#...#.#...#.........#...#.#.#.#.#...#...#.....#.#.....#...#.......#
#.###.#.#####.#.#.###.###########.###U#.#.#.#.#.#######.###.#.#####.#.###.#######
#.#.#.#.......#.#...#...#.......#.#...#.#.#.#.#...#.......#.#...#.#.#...#.#.....#
#J#.#.#########.###.#.#.#.#######.#.###.#.#.#.#####.#######.#.#.#.#.#.#.###.###.#
#...#.........#...#.#.#.#.#.....#.#.#...#.#.#.......#.#.....#.#.#.#.#.#...#.#.#.#
###.#########.###.#.###.#.#.###.#.#.#.###.#.#########.#.#######.#.#.#####.#.#.#.#
#...#...#...#.#...#.#...#...#...#.#.#...#.....#.....#.#...#...#.#...#.L.#.#.#.#o#
#.###.###.#.#.#.###.#.#######.#.#.#.#########.#.###.#.###.#.#.#.###.#.#.#.#.#.#.#
#...#...#.#...#.#.....#...#...#.#.#.E...#...#...#.#.#...#...#.#...#...#.#...#.#.#
###.###.#.#####.#######.#.#.###.#.#.###.###.#####.#.###.#####.#.#.#####.#.###.#.#
#.....#.#...#...#...#...#...#...#.#.#...#...#.....#.#...#...#.#.#.#.....#.T..d#.#
#####.#.###.#.###.#.###.#####.###.###.#.#.#.#.###.#.#.#.###.#.#.#.###.#########.#
#...#...#...#.....#...#.....#z..#.....#.#.#...#...#.#.#.#...#.#.#...#...........#
#.#.#####.#.#########.#.###.###########.#.#######.#.#.#.#.#.#.#.###.###########.#
#.#...#...#...#.#.....#.#...#.........#.#.#.....#.#.#.#...#.#.#.#...#...#...#...#
#.###.#.#####.#.#.#####.#.###.#.#######.#.#.###.###.#.#####.#.###.###.#.#.#.#.###
#.#...#.#...#.#.#.#.....#.....#...#.....#.#...#.....#.....#.#...#.#...#...#...#.#
#.###.#.#.###.#.#.#####X#########.#.#####.###.#######.###.#.###V#.#.#########.#.#
#.S.#...#...#...#...#.#.#...#...#.#.....#..b#.....#.#...#.#.#...#.#.....#...#...#
#.#.#####.#.###.###.#.#.#.###.#.#.#####.#.#.#####.#.#.###.#.#####.#######.#.#####
#.#.#.....#...#...#...#.#.....#.#.....#.#.#.....#.#.#.#...#.....#.........#s....#
#.#.#.#######I###.#####.#######.#####.#.#.#######.#.#.#.#########.#############.#
#.#.#.#...#.....#.....#.#...#.......#.#.#.#.....#.#...#.#.......#.#...#.......#.#
###.#.###.#.#########.#.#.#.#.#####.#.#.#.#.###.#.#####.#.#####.#.#.#.###.###.#.#
#...#.#...#...#...#...#...#...#...#.#...#.#...#.#.#...#.#...#...#...#.....#m#.#.#
#.###.#.#####.#.#.#.###########.#.#.#####.###.#.#.#.#.#.###.#.#############.#.#.#
#...#.#.....#...#.#.#.#.........#.#.#...#...#.#.#...#.#.....#.................#.#
###.#.###.#.#####.#.#.#.#########.#.#.#.#.#.#.#.#####.#########################.#
#...#.....#...#.#...#.#.#.#.......#.#.#.#.#...#.....#.....#...................#.#
#.###########.#.#####.#G#.#.#####.#.#.#.#.#########.#####.#.#################.#.#
#.........#...#.......#...#.#.....#...#.#.........#.....#.#.#...............#...#
#.#######.#.###.#########.#.#.#########.#########.#.#####.#.#.###########.#.###.#
#q#.#.....#.....#.....#..k#r#.#.........#.#.......#.....#...#...#.......#.#...#.#
#.#.#.###########.###.#.###.###.#########.#.###########.#######.#.#.###.#.#####.#
#...#.#...#.......#.#.#.#.#...#.#.....#.#.#.#.....#...#.........#.#.#..g#.C.#...#
###.#.#.#.#.#######.#.#.#.###.#.#.###.#.#.#.#.###.#.#.#############.#.#####.#.###
#...#...#.......A..c#.......#.....#...........#.....#.......R.......#.....#.....#
#######################################.@.#######################################
#.....#.....#...#................f....#.................F...#.........#.........#
#.###.###.###.#.#.###.###############.#.#.#########.#.#####.#.###.###.#.#######.#
#.#.......#...#...#...#.....#.......#...#...#.....#.#.#.#...#...#...#.#.Q.#...#.#
#.#########.#######.###.###.#.#.#######.#####.###.###.#.#.#####.###.#####.#.###.#
#.........#...#.......#.#.#.#.#.....#...#.....#.......#.#.....#.#...#.......#...#
#.#######.###.#.#######.#.#.#######.#.###.#############.#####.#.#.###.#######.#.#
#.Ot#.#.....#.#...#...#.#.#...#.....#...#...#...#.......#.....#.#.......#.#...#.#
###.#.#.#####.#####.#.#.#.###.#.###.###.#.#.#.#.#####.#.#.#############.#.#.###.#
#.#.#.#.....#.......#.....#...#.#.#.#...#.#...#.....#.#.#.#..a......#.....#.#...#
#.#.#.#####.###############.###.#.#.#.###.#########.#.#.#.#####.###.#######.#.###
#.#.#.....#...........#.....#...#.#.#.#.#.#.......#.#.#.#...#...#.......#...#...#
#.#.###.#####.#####.###.#####.###.#.#.#.###.#####.#.#.#.###.#.#########.#.#####.#
#.#.....#.....#.#...#...#.....#...#.#...#...#...#...#.#...#.#.....#.......#.....#
#.###.###.#####.#.###.###.#####.#.#.###.#.###.#.#####.#.###.#.###K###############
#.....#...#...#.....#.#.....#...#...#...#.....#.#.....#.#...#.#...#.....#.....N.#
#.#####.###.###.#####.#####.#.#######.###.#####.###.#####.###.#.#.#.###.#.#####.#
#.#.....#...#...#.....#.....#.....#.#.#.#.....#...#.....#...#.#.#.#...#...#...#.#
#.#.#####.#.#.###.#####.#########.#.#.#.#####.###.#.###.###.###.#.###.#####.###.#
#.#.....#.#...#.#.#.........#.....#.#.#.#...#.#.#.#...#.........#...#.#.....#...#
#.#####M#.#####.#.#####.###.#####.#.#.#.#.#.#.#.#.###################.#.#.###.###
#...#...#.#.....#.....#...#.....#.#.#.#.#.#.#.#.#.#.........#..y..H...#.#.....#.#
###.#.###.#.###.#########.#####.#.#.#.#.#.#.#.#.#.#.#######.###########.#######.#
#.#.#...#.#h#...#.......#.#.#..x#...#...#.#.#.#.#...#.......#.........#...#.....#
#.#.###.#.###.#.#.#####.#.#.#.#.#######.#.#.#.#.#####.#####.#.###.###.###.#.###.#
#...#...#.#...#.#.#...#.#...#.#.#...#.B.#.#.#...#...#.#...#.#...#...#...#...#.#.#
#.###.###.#.###.#.#.###.###.#.###.#.#.###.#.###.#.#.#.#.#.#.#######.###.#####.#.#
#.#...#.#.#...#...#.......#.#.....#.#...#.#...#.#.#.#.#.#.#...#.....#...#.....#.#
###.###.#.#.#.#####.#######.#######.###.#.#####.#.#.#.###.###.#.#######.#.###.#.#
#...#.#...#.#.#...#.Y...#...#.....#.....#.......#.#.#...#.....#.#.....#.#...#...#
#.###.#.###.#.#.#.#######.###.###.#######.#########.###.#####.#.#.###.#####.#####
#.#...D.#v..#.#.#.#.......#...#...#...#.#...#...#.....#.....#.#.#.#.#.....#...#.#
#.###.###.###.#.#.#.#######.###.#.#.#.#.###.#.#Z#.#########.#.#.#.#.#####.###.#.#
#...#...#.#...#.#...#...#.....#.#.#.#...#.#...#.#...#.......#...#.#...#.....#...#
#.#.###.###W#.#.#####.###.#####.#.#.#####.#####.#.#.#.#####.#####.#.#P#.#.#####.#
#.#...#.....#.#.....#.......#...#.#..l..#.....#.#.#.#.#.....#.....#.#.#.#.#...#i#
#.###.#######.#####.#.#######.###.#####.#.###.#.#.#.#.#######.#####.###.###.#.#.#
#...#...#....n#.....#...#..u..#...#.....#...#.#.#.#.#.....#...#.....#...#...#...#
###.###.#######.#########.#####.###.###.#.#.###.###.#####.#.###.###.#.###.#######
#.....#..e................#.........#...#.#.............#.......#...#........j..#
#################################################################################

I'm getting 4112, which is too high apparently.
The shortest path I find is this key order:
@rbgkfxeulaqczpsmotwdnvhjiy which has length 3764.

Edit: This may not be the only shortest path, just one of them.

0 keys: 1 possible position(s)
1 keys: 5 possible position(s)
2 keys: 22 possible position(s)
3 keys: 50 possible position(s)
4 keys: 98 possible position(s)
5 keys: 187 possible position(s)
6 keys: 313 possible position(s)
7 keys: 443 possible position(s)
8 keys: 540 possible position(s)
9 keys: 586 possible position(s)
10 keys: 590 possible position(s)
11 keys: 571 possible position(s)
12 keys: 541 possible position(s)
13 keys: 498 possible position(s)
14 keys: 446 possible position(s)
15 keys: 400 possible position(s)
16 keys: 354 possible position(s)
17 keys: 302 possible position(s)
18 keys: 258 possible position(s)
19 keys: 235 possible position(s)
20 keys: 256 possible position(s)
21 keys: 304 possible position(s)
22 keys: 292 possible position(s)
23 keys: 198 possible position(s)
24 keys: 96 possible position(s)
25 keys: 33 possible position(s)
26 keys: 6 possible position(s)

All the shortest possibilities to end up with 26 keys are:
{('abcdefghijklmnopqrstuvwxyz', 'y'): ('@rbgkfxeulaqczpsmotwdnvhjiy', 3764),
('abcdefghijklmnopqrstuvwxyz', 'v'): ('@rbgkfxeulaqczpsmotwdnhjiyv', 4312),
('abcdefghijklmnopqrstuvwxyz', 'p'): ('@rbgkfxulaqcsmoetwdnvhjiyzp', 3912),
('abcdefghijklmnopqrstuvwxyz', 'z'): ('@rbgkfxulaqcsmoetwdnvhjiypz', 3968),
('abcdefghijklmnopqrstuvwxyz', 'j'): ('@rbgkfxeulaqczpsmotwdnvhiyj', 3864),
('abcdefghijklmnopqrstuvwxyz', 'q'): ('@rbgkfxulacsmoetwdnvhjiyzpq', 4096)}

Finished Day 25, which took way longer than it should have done because: a) I was too stubborn to not just brute force the security checkpoint (which I eventually did); and b) because I didn't expect there to only be one checkpoint. I had hacked the program's memory to automatically pass the checkpoint, but I never bothered to check the program output afterwards. I didn't expect it to just terminate immediately.

Anyway: https://github.com/Randdalf/aoc19/blob/master/d25.py

I really enjoyed this year! Overall I thought the puzzles were better than last year, certainly no very-precisely-implement-this-spec puzzles, which was great.

Yeah, I thought about this as well, but there really seems to be no no elegant way to get past that door. The best I could come up with was using GrayCode to limit the number of take/drop commands.

It's a bit weird that the Intcode program terminates immediately after you find Santa, since the last output it produces states the direction of the exit you came from to go back to. But the intcode program has terminated and will not accept further input.

I know I'm just slow, but I spent a considerable time on each problem this year. I'm going through the AOC 2015 now and I immediately noticed that the level of difficulty is quite a bit lower. The 2015 problems seem to be more suitable to a daily advent calendar so far. But I still had a lot of fun with AOC2019 and learned so much, so I'll continue doing the older ones, even though the 2018 puzzles seem to be somewhat tedious from what you are saying.
 
Last edited:

Zej

The Fallen
Oct 25, 2017
913
Been a busy month so just working through more days now. Keeping with F# but might work in some Elixir, clojure, or ruby (since I need to become more familiar for work :D).

On day 5. I like that we're revisiting previous days. Wonder how many more extensions will be made to the opcode computer :).
 

Qronicle

Member
Oct 27, 2017
719
Belgium
The shortest path I find is this key order:
@rbgkfxeulaqczpsmotwdnvhjiy which has length 3764.

Thanks man, appreciated! Although debugging this is not much fun :D
I'm trying to figure out where and why it loses your path, for now I'm getting to @rbgkfxeulacqz, which has the same length & found keys as your @rbgkfxeulaqcz, will continue tomorrow... (Note to self: check first if the actual length of both paths is really the same.)
 

Lafazar

Member
Oct 25, 2017
1,579
Bern, Switzerland
Thanks man, appreciated! Although debugging this is not much fun :D
I'm trying to figure out where and why it loses your path, for now I'm getting to @rbgkfxeulacqz, which has the same length & found keys as your @rbgkfxeulaqcz, will continue tomorrow... (Note to self: check first if the actual length of both paths is really the same.)
important note: There may be other paths that are just as short. My program just keeps the first shortest path it finds. So it is possible you are still on a correct path. The only thing I can say with certainty is that the shortest path has to end on "y".

Edit: If it helps you for debugging, here is the distance of everything to everything in your maze. I had a bug in this which took me ages to find, but it works correctly now:
Code:
{'@': {'f': 12, 'F': 17, 'r': 22, 'R': 29, 'b': 38, 'B': 39, 'g': 46, 'G': 51, 'k': 56, 'K': 65, 'x': 68, 'X': 73, 'a': 78, 'A': 87, 'c': 90, 'C': 97, 'z': 104, 'Z': 111, 'q': 112, 'Q': 119, 's': 124, 'S': 129, 'e': 138, 'E': 141, 'u': 146, 'U': 151, 'p': 160, 'P': 163, 'm': 168, 'M': 175, 'l': 182, 'L': 189, 'j': 192, 'J': 199, 'i': 202, 'I': 207, 'o': 214, 'O': 223, 't': 224, 'T': 233, 'd': 236, 'D': 241, 'w': 250, 'W': 253, 'n': 260, 'N': 263, 'v': 270, 'V': 277, 'h': 280, 'H': 289, 'y': 292, 'Y': 299},
'p': {'U': 9, 'E': 19, 'X': 87, 'z': 108, 'r': 154, '@': 160, 'f': 170, 'F': 177, 'G': 183, 'R': 187, 'k': 188, 'b': 196, 'B': 197, 'g': 204, 'A': 219, 'c': 222, 'K': 225, 'x': 226, 'a': 238, 'q': 244, 'C': 255, 'S': 261, 'Z': 271, 'Q': 279, 's': 282, 'e': 296, 'u': 304, 'P': 323, 'm': 326, 'J': 331, 'M': 333, 'I': 339, 'l': 340, 'L': 347, 'j': 352, 'i': 362, 'o': 372, 'O': 381, 't': 382, 'T': 391, 'd': 394, 'D': 399, 'w': 408, 'W': 411, 'n': 418, 'N': 423, 'v': 428, 'V': 435, 'h': 438, 'H': 449, 'y': 452, 'Y': 457},
'w': {'T': 23, 'd': 26, 'o': 36, 'L': 61, 's': 126, 'm': 142, 'C': 153, 'b': 232, '@': 250, 'f': 262, 'F': 265, 'r': 270, 'R': 271, 'g': 288, 'B': 289, 'G': 299, 'k': 304, 'V': 307, 'K': 313, 'x': 318, 'X': 321, 'a': 326, 'A': 335, 'c': 338, 'z': 352, 'Z': 359, 'q': 360, 'Q': 367, 'S': 377, 'e': 388, 'E': 389, 'u': 396, 'U': 399, 'p': 408, 'P': 411, 'M': 425, 'l': 432, 'j': 440, 'J': 447, 'i': 450, 'I': 455, 'O': 473, 't': 474, 'D': 491, 'W': 503, 'n': 510, 'N': 511, 'v': 520, 'h': 530, 'H': 537, 'y': 540, 'Y': 549},
'o': {'T': 19, 'd': 22, 'L': 25, 'w': 36, 's': 90, 'm': 106, 'C': 117, 'b': 196, '@': 214, 'f': 226, 'F': 229, 'r': 234, 'R': 235, 'g': 252, 'B': 253, 'G': 263, 'k': 268, 'V': 271, 'K': 277, 'x': 282, 'X': 285, 'a': 290, 'A': 299, 'c': 302, 'z': 316, 'Z': 323, 'q': 324, 'Q': 331, 'S': 341, 'e': 352, 'E': 353, 'u': 360, 'U': 363, 'p': 372, 'P': 375, 'M': 389, 'l': 396, 'j': 404, 'J': 411, 'i': 414, 'I': 419, 'O': 437, 't': 438, 'D': 455, 'W': 467, 'n': 474, 'N': 475, 'v': 484, 'h': 494, 'H': 501, 'y': 504, 'Y': 513},
'd': {'T': 3, 'o': 22, 'w': 26, 'L': 47, 's': 112, 'm': 128, 'C': 139, 'b': 218, '@': 236, 'f': 248, 'F': 251, 'r': 256, 'R': 257, 'g': 274, 'B': 275, 'G': 285, 'k': 290, 'V': 293, 'K': 299, 'x': 304, 'X': 307, 'a': 312, 'A': 321, 'c': 324, 'z': 338, 'Z': 345, 'q': 346, 'Q': 353, 'S': 363, 'e': 374, 'E': 375, 'u': 382, 'U': 385, 'p': 394, 'P': 397, 'M': 411, 'l': 418, 'j': 426, 'J': 433, 'i': 436, 'I': 441, 'O': 459, 't': 460, 'D': 477, 'W': 489, 'n': 496, 'N': 497, 'v': 506, 'h': 516, 'H': 523, 'y': 526, 'Y': 535},
'z': {'X': 31, 'E': 89, 'r': 98, 'U': 99, '@': 104, 'p': 108, 'f': 114, 'F': 121, 'G': 127, 'R': 131, 'k': 132, 'b': 140, 'B': 141, 'g': 148, 'A': 163, 'c': 166, 'K': 169, 'x': 170, 'a': 182, 'q': 188, 'C': 199, 'S': 205, 'Z': 215, 'Q': 223, 's': 226, 'e': 240, 'u': 248, 'P': 267, 'm': 270, 'J': 275, 'M': 277, 'I': 283, 'l': 284, 'L': 291, 'j': 296, 'i': 306, 'o': 316, 'O': 325, 't': 326, 'T': 335, 'd': 338, 'D': 343, 'w': 352, 'W': 355, 'n': 362, 'N': 367, 'v': 372, 'V': 379, 'h': 382, 'H': 393, 'y': 396, 'Y': 401},
'b': {'@': 38, 'f': 50, 'F': 53, 'r': 58, 'R': 59, 'g': 76, 'B': 77, 'C': 79, 'G': 87, 'k': 92, 'K': 101, 's': 106, 'x': 106, 'X': 109, 'a': 114, 'A': 123, 'c': 126, 'z': 140, 'Z': 147, 'q': 148, 'm': 150, 'Q': 155, 'S': 165, 'L': 171, 'e': 176, 'E': 177, 'u': 184, 'U': 187, 'o': 196, 'p': 196, 'P': 199, 'M': 213, 'T': 215, 'd': 218, 'l': 220, 'j': 228, 'w': 232, 'J': 235, 'i': 238, 'I': 243, 'V': 259, 'O': 261, 't': 262, 'D': 279, 'W': 291, 'n': 298, 'N': 299, 'v': 308, 'h': 318, 'H': 325, 'y': 328, 'Y': 337},
's': {'C': 27, 'm': 44, 'L': 65, 'o': 90, 'b': 106, 'T': 109, 'd': 112, '@': 124, 'w': 126, 'f': 136, 'F': 139, 'r': 144, 'R': 145, 'g': 162, 'B': 163, 'G': 173, 'k': 178, 'V': 181, 'K': 187, 'x': 192, 'X': 195, 'a': 200, 'A': 209, 'c': 212, 'z': 226, 'Z': 233, 'q': 234, 'Q': 241, 'S': 251, 'e': 262, 'E': 263, 'u': 270, 'U': 273, 'p': 282, 'P': 285, 'M': 299, 'l': 306, 'j': 314, 'J': 321, 'i': 324, 'I': 329, 'O': 347, 't': 348, 'D': 365, 'W': 377, 'n': 384, 'N': 385, 'v': 394, 'h': 404, 'H': 411, 'y': 414, 'Y': 423},
'm': {'s': 44, 'C': 71, 'L': 81, 'o': 106, 'T': 125, 'd': 128, 'w': 142, 'b': 150, '@': 168, 'f': 180, 'F': 183, 'r': 188, 'R': 189, 'g': 206, 'B': 207, 'G': 217, 'k': 222, 'V': 225, 'K': 231, 'x': 236, 'X': 239, 'a': 244, 'A': 253, 'c': 256, 'z': 270, 'Z': 277, 'q': 278, 'Q': 285, 'S': 295, 'e': 306, 'E': 307, 'u': 314, 'U': 317, 'p': 326, 'P': 329, 'M': 343, 'l': 350, 'j': 358, 'J': 365, 'i': 368, 'I': 373, 'O': 391, 't': 392, 'D': 409, 'W': 421, 'n': 428, 'N': 429, 'v': 438, 'h': 448, 'H': 455, 'y': 458, 'Y': 467},
'q': {'S': 21, 'A': 35, 'c': 38, 'k': 56, 'G': 61, 'r': 90, 'J': 91, 'I': 99, '@': 112, 'f': 122, 'F': 129, 'R': 139, 'b': 148, 'B': 149, 'g': 156, 'X': 157, 'K': 177, 'x': 178, 'z': 188, 'a': 190, 'C': 207, 'Z': 223, 'E': 225, 'Q': 231, 's': 234, 'U': 235, 'p': 244, 'e': 248, 'u': 256, 'P': 275, 'm': 278, 'M': 285, 'l': 292, 'L': 299, 'j': 304, 'i': 314, 'o': 324, 'O': 333, 't': 334, 'T': 343, 'd': 346, 'D': 351, 'w': 360, 'W': 363, 'n': 370, 'N': 375, 'v': 380, 'V': 387, 'h': 390, 'H': 401, 'y': 404, 'Y': 409},
'k': {'G': 5, 'A': 31, 'r': 34, 'c': 34, '@': 56, 'q': 56, 'f': 66, 'F': 73, 'S': 73, 'R': 83, 'b': 92, 'B': 93, 'g': 100, 'X': 101, 'K': 121, 'x': 122, 'z': 132, 'a': 134, 'J': 143, 'C': 151, 'I': 151, 'Z': 167, 'E': 169, 'Q': 175, 's': 178, 'U': 179, 'p': 188, 'e': 192, 'u': 200, 'P': 219, 'm': 222, 'M': 229, 'l': 236, 'L': 243, 'j': 248, 'i': 258, 'o': 268, 'O': 277, 't': 278, 'T': 287, 'd': 290, 'D': 295, 'w': 304, 'W': 307, 'n': 314, 'N': 319, 'v': 324, 'V': 331, 'h': 334, 'H': 345, 'y': 348, 'Y': 353},
'r': {'@': 22, 'G': 29, 'f': 32, 'k': 34, 'F': 39, 'R': 49, 'b': 58, 'B': 59, 'A': 65, 'g': 66, 'X': 67, 'c': 68, 'K': 87, 'x': 88, 'q': 90, 'z': 98, 'a': 100, 'S': 107, 'C': 117, 'Z': 133, 'E': 135, 'Q': 141, 's': 144, 'U': 145, 'p': 154, 'e': 158, 'u': 166, 'J': 177, 'I': 185, 'P': 185, 'm': 188, 'M': 195, 'l': 202, 'L': 209, 'j': 214, 'i': 224, 'o': 234, 'O': 243, 't': 244, 'T': 253, 'd': 256, 'D': 261, 'w': 270, 'W': 273, 'n': 280, 'N': 285, 'v': 290, 'V': 297, 'h': 300, 'H': 311, 'y': 314, 'Y': 319},
'g': {'R': 17, '@': 46, 'f': 58, 'F': 61, 'r': 66, 'b': 76, 'B': 85, 'G': 95, 'k': 100, 'K': 109, 'x': 114, 'X': 117, 'a': 122, 'A': 131, 'c': 134, 'C': 135, 'z': 148, 'Z': 155, 'q': 156, 's': 162, 'Q': 163, 'S': 173, 'e': 184, 'E': 185, 'u': 192, 'U': 195, 'p': 204, 'm': 206, 'P': 207, 'M': 221, 'L': 227, 'l': 228, 'j': 236, 'J': 243, 'i': 246, 'I': 251, 'o': 252, 'O': 269, 't': 270, 'T': 271, 'd': 274, 'D': 287, 'w': 288, 'W': 299, 'n': 306, 'N': 307, 'V': 315, 'v': 316, 'h': 326, 'H': 333, 'y': 336, 'Y': 345},
'c': {'A': 3, 'k': 34, 'q': 38, 'G': 39, 'S': 55, 'r': 68, '@': 90, 'f': 100, 'F': 107, 'R': 117, 'J': 125, 'b': 126, 'B': 127, 'I': 133, 'g': 134, 'X': 135, 'K': 155, 'x': 156, 'z': 166, 'a': 168, 'C': 185, 'Z': 201, 'E': 203, 'Q': 209, 's': 212, 'U': 213, 'p': 222, 'e': 226, 'u': 234, 'P': 253, 'm': 256, 'M': 263, 'l': 270, 'L': 277, 'j': 282, 'i': 292, 'o': 302, 'O': 311, 't': 312, 'T': 321, 'd': 324, 'D': 329, 'w': 338, 'W': 341, 'n': 348, 'N': 353, 'v': 358, 'V': 365, 'h': 368, 'H': 379, 'y': 382, 'Y': 387},
'f': {'@': 12, 'F': 27, 'r': 32, 'R': 41, 'B': 43, 'b': 50, 'g': 58, 'G': 61, 'k': 66, 'x': 72, 'K': 75, 'X': 83, 'a': 88, 'A': 97, 'c': 100, 'C': 109, 'z': 114, 'Z': 121, 'q': 122, 'Q': 129, 's': 136, 'S': 139, 'e': 142, 'u': 150, 'E': 151, 'U': 161, 'p': 170, 'P': 173, 'M': 179, 'm': 180, 'l': 186, 'L': 201, 'j': 202, 'J': 209, 'i': 212, 'I': 217, 'o': 226, 'O': 227, 't': 228, 'T': 245, 'D': 245, 'd': 248, 'W': 257, 'w': 262, 'n': 264, 'N': 273, 'v': 274, 'h': 284, 'V': 289, 'H': 299, 'y': 302, 'Y': 303},
't': {'O': 1, 'M': 49, 'D': 69, 'W': 81, 'e': 86, 'n': 88, 'v': 98, 'u': 106, 'h': 108, 'Y': 127, 'l': 142, 'x': 156, 'B': 185, '@': 224, 'f': 228, 'F': 239, 'r': 244, 'R': 253, 'b': 262, 'g': 270, 'G': 273, 'k': 278, 'K': 287, 'X': 295, 'a': 300, 'A': 309, 'c': 312, 'C': 321, 'z': 326, 'Z': 333, 'q': 334, 'Q': 341, 's': 348, 'S': 351, 'E': 363, 'U': 373, 'p': 382, 'P': 385, 'm': 392, 'L': 413, 'j': 414, 'J': 421, 'i': 424, 'I': 429, 'o': 438, 'T': 457, 'd': 460, 'w': 474, 'N': 485, 'V': 501, 'H': 511, 'y': 514},
'a': {'K': 13, 'Q': 45, 'F': 61, '@': 78, 'f': 88, 'r': 100, 'R': 105, 'b': 114, 'B': 115, 'g': 122, 'G': 129, 'k': 134, 'x': 144, 'X': 151, 'Z': 161, 'A': 165, 'c': 168, 'C': 173, 'z': 182, 'q': 190, 's': 200, 'S': 207, 'P': 213, 'e': 214, 'E': 219, 'u': 222, 'U': 229, 'p': 238, 'j': 242, 'm': 244, 'M': 251, 'i': 252, 'l': 258, 'L': 265, 'J': 277, 'I': 285, 'o': 290, 'O': 299, 't': 300, 'T': 309, 'd': 312, 'N': 313, 'D': 317, 'w': 326, 'W': 329, 'n': 336, 'H': 339, 'y': 342, 'v': 346, 'V': 353, 'h': 356, 'Y': 375},
'y': {'H': 3, 'N': 29, 'i': 90, 'j': 108, 'P': 163, 'Z': 259, 'F': 281, '@': 292, 'f': 302, 'r': 314, 'R': 319, 'b': 328, 'K': 329, 'B': 329, 'g': 336, 'a': 342, 'G': 343, 'k': 348, 'x': 358, 'X': 365, 'A': 379, 'c': 382, 'Q': 383, 'C': 387, 'z': 396, 'q': 404, 's': 414, 'S': 421, 'e': 428, 'E': 433, 'u': 436, 'U': 443, 'p': 452, 'm': 458, 'M': 465, 'l': 472, 'L': 479, 'J': 491, 'I': 499, 'o': 504, 'O': 513, 't': 514, 'T': 523, 'd': 526, 'D': 531, 'w': 540, 'W': 543, 'n': 550, 'v': 560, 'V': 567, 'h': 570, 'Y': 589},
'h': {'v': 22, 'W': 27, 'n': 28, 'Y': 35, 'D': 39, 'M': 105, 'O': 107, 't': 108, 'e': 142, 'u': 162, 'l': 198, 'x': 212, 'B': 241, '@': 280, 'f': 284, 'F': 295, 'r': 300, 'R': 309, 'b': 318, 'g': 326, 'G': 329, 'k': 334, 'K': 343, 'X': 351, 'a': 356, 'A': 365, 'c': 368, 'C': 377, 'z': 382, 'Z': 389, 'q': 390, 'Q': 397, 's': 404, 'S': 407, 'E': 419, 'U': 429, 'p': 438, 'P': 441, 'm': 448, 'L': 469, 'j': 470, 'J': 477, 'i': 480, 'I': 485, 'o': 494, 'T': 513, 'd': 516, 'w': 530, 'N': 541, 'V': 557, 'H': 567, 'y': 570},
'x': {'B': 29, '@': 68, 'e': 70, 'f': 72, 'u': 78, 'F': 83, 'r': 88, 'R': 97, 'b': 106, 'M': 107, 'l': 114, 'g': 114, 'G': 117, 'k': 122, 'K': 131, 'X': 139, 'a': 144, 'A': 153, 'O': 155, 't': 156, 'c': 156, 'C': 165, 'z': 170, 'D': 173, 'Z': 177, 'q': 178, 'W': 185, 'Q': 185, 'n': 192, 's': 192, 'S': 195, 'v': 202, 'E': 207, 'h': 212, 'U': 217, 'p': 226, 'P': 229, 'Y': 231, 'm': 236, 'L': 257, 'j': 258, 'J': 265, 'i': 268, 'I': 273, 'o': 282, 'T': 301, 'd': 304, 'w': 318, 'N': 329, 'V': 345, 'H': 355, 'y': 358},
'v': {'W': 17, 'n': 18, 'h': 22, 'D': 29, 'Y': 41, 'M': 95, 'O': 97, 't': 98, 'e': 132, 'u': 152, 'l': 188, 'x': 202, 'B': 231, '@': 270, 'f': 274, 'F': 285, 'r': 290, 'R': 299, 'b': 308, 'g': 316, 'G': 319, 'k': 324, 'K': 333, 'X': 341, 'a': 346, 'A': 355, 'c': 358, 'C': 367, 'z': 372, 'Z': 379, 'q': 380, 'Q': 387, 's': 394, 'S': 397, 'E': 409, 'U': 419, 'p': 428, 'P': 431, 'm': 438, 'L': 459, 'j': 460, 'J': 467, 'i': 470, 'I': 475, 'o': 484, 'T': 503, 'd': 506, 'w': 520, 'N': 531, 'V': 547, 'H': 557, 'y': 560},
'l': {'u': 36, 'e': 56, 'M': 93, 'x': 114, 'O': 141, 't': 142, 'B': 143, 'D': 159, 'W': 171, 'n': 178, '@': 182, 'f': 186, 'v': 188, 'F': 197, 'h': 198, 'r': 202, 'R': 211, 'Y': 217, 'b': 220, 'g': 228, 'G': 231, 'k': 236, 'K': 245, 'X': 253, 'a': 258, 'A': 267, 'c': 270, 'C': 279, 'z': 284, 'Z': 291, 'q': 292, 'Q': 299, 's': 306, 'S': 309, 'E': 321, 'U': 331, 'p': 340, 'P': 343, 'm': 350, 'L': 371, 'j': 372, 'J': 379, 'i': 382, 'I': 387, 'o': 396, 'T': 415, 'd': 418, 'w': 432, 'N': 443, 'V': 459, 'H': 469, 'y': 472},
'i': {'j': 18, 'N': 61, 'P': 73, 'H': 87, 'y': 90, 'Z': 169, 'F': 191, '@': 202, 'f': 212, 'r': 224, 'R': 229, 'b': 238, 'K': 239, 'B': 239, 'g': 246, 'a': 252, 'G': 253, 'k': 258, 'x': 268, 'X': 275, 'A': 289, 'c': 292, 'Q': 293, 'C': 297, 'z': 306, 'q': 314, 's': 324, 'S': 331, 'e': 338, 'E': 343, 'u': 346, 'U': 353, 'p': 362, 'm': 368, 'M': 375, 'l': 382, 'L': 389, 'J': 401, 'I': 409, 'o': 414, 'O': 423, 't': 424, 'T': 433, 'd': 436, 'D': 441, 'w': 450, 'W': 453, 'n': 460, 'v': 470, 'V': 477, 'h': 480, 'Y': 499},
'n': {'W': 7, 'v': 18, 'D': 19, 'h': 28, 'Y': 47, 'M': 85, 'O': 87, 't': 88, 'e': 122, 'u': 142, 'l': 178, 'x': 192, 'B': 221, '@': 260, 'f': 264, 'F': 275, 'r': 280, 'R': 289, 'b': 298, 'g': 306, 'G': 309, 'k': 314, 'K': 323, 'X': 331, 'a': 336, 'A': 345, 'c': 348, 'C': 357, 'z': 362, 'Z': 369, 'q': 370, 'Q': 377, 's': 384, 'S': 387, 'E': 399, 'U': 409, 'p': 418, 'P': 421, 'm': 428, 'L': 449, 'j': 450, 'J': 457, 'i': 460, 'I': 465, 'o': 474, 'T': 493, 'd': 496, 'w': 510, 'N': 521, 'V': 537, 'H': 547, 'y': 550},
'u': {'e': 20, 'l': 36, 'M': 57, 'x': 78, 'O': 105, 't': 106, 'B': 107, 'D': 123, 'W': 135, 'n': 142, '@': 146, 'f': 150, 'v': 152, 'F': 161, 'h': 162, 'r': 166, 'R': 175, 'Y': 181, 'b': 184, 'g': 192, 'G': 195, 'k': 200, 'K': 209, 'X': 217, 'a': 222, 'A': 231, 'c': 234, 'C': 243, 'z': 248, 'Z': 255, 'q': 256, 'Q': 263, 's': 270, 'S': 273, 'E': 285, 'U': 295, 'p': 304, 'P': 307, 'm': 314, 'L': 335, 'j': 336, 'J': 343, 'i': 346, 'I': 351, 'o': 360, 'T': 379, 'd': 382, 'w': 396, 'N': 407, 'V': 423, 'H': 433, 'y': 436},
'e': {'u': 20, 'M': 37, 'l': 56, 'x': 70, 'O': 85, 't': 86, 'B': 99, 'D': 103, 'W': 115, 'n': 122, 'v': 132, '@': 138, 'f': 142, 'h': 142, 'F': 153, 'r': 158, 'Y': 161, 'R': 167, 'b': 176, 'g': 184, 'G': 187, 'k': 192, 'K': 201, 'X': 209, 'a': 214, 'A': 223, 'c': 226, 'C': 235, 'z': 240, 'Z': 247, 'q': 248, 'Q': 255, 's': 262, 'S': 265, 'E': 277, 'U': 287, 'p': 296, 'P': 299, 'm': 306, 'L': 327, 'j': 328, 'J': 335, 'i': 338, 'I': 343, 'o': 352, 'T': 371, 'd': 374, 'w': 388, 'N': 399, 'V': 415, 'H': 425, 'y': 428},
'j': {'i': 18, 'P': 63, 'N': 79, 'H': 105, 'y': 108, 'Z': 159, 'F': 181, '@': 192, 'f': 202, 'r': 214, 'R': 219, 'b': 228, 'K': 229, 'B': 229, 'g': 236, 'a': 242, 'G': 243, 'k': 248, 'x': 258, 'X': 265, 'A': 279, 'c': 282, 'Q': 283, 'C': 287, 'z': 296, 'q': 304, 's': 314, 'S': 321, 'e': 328, 'E': 333, 'u': 336, 'U': 343, 'p': 352, 'm': 358, 'M': 365, 'l': 372, 'L': 379, 'J': 391, 'I': 399, 'o': 404, 'O': 413, 't': 414, 'T': 423, 'd': 426, 'D': 431, 'w': 440, 'W': 443, 'n': 450, 'v': 460, 'V': 467, 'h': 470, 'Y': 489},
'U': {'p': 9, 'E': 10, 'X': 78, 'z': 99, 'r': 145, '@': 151, 'f': 161, 'F': 168, 'G': 174, 'R': 178, 'k': 179, 'b': 187, 'B': 188, 'g': 195, 'A': 210, 'c': 213, 'K': 216, 'x': 217, 'a': 229, 'q': 235, 'C': 246, 'S': 252, 'Z': 262, 'Q': 270, 's': 273, 'e': 287, 'u': 295, 'P': 314, 'm': 317, 'J': 322, 'M': 324, 'I': 330, 'l': 331, 'L': 338, 'j': 343, 'i': 353, 'o': 363, 'O': 372, 't': 373, 'T': 382, 'd': 385, 'D': 390, 'w': 399, 'W': 402, 'n': 409, 'N': 414, 'v': 419, 'V': 426, 'h': 429, 'H': 440, 'y': 443, 'Y': 448},
'J': {'S': 70, 'I': 90, 'q': 91, 'A': 122, 'c': 125, 'k': 143, 'G': 148, 'r': 177, '@': 199, 'f': 209, 'F': 216, 'R': 226, 'b': 235, 'B': 236, 'g': 243, 'X': 244, 'K': 264, 'x': 265, 'z': 275, 'a': 277, 'C': 294, 'Z': 310, 'E': 312, 'Q': 318, 's': 321, 'U': 322, 'p': 331, 'e': 335, 'u': 343, 'P': 362, 'm': 365, 'M': 372, 'l': 379, 'L': 386, 'j': 391, 'i': 401, 'o': 411, 'O': 420, 't': 421, 'T': 430, 'd': 433, 'D': 438, 'w': 447, 'W': 450, 'n': 457, 'N': 462, 'v': 467, 'V': 474, 'h': 477, 'H': 488, 'y': 491, 'Y': 496},
'L': {'o': 25, 'T': 44, 'd': 47, 'w': 61, 's': 65, 'm': 81, 'C': 92, 'b': 171, '@': 189, 'f': 201, 'F': 204, 'r': 209, 'R': 210, 'g': 227, 'B': 228, 'G': 238, 'k': 243, 'V': 246, 'K': 252, 'x': 257, 'X': 260, 'a': 265, 'A': 274, 'c': 277, 'z': 291, 'Z': 298, 'q': 299, 'Q': 306, 'S': 316, 'e': 327, 'E': 328, 'u': 335, 'U': 338, 'p': 347, 'P': 350, 'M': 364, 'l': 371, 'j': 379, 'J': 386, 'i': 389, 'I': 394, 'O': 412, 't': 413, 'D': 430, 'W': 442, 'n': 449, 'N': 450, 'v': 459, 'h': 469, 'H': 476, 'y': 479, 'Y': 488},
'E': {'U': 10, 'p': 19, 'X': 68, 'z': 89, 'r': 135, '@': 141, 'f': 151, 'F': 158, 'G': 164, 'R': 168, 'k': 169, 'b': 177, 'B': 178, 'g': 185, 'A': 200, 'c': 203, 'K': 206, 'x': 207, 'a': 219, 'q': 225, 'C': 236, 'S': 242, 'Z': 252, 'Q': 260, 's': 263, 'e': 277, 'u': 285, 'P': 304, 'm': 307, 'J': 312, 'M': 314, 'I': 320, 'l': 321, 'L': 328, 'j': 333, 'i': 343, 'o': 353, 'O': 362, 't': 363, 'T': 372, 'd': 375, 'D': 380, 'w': 389, 'W': 392, 'n': 399, 'N': 404, 'v': 409, 'V': 416, 'h': 419, 'H': 430, 'y': 433, 'Y': 438},
'T': {'d': 3, 'o': 19, 'w': 23, 'L': 44, 's': 109, 'm': 125, 'C': 136, 'b': 215, '@': 233, 'f': 245, 'F': 248, 'r': 253, 'R': 254, 'g': 271, 'B': 272, 'G': 282, 'k': 287, 'V': 290, 'K': 296, 'x': 301, 'X': 304, 'a': 309, 'A': 318, 'c': 321, 'z': 335, 'Z': 342, 'q': 343, 'Q': 350, 'S': 360, 'e': 371, 'E': 372, 'u': 379, 'U': 382, 'p': 391, 'P': 394, 'M': 408, 'l': 415, 'j': 423, 'J': 430, 'i': 433, 'I': 438, 'O': 456, 't': 457, 'D': 474, 'W': 486, 'n': 493, 'N': 494, 'v': 503, 'h': 513, 'H': 520, 'y': 523, 'Y': 532},
'X': {'z': 31, 'r': 67, 'E': 68, '@': 73, 'U': 78, 'f': 83, 'p': 87, 'F': 90, 'G': 96, 'R': 100, 'k': 101, 'b': 109, 'B': 110, 'g': 117, 'A': 132, 'c': 135, 'K': 138, 'x': 139, 'a': 151, 'q': 157, 'C': 168, 'S': 174, 'Z': 184, 'Q': 192, 's': 195, 'e': 209, 'u': 217, 'P': 236, 'm': 239, 'J': 244, 'M': 246, 'I': 252, 'l': 253, 'L': 260, 'j': 265, 'i': 275, 'o': 285, 'O': 294, 't': 295, 'T': 304, 'd': 307, 'D': 312, 'w': 321, 'W': 324, 'n': 331, 'N': 336, 'v': 341, 'V': 348, 'h': 351, 'H': 362, 'y': 365, 'Y': 370},
'V': {'C': 180, 's': 181, 'm': 225, 'L': 246, 'b': 259, 'o': 271, '@': 277, 'f': 289, 'T': 290, 'F': 292, 'd': 293, 'r': 297, 'R': 298, 'w': 307, 'g': 315, 'B': 316, 'G': 326, 'k': 331, 'K': 340, 'x': 345, 'X': 348, 'a': 353, 'A': 362, 'c': 365, 'z': 379, 'Z': 386, 'q': 387, 'Q': 394, 'S': 404, 'e': 415, 'E': 416, 'u': 423, 'U': 426, 'p': 435, 'P': 438, 'M': 452, 'l': 459, 'j': 467, 'J': 474, 'i': 477, 'I': 482, 'O': 500, 't': 501, 'D': 518, 'W': 530, 'n': 537, 'N': 538, 'v': 547, 'h': 557, 'H': 564, 'y': 567, 'Y': 576},
'S': {'q': 21, 'A': 52, 'c': 55, 'J': 70, 'k': 73, 'G': 78, 'I': 78, 'r': 107, '@': 129, 'f': 139, 'F': 146, 'R': 156, 'b': 165, 'B': 166, 'g': 173, 'X': 174, 'K': 194, 'x': 195, 'z': 205, 'a': 207, 'C': 224, 'Z': 240, 'E': 242, 'Q': 248, 's': 251, 'U': 252, 'p': 261, 'e': 265, 'u': 273, 'P': 292, 'm': 295, 'M': 302, 'l': 309, 'L': 316, 'j': 321, 'i': 331, 'o': 341, 'O': 350, 't': 351, 'T': 360, 'd': 363, 'D': 368, 'w': 377, 'W': 380, 'n': 387, 'N': 392, 'v': 397, 'V': 404, 'h': 407, 'H': 418, 'y': 421, 'Y': 426},
'I': {'S': 78, 'J': 90, 'q': 99, 'A': 130, 'c': 133, 'k': 151, 'G': 156, 'r': 185, '@': 207, 'f': 217, 'F': 224, 'R': 234, 'b': 243, 'B': 244, 'g': 251, 'X': 252, 'K': 272, 'x': 273, 'z': 283, 'a': 285, 'C': 302, 'Z': 318, 'E': 320, 'Q': 326, 's': 329, 'U': 330, 'p': 339, 'e': 343, 'u': 351, 'P': 370, 'm': 373, 'M': 380, 'l': 387, 'L': 394, 'j': 399, 'i': 409, 'o': 419, 'O': 428, 't': 429, 'T': 438, 'd': 441, 'D': 446, 'w': 455, 'W': 458, 'n': 465, 'N': 470, 'v': 475, 'V': 482, 'h': 485, 'H': 496, 'y': 499, 'Y': 504},
'G': {'k': 5, 'r': 29, 'A': 36, 'c': 39, '@': 51, 'f': 61, 'q': 61, 'F': 68, 'R': 78, 'S': 78, 'b': 87, 'B': 88, 'g': 95, 'X': 96, 'K': 116, 'x': 117, 'z': 127, 'a': 129, 'C': 146, 'J': 148, 'I': 156, 'Z': 162, 'E': 164, 'Q': 170, 's': 173, 'U': 174, 'p': 183, 'e': 187, 'u': 195, 'P': 214, 'm': 217, 'M': 224, 'l': 231, 'L': 238, 'j': 243, 'i': 253, 'o': 263, 'O': 272, 't': 273, 'T': 282, 'd': 285, 'D': 290, 'w': 299, 'W': 302, 'n': 309, 'N': 314, 'v': 319, 'V': 326, 'h': 329, 'H': 340, 'y': 343, 'Y': 348},
'C': {'s': 27, 'm': 71, 'b': 79, 'L': 92, '@': 97, 'f': 109, 'F': 112, 'o': 117, 'r': 117, 'R': 118, 'g': 135, 'T': 136, 'B': 136, 'd': 139, 'G': 146, 'k': 151, 'w': 153, 'K': 160, 'x': 165, 'X': 168, 'a': 173, 'V': 180, 'A': 182, 'c': 185, 'z': 199, 'Z': 206, 'q': 207, 'Q': 214, 'S': 224, 'e': 235, 'E': 236, 'u': 243, 'U': 246, 'p': 255, 'P': 258, 'M': 272, 'l': 279, 'j': 287, 'J': 294, 'i': 297, 'I': 302, 'O': 320, 't': 321, 'D': 338, 'W': 350, 'n': 357, 'N': 358, 'v': 367, 'h': 377, 'H': 384, 'y': 387, 'Y': 396},
'A': {'c': 3, 'k': 31, 'q': 35, 'G': 36, 'S': 52, 'r': 65, '@': 87, 'f': 97, 'F': 104, 'R': 114, 'J': 122, 'b': 123, 'B': 124, 'I': 130, 'g': 131, 'X': 132, 'K': 152, 'x': 153, 'z': 163, 'a': 165, 'C': 182, 'Z': 198, 'E': 200, 'Q': 206, 's': 209, 'U': 210, 'p': 219, 'e': 223, 'u': 231, 'P': 250, 'm': 253, 'M': 260, 'l': 267, 'L': 274, 'j': 279, 'i': 289, 'o': 299, 'O': 308, 't': 309, 'T': 318, 'd': 321, 'D': 326, 'w': 335, 'W': 338, 'n': 345, 'N': 350, 'v': 355, 'V': 362, 'h': 365, 'H': 376, 'y': 379, 'Y': 384},
'R': {'g': 17, '@': 29, 'f': 41, 'F': 44, 'r': 49, 'b': 59, 'B': 68, 'G': 78, 'k': 83, 'K': 92, 'x': 97, 'X': 100, 'a': 105, 'A': 114, 'c': 117, 'C': 118, 'z': 131, 'Z': 138, 'q': 139, 's': 145, 'Q': 146, 'S': 156, 'e': 167, 'E': 168, 'u': 175, 'U': 178, 'p': 187, 'm': 189, 'P': 190, 'M': 204, 'L': 210, 'l': 211, 'j': 219, 'J': 226, 'i': 229, 'I': 234, 'o': 235, 'O': 252, 't': 253, 'T': 254, 'd': 257, 'D': 270, 'w': 271, 'W': 282, 'n': 289, 'N': 290, 'V': 298, 'v': 299, 'h': 309, 'H': 316, 'y': 319, 'Y': 328},
'F': {'@': 17, 'f': 27, 'r': 39, 'R': 44, 'K': 48, 'b': 53, 'B': 54, 'a': 61, 'g': 61, 'G': 68, 'k': 73, 'x': 83, 'X': 90, 'Z': 100, 'Q': 102, 'A': 104, 'c': 107, 'C': 112, 'z': 121, 'q': 129, 's': 139, 'S': 146, 'P': 152, 'e': 153, 'E': 158, 'u': 161, 'U': 168, 'p': 177, 'j': 181, 'm': 183, 'M': 190, 'i': 191, 'l': 197, 'L': 204, 'J': 216, 'I': 224, 'o': 229, 'O': 238, 't': 239, 'T': 248, 'd': 251, 'N': 252, 'D': 256, 'w': 265, 'W': 268, 'n': 275, 'H': 278, 'y': 281, 'v': 285, 'V': 292, 'h': 295, 'Y': 314},
'Q': {'a': 45, 'K': 54, 'F': 102, '@': 119, 'f': 129, 'r': 141, 'R': 146, 'b': 155, 'B': 156, 'g': 163, 'G': 170, 'k': 175, 'x': 185, 'X': 192, 'Z': 202, 'A': 206, 'c': 209, 'C': 214, 'z': 223, 'q': 231, 's': 241, 'S': 248, 'P': 254, 'e': 255, 'E': 260, 'u': 263, 'U': 270, 'p': 279, 'j': 283, 'm': 285, 'M': 292, 'i': 293, 'l': 299, 'L': 306, 'J': 318, 'I': 326, 'o': 331, 'O': 340, 't': 341, 'T': 350, 'd': 353, 'N': 354, 'D': 358, 'w': 367, 'W': 370, 'n': 377, 'H': 380, 'y': 383, 'v': 387, 'V': 394, 'h': 397, 'Y': 416}, 
'O': {'t': 1, 'M': 48, 'D': 68, 'W': 80, 'e': 85, 'n': 87, 'v': 97, 'u': 105, 'h': 107, 'Y': 126, 'l': 141, 'x': 155, 'B': 184, '@': 223, 'f': 227, 'F': 238, 'r': 243, 'R': 252, 'b': 261, 'g': 269, 'G': 272, 'k': 277, 'K': 286, 'X': 294, 'a': 299, 'A': 308, 'c': 311, 'C': 320, 'z': 325, 'Z': 332, 'q': 333, 'Q': 340, 's': 347, 'S': 350, 'E': 362, 'U': 372, 'p': 381, 'P': 384, 'm': 391, 'L': 412, 'j': 413, 'J': 420, 'i': 423, 'I': 428, 'o': 437, 'T': 456, 'd': 459, 'w': 473, 'N': 484, 'V': 500, 'H': 510, 'y': 513},
'K': {'a': 13, 'F': 48, 'Q': 54, '@': 65, 'f': 75, 'r': 87, 'R': 92, 'b': 101, 'B': 102, 'g': 109, 'G': 116, 'k': 121, 'x': 131, 'X': 138, 'Z': 148, 'A': 152, 'c': 155, 'C': 160, 'z': 169, 'q': 177, 's': 187, 'S': 194, 'P': 200, 'e': 201, 'E': 206, 'u': 209, 'U': 216, 'p': 225, 'j': 229, 'm': 231, 'M': 238, 'i': 239, 'l': 245, 'L': 252, 'J': 264, 'I': 272, 'o': 277, 'O': 286, 't': 287, 'T': 296, 'd': 299, 'N': 300, 'D': 304, 'w': 313, 'W': 316, 'n': 323, 'H': 326, 'y': 329, 'v': 333, 'V': 340, 'h': 343, 'Y': 362},
'N': {'H': 26, 'y': 29, 'i': 61, 'j': 79, 'P': 134, 'Z': 230, 'F': 252, '@': 263, 'f': 273, 'r': 285, 'R': 290, 'b': 299, 'K': 300, 'B': 300, 'g': 307, 'a': 313, 'G': 314, 'k': 319, 'x': 329, 'X': 336, 'A': 350, 'c': 353, 'Q': 354, 'C': 358, 'z': 367, 'q': 375, 's': 385, 'S': 392, 'e': 399, 'E': 404, 'u': 407, 'U': 414, 'p': 423, 'm': 429, 'M': 436, 'l': 443, 'L': 450, 'J': 462, 'I': 470, 'o': 475, 'O': 484, 't': 485, 'T': 494, 'd': 497, 'D': 502, 'w': 511, 'W': 514, 'n': 521, 'v': 531, 'V': 538, 'h': 541, 'Y': 560},
'M': {'e': 37, 'O': 48, 't': 49, 'u': 57, 'D': 66, 'W': 78, 'n': 85, 'l': 93, 'v': 95, 'h': 105, 'x': 107, 'Y': 124, 'B': 136, '@': 175, 'f': 179, 'F': 190, 'r': 195, 'R': 204, 'b': 213, 'g': 221, 'G': 224, 'k': 229, 'K': 238, 'X': 246, 'a': 251, 'A': 260, 'c': 263, 'C': 272, 'z': 277, 'Z': 284, 'q': 285, 'Q': 292, 's': 299, 'S': 302, 'E': 314, 'U': 324, 'p': 333, 'P': 336, 'm': 343, 'L': 364, 'j': 365, 'J': 372, 'i': 375, 'I': 380, 'o': 389, 'T': 408, 'd': 411, 'w': 425, 'N': 436, 'V': 452, 'H': 462, 'y': 465},
'H': {'y': 3, 'N': 26, 'i': 87, 'j': 105, 'P': 160, 'Z': 256, 'F': 278, '@': 289, 'f': 299, 'r': 311, 'R': 316, 'b': 325, 'K': 326, 'B': 326, 'g': 333, 'a': 339, 'G': 340, 'k': 345, 'x': 355, 'X': 362, 'A': 376, 'c': 379, 'Q': 380, 'C': 384, 'z': 393, 'q': 401, 's': 411, 'S': 418, 'e': 425, 'E': 430, 'u': 433, 'U': 440, 'p': 449, 'm': 455, 'M': 462, 'l': 469, 'L': 476, 'J': 488, 'I': 496, 'o': 501, 'O': 510, 't': 511, 'T': 520, 'd': 523, 'D': 528, 'w': 537, 'W': 540, 'n': 547, 'v': 557, 'V': 564, 'h': 567, 'Y': 586},
'B': {'x': 29, '@': 39, 'f': 43, 'F': 54, 'r': 59, 'R': 68, 'b': 77, 'g': 85, 'G': 88, 'k': 93, 'e': 99, 'K': 102, 'u': 107, 'X': 110, 'a': 115, 'A': 124, 'c': 127, 'C': 136, 'M': 136, 'z': 141, 'l': 143, 'Z': 148, 'q': 149, 'Q': 156, 's': 163, 'S': 166, 'E': 178, 'O': 184, 't': 185, 'U': 188, 'p': 197, 'P': 200, 'D': 202, 'm': 207, 'W': 214, 'n': 221, 'L': 228, 'j': 229, 'v': 231, 'J': 236, 'i': 239, 'h': 241, 'I': 244, 'o': 253, 'Y': 260, 'T': 272, 'd': 275, 'w': 289, 'N': 300, 'V': 316, 'H': 326, 'y': 329},
'Y': {'h': 35, 'v': 41, 'W': 46, 'n': 47, 'D': 58, 'M': 124, 'O': 126, 't': 127, 'e': 161, 'u': 181, 'l': 217, 'x': 231, 'B': 260, '@': 299, 'f': 303, 'F': 314, 'r': 319, 'R': 328, 'b': 337, 'g': 345, 'G': 348, 'k': 353, 'K': 362, 'X': 370, 'a': 375, 'A': 384, 'c': 387, 'C': 396, 'z': 401, 'Z': 408, 'q': 409, 'Q': 416, 's': 423, 'S': 426, 'E': 438, 'U': 448, 'p': 457, 'P': 460, 'm': 467, 'L': 488, 'j': 489, 'J': 496, 'i': 499, 'I': 504, 'o': 513, 'T': 532, 'd': 535, 'w': 549, 'N': 560, 'V': 576, 'H': 586, 'y': 589},
'D': {'W': 12, 'n': 19, 'v': 29, 'h': 39, 'Y': 58, 'M': 66, 'O': 68, 't': 69, 'e': 103, 'u': 123, 'l': 159, 'x': 173, 'B': 202, '@': 241, 'f': 245, 'F': 256, 'r': 261, 'R': 270, 'b': 279, 'g': 287, 'G': 290, 'k': 295, 'K': 304, 'X': 312, 'a': 317, 'A': 326, 'c': 329, 'C': 338, 'z': 343, 'Z': 350, 'q': 351, 'Q': 358, 's': 365, 'S': 368, 'E': 380, 'U': 390, 'p': 399, 'P': 402, 'm': 409, 'L': 430, 'j': 431, 'J': 438, 'i': 441, 'I': 446, 'o': 455, 'T': 474, 'd': 477, 'w': 491, 'N': 502, 'V': 518, 'H': 528, 'y': 531},
'Z': {'F': 100, '@': 111, 'f': 121, 'P': 130, 'r': 133, 'R': 138, 'b': 147, 'K': 148, 'B': 148, 'g': 155, 'j': 159, 'a': 161, 'G': 162, 'k': 167, 'i': 169, 'x': 177, 'X': 184, 'A': 198, 'c': 201, 'Q': 202, 'C': 206, 'z': 215, 'q': 223, 'N': 230, 's': 233, 'S': 240, 'e': 247, 'E': 252, 'u': 255, 'H': 256, 'y': 259, 'U': 262, 'p': 271, 'm': 277, 'M': 284, 'l': 291, 'L': 298, 'J': 310, 'I': 318, 'o': 323, 'O': 332, 't': 333, 'T': 342, 'd': 345, 'D': 350, 'w': 359, 'W': 362, 'n': 369, 'v': 379, 'V': 386, 'h': 389, 'Y': 408},
'W': {'n': 7, 'D': 12, 'v': 17, 'h': 27, 'Y': 46, 'M': 78, 'O': 80, 't': 81, 'e': 115, 'u': 135, 'l': 171, 'x': 185, 'B': 214, '@': 253, 'f': 257, 'F': 268, 'r': 273, 'R': 282, 'b': 291, 'g': 299, 'G': 302, 'k': 307, 'K': 316, 'X': 324, 'a': 329, 'A': 338, 'c': 341, 'C': 350, 'z': 355, 'Z': 362, 'q': 363, 'Q': 370, 's': 377, 'S': 380, 'E': 392, 'U': 402, 'p': 411, 'P': 414, 'm': 421, 'L': 442, 'j': 443, 'J': 450, 'i': 453, 'I': 458, 'o': 467, 'T': 486, 'd': 489, 'w': 503, 'N': 514, 'V': 530, 'H': 540, 'y': 543},
'P': {'j': 63, 'i': 73, 'Z': 130, 'N': 134, 'F': 152, 'H': 160, 'y': 163, '@': 163, 'f': 173, 'r': 185, 'R': 190, 'b': 199, 'K': 200, 'B': 200, 'g': 207, 'a': 213, 'G': 214, 'k': 219, 'x': 229, 'X': 236, 'A': 250, 'c': 253, 'Q': 254, 'C': 258, 'z': 267, 'q': 275, 's': 285, 'S': 292, 'e': 299, 'E': 304, 'u': 307, 'U': 314, 'p': 323, 'm': 329, 'M': 336, 'l': 343, 'L': 350, 'J': 362, 'I': 370, 'o': 375, 'O': 384, 't': 385, 'T': 394, 'd': 397, 'D': 402, 'w': 411, 'W': 414, 'n': 421, 'v': 431, 'V': 438, 'h': 441, 'Y': 460}}
 
Last edited:

ChrisR

Member
Oct 26, 2017
6,798
Day 17 part 2... I could do it with 4 instructions but with 3 I don't know if it's possible, unless falling off the scaffolding is something that has to be done.

edit: nevermind... I was overly optimizing one of the routines... breaking it apart and reducing it into two components freed up the command I needed space for.
 
Last edited:

Qronicle

Member
Oct 27, 2017
719
Belgium
important note: There may be other paths that are just as short. My program just keeps the first shortest path it finds. So it is possible you are still on a correct path. The only thing I can say with certainty is that the shortest path has to end on "y".

Finally found it, it was something pretty stupid in the end. Whenever I found the first path that collected all keys, my "max steps that should have been walked by a path to be explored further"-variable wasn't updated correctly, which meant the optimal path was discarded the next iteration... 🤦
(The path my code found was @rbgkfxeulacqzpsmotdwnvhjiy)

Edit: Day 18 part 2 worked pretty fast as well. The only thing I had to figure out was that I apparently had a lot of nodes with the same path, which should normally be prevented by the correct weight index, but hey. Result is now calculated in 14 seconds

Onto Day 22 part 2, the last star I'm missing. Might use some reddit answers for that, though.
 
Last edited:

Lafazar

Member
Oct 25, 2017
1,579
Bern, Switzerland
Finally found it, it was something pretty stupid in the end. Whenever I found the first path that collected all keys, my "max steps that should have been walked by a path to be explored further"-variable wasn't updated correctly, which meant the optimal path was discarded the next iteration... 🤦
(The path my code found was @rbgkfxeulacqzpsmotdwnvhjiy)

Edit: Day 18 part 2 worked pretty fast as well. The only thing I had to figure out was that I apparently had a lot of nodes with the same path, which should normally be prevented by the correct weight index, but hey. Result is now calculated in 14 seconds

Onto Day 22 part 2, the last star I'm missing. Might use some reddit answers for that, though.
Yeah, Day 22 is more of a math puzzle than a programming puzzle.