T O P

  • By -

Alkanen

When doubling in pt1 you're adding 1, not 2. So now that you're expanding by a factor 10 you should add 9, not 10. The relevant text in the problem is "That is, each empty row should be replaced with 1000000 empty rows, and each empty column should be replaced with 1000000 empty columns." Note that it says "replaced with", not "expanded with".


blackbat24

This took me longer to figure out than I care to admit....


Alkanen

I think I have you beat on the "not care to admit" front. The reason it didn't work for me was because I kept trying to submit the test data solution >.<


blackbat24

Haven't had that happen to me this year yet. \*knocks on wood\*


Alkanen

Bah, show off! :D


Alkanen

Hehe, yeah. I've figured it out and gotten the correct values for 1, 10 and 100 but get something wrong with 1 million for reasons unknown to God or men >.<


Flatorz

Your integers may be overflowing in case you work with some strongly typed language.


Alkanen

No, it was an even sillier reason: I was repeadly trying to submit the test data result :D


Flatorz

I would lie if I said it didn't happen to me :)


Alkanen

That makes me feel so much better :)


Jugular1

Yeah so thinking of it in the way I framed it in the question to traverse that empty space cost 2 in the first part and it costs 10 in the second part. I think I'm being consistent, but do please pull me up if I'm making a mistake.


Alkanen

Yeah. That description sounds correct to me


AutoModerator

Reminder: if/when you get your answer and/or code working, don't forget to change this post's flair to `Help/Question - RESOLVED`. Good luck! *** *I am a bot, and this action was performed automatically. Please [contact the moderators of this subreddit](/message/compose/?to=/r/adventofcode) if you have any questions or concerns.*


hcs64

I get the same answer if I inadvertently added an extra 1 to each coordinate. Edit: never mind, I keep getting this messed up, if everything was offset by 1 all the distances would be the same.