« first day (4532 days earlier)      last day (803 days later) » 

16:16
my part 2 is failing and I don't know why. I don't think I'm getting integer overflow, I've accounted for that
Ah, I see it I think. My modulus arithmetic wasn't correct on the sample, which didn't give me confidence to go ahead with my actual input.
16:39
yep, some lambda capture magic and I solve the sample and actual inputs.
16:56
I don't see how you're supposed to be able to do part2 efficiently
And now that I say that, I think I do see it
You're not looking for efficiency, just avoiding integer overflows
I had an inefficient way of avoiding integer overflows
Specifically, BigInt
I actually used a class today
17:17
Yeah, I started with making everything an int64, but need both that and the modulus arithmetic in order to avoid going to int128, which isn't supported on most CPUs (and therefore by most C++ compilers), and might not actually be enough given a value might be squared 10000 times.
Also, part 2 is taking about a second in debug but less than 25ms in release on my laptop.
@Wipqozn still hasn't figured out the modulus arithmetic stuff, I see
And neither has the coworker on the QC team who is currently leading my work leaderboard.
17:35
@MBraedley I did part 1 then had to bail for family
18:29
@Wipqozn excuses excuses
 
1 hour later…
19:29
I got the trick done pretty quickly today, but then spent a bit of time making sure my solution still ran really fast
@MBraedley :(
I'm keeping all the solutions under 100ms still, my initial answer for today took 400ms but I got it back down by doing all the string parsing up front rather than in the main loop
But actually. I was finishing up part 1 when my mother showed to to pick me up... Then I ran part 2 and went "of course" haha
Will need to update my code to leverage modulus addition and multiplication when I get home
@Ronan Yeah today wasn't hard either. None of them have been hard so far. Today was probably the first one that really required you to know some undergraduate math (modulus stuff).
 
3 hours later…
23:00
> You're worried you might not ever get your items back. So worried, in fact, that your relief that a monkey's inspection didn't damage an item no longer causes your worry level to be divided by three.
for fuck sake
I didn't even read it. I just assumed it was "do the same as solution 1, but 10k times!"
Was losing my mind wondering why it wasn't working
I kept thinking I had to reduce the numbers even further, even though it made no sense
Got tripped up since previous years everytime there was a "now do it a BILLIOn times!", nothing else ever really changed... just "now make it more efficient or handle integer overflow"

« first day (4532 days earlier)      last day (803 days later) »