3rd place finish in Advent of Code 2021 Day 17

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hey there we've got advent of code this is day 11. um about to get started in a couple seconds so here we go okay yep okay yep six yep yep okay obviously because we might want this to be fast okay so now you want to speak this okay so oh this uh sign no that's only one i have always liked this sign yeah and then v x minus sine x plus zero divided by twice [Applause] uh i don't know if this works 250 oh 5151 nice i heard 68 let's see if this changes anything nice let's go oh kevin beat me alright anyway um cool i'll explain what i did here so yeah basically basically we just simulate the procedure described here start from the x y coordinate i simulate a thousand steps because that should be plenty to see if we land on that region or not um along the way track the max y that we ever touch and then once we hit the target region um we return max y if we never hit the target region after a thousand steps return negative one um the first part was uh basically two the first part is to uh find the highest why we get two and then the second part is just to count how many pairs actually make it there um both of these just use the same function and yeah i just use i just try enough velocities here until the answers don't really change so i don't have like a very clean let me see this i don't have like a super clean reason why i like proof why this is good but why isn't it but you can see like for example here if i do 500 uh i'm still getting the same answers and then yeah if i do 1200 if i do 100 that's not quite enough 200 does seem to be enough and i actually did all these 1200 and i'm still getting the same answers which makes you really confident that this is good so anyway that's what i did um should have moved up quite a bit on this leaderboard nice yeah i was in 40th earlier so this is a pretty big jump i guess people can still um get on the leaderboard and then pass me today so i might end like 35th or something uh maybe a little better than that but this was a nice bump up this is uh pretty good showing so yeah that's it i'll see you in the next video
Info
Channel: Neal Wu
Views: 5,321
Rating: undefined out of 5
Keywords: competitive, programming, algorithms, codeforces, advent, of, code
Id: iXt1hRdQrHE
Channel Id: undefined
Length: 8min 7sec (487 seconds)
Published: Thu Dec 16 2021
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.