« first day (15 days earlier)      last day (1123 days later) » 

02:57
@emanresuA yes indeed
it was not hard
just needed to read it properly
 
2 hours later…
04:52
Under 10m
Quiet today...
2m
1.25m
.5m
.1666666m
1s
this is
...
thouight-requiring
i was not prepared to think
05:08
phisicis
Two wrong answers on p2 danf
Make it three
Okay how tf did my p1 work
I did it all wrong
But I still somehow got the right answer
Yay, top 100 for both parts!
05:12
embarassingly enough i literally have no clue how the fuck to solve this
This was a fun one
i literally don't even know where to start actually programming something for this
the leaderboard has completely filled and i don't actually have an abstract idea yet
genuinely busting out the pen and paper
Brute fuckin force
05:12
besides "brute force it lol?" except that... isn't actually working
where the fuck do you even brute force from
I brute forced it
just go in a spiral?
idfk
Worked for me
05:12
No, I just did every initial velocity up to like 1k for both
"1) 2237 ***************** btnlq"
saved
I just brute forced all values between -500 and 500 for both
actually no i still can't see how there's a clear like
upper bound
well at least i have no pressure and can just take however much time i want to think about this now
05:13
I picked too low of bounds at first, which cost me a lot of placement
i just barely kept my rank too
@UnrelatedString At some x value you'll overshoot first tick
but for the y
but ksun is now only 14 points below me
and my #3 gap is up to 148
which is technically still clearable but it's getting close to the end
05:14
I'm in 99th now, that's not bad
like i'm trying to obtain an upper bound because it seems like there should be one but there's nothing obvious
nice
I just kept increasing it by a few hundred untul my answer didn't change
crazy idea
there is probably a way to take any point and determine the required initial dx,dy to hit it
although that isn't unique so
maybe not
I liked today, it felt very open ended unlike yesterday
today is a good problem i'm just not smart enough for it
05:16
this is making me suicidal
^
but ironically
don't escalate me to cms
you know, it kind of feels liberating
to be able to just like
take it slow
think about this for as long as i want, go through different approaches and ideas, and just enjoy the problem
05:18
Oh yeah, the stress at your level trying to do it in like...top ten must be insane
since i never had a shot at the leaderboard in the first place i'm still freaking the fuck out because i like to still be able to pride myself on three digit ranks
holding my rank should in theory be fine because i am faster than ksun although as the problems get harder his CP experience might just overtake mine
@RedwolfPrograms yeah, suffering from success :P once i'm up that high already there's no "good enough" until i can get 1st some year hopefully, then i'll be fully satisfied lol
the thing is like
But then you're pressured to do it again, or else you'll feel like you've gotten worse :p
how do we know the answer is necessarily positive? for all we know we might have to shoot the spear down
@RedwolfPrograms yep...
you can probably get a pretty small lower bound because otherwise it'll just go under
05:20
the thing i had trouble with is like
how do you determine if the spear went under, over, too far left, too far right, etc
I did equally many negative as positive, but yeah the lower bound is going to be like -100 at most
and under only = too far left because the target is on the right side but what if it isn't
i feel like the way this is that's not even worth distinguishing
You only have to deal with the target being on the right though, right?
yes
well you can just scan over the input anyway
ok useful fact
05:22
it seems like it should just be an issue of your y velocity not sending it straight through
for part 1 at least
if you throw the spear up, it will always hit x=0 exactly
and the number of steps it takes to do that is 2dy+1
Oh, that's clever
and then it becomes equivalent to throwing the spear down at -dy-1
oh wait it
05:23
and since the x and y values are independent because this fluid only applies drag along one axis somehow
your upper y bound is just the lowest edge negated plus like one or whatever
i already got the x and y independent bit but i couldn't think of anything usable about y lmao
because otherwise when it hits x=0 it will just fall down too much at once and completely miss
okay, so we can easily get the maximum bounds for y
...you know, it would be nice if there was a worked out example that actually showed a maximal y velocity
05:24
yeah
and then given a particular dy, we can also then just run the simulation and determine during which steps it is in the correct y range
i think this might be the first time they've literally not given us an actual sample input-output
Didn't they
they do give us the output, 45
there's a bunch of stuff illustrating the physics of the probe but none of the samples have anything about maximal y
Also, it's definitely not the first time, they didn't do it on 2019 Day 25 (or for that matter, any of the more complicated intcode challenges)
05:26
oh wait nvm
literally cannot read
Anyway, done 1286/736
I used a inefficient brute-force approach and got the wrong answer once for each part by not having a wide enough search space
(It still took only a few seconds, though)
I did the same thing yeah
alright, so if we let my be the bottom y edge
05:27
And I was changing x instead of dx for drag, and somehow it still worked for p1
Interestingly, that wrong answer for part 1 (I think it was 4950) was the right answer for someone else
oh specifically
@RedwolfPrograms Which is either the world's most insane luck, or an obvious math thing that I missed
if you throw the spear up, its return down backtracks its y positions up
oh yeah that
should have been obvious in retrospect
whoops
05:28
yeah i should've known this from like
physics class
@RedwolfPrograms Probably because in the winning part 1 answer what matters is the y value, and for every y value there is an x value that gets it in the x part of the target for both the intended drag calculation and your screwed up one
momentum on impact is same throwing something down or up
you know what i'm just gonna not make assumptions about where the target area is and go for completeness
so we literally just need the velocity that + 1 lands it straight in the box backwards
or not
that might not necessarily work
because it might be impossible to find a dx that lands it in the right horizontal range at the right step
05:30
if miny is negative then we can lower bound dy at miny-1
otherwise just lower bound at 0 even though it could be higher but that takes math
It's interesting that in every single day except Day 14 I did better at Part 2 than Part 1
And that the same phenomenon wasn't true last year
actually easier to think about this in three cases
if the target area sits below the horizon, we lower bound dy at miny - 1 and upper bound it at -miny
if the target area sits above the horizon we lower bound dy at 0 and upper bound it at maxy
although the spec becomes ambiguous if the target area is above the horizon, actually
It was true in 2019 as well, but that year I binged the entire thing in a few days, and still saved Christmas with hours to spare
so i think we might actually want to just assume it's below
05:33
and then for each dy we can just keep running the simulation and check on which steps it's in range
wait fuck we don't need a lower bound
just keep decrementing until you find a valid dy
and then just search for if there's a valid dx that hits the range within those steps
you could bsearch but just like, brute force it lol
oh i'm fucking dumb
minx, maxx, miny, maxy = map(int, re.findall(r"\d+", data))
istg my original solution might've actually been valid if not for this
mfw 1off p2
f
my attempted brute force is just not giving me any results
05:44
rip
and now it's giving me too many
and now it's giving me a single wrong one
looks like a bounds issue
my problem is when the hell do i stop iterating
wait no i literally printed the first one that missed
      -------Part 1--------   -------Part 2--------
Day       Time  Rank  Score       Time  Rank  Score
 17   00:39:28  2712      0   00:48:06  2308      0
mfw
hey, at least i have not submitted a single wrong answer yet
05:48
copium
I'd be interested to see just how different our approaches ended up being lol
okay mine just gave me nothing again after like 30 seconds because i made the bounds huge
This was mine, full vanilla JS for the first time
@RedwolfPrograms Full respect to Eric Wastl that is :P
3
you know, i've only not placed 5 times total (d1p1 because internet, d6, d17), so that isn't really something to be all that disappointed with i suppose
...i may have identified a very dumb logic error
fixed it, gave me 139 despite that i already tried that, tried it again and unsurprisingly wrong
So wait why didn't you do a brute force? Was it just since you weren't going to get top 100 anyway, so y'all were going for something more elegant?
i know i'm trying to do a brute force
after trying to think of bounds then promptly giving up
@RedwolfPrograms i tried to go for a somewhat more elegant solution but it's still not fully smart cuz i could use math to make it better
05:58
oh wait i literally forgot to calculate the y position from the velocity
:/
or just record it since it's brute force anyways
...
4002/3163
how did you end up doing it
i literally just brute forced with the bounds we thought through
and somefuckinghow it took me half an hour to realize i was forgetting to output the maximum y coordinate for part 1
i am typing this on my phone in bed and manually lowercasing my is
06:12
@hyper-neutrino in my case it literally worked but i put the velocity in instead of the corresponding triangular number
:/
i should've mentioned that
i thought of that like very early on even before i gave up lol
figured that might be a potential mistake
I find it absolutely insane you can go into a store and buy a pocket calculator for a dollar. Think about that. It was most likely built in China, and shipped all the way around the world. It fits in a pocket, and does computation in an instant that ordinary people would only be able to start fully understanding in like the last two centuries. And at minimum wage, you can buy fifty of them with a day's wages.
07:10
this took much longer than it should've
mostly due to fiddling with the possible velocities, then realizing i could just optimize for the input anyway

« first day (15 days earlier)      last day (1123 days later) »