#Day 13 Discussion
104 messages · Page 1 of 1 (latest)
I have no idea how to do this one
Need to put my thinking cap on
The fact A and B cost a different amount messes me up
I still need to do part 2 from yesterday. Found another edge case
Sounds like the bus stop problem from a couple of years ago
That was Chinese Remainder Theorem
Probably not though. The subreddit blew up xD
Math day today
part 2
?
part 1 is easy
||just solve two simultaneous with Cramer||
||me when I use polar coords because I'm edgy||
||Isn't that the guy from seinfeld||
wait that actually worked??

actually used something from linear algebra
hint: ||stop thinking of it as a discrete math problem for a moment||
||idk why the problem is worded as it is when there's just one combination that will lead you to the answer||
||or infinite?||
oh god I was so wrong

wait was i though
thonk
no idea why this doesn't work
nvm i just mistyped the answer
LMAO that worked for part 2 as well
i might be a genius
Oh wow this looks hard
My initial idea is ||a regression|| but I'm just gonna get a local maxima and be fucked
Ok ||cramer's rule|| works for part one
I input the example result into the box instead of my input so I have to wait an entire minute


lol my code gives a floating point result so i retyped it into the box and mistype
@vivid fractal am i wrong ðŸ˜
why is there a minimum when theres only one possible solution
What about something like this
Button A: X+50, Y+5
Button B: X+10, Y+1
Prize: X=60, Y=6
bruh
my matrix math is off somewhere
You estimate that each button would need to be pressed **no more than 100 times **to win a prize
is this a condition
I reaaaally don't like todays question
||This also doesn't come into play, at least in my input||
||maybe its a way to limit our search space||
this kinda of case doesnt seem to be there in my input 🤔
||nvm it was because i Floored instead of Round||
||it isn't in my input either||
afaik 2x2 systems of equations only have more than one answer when one equation can simplify to the other and then they have infinite solutions
yea
and that type of input doesnt seem to appear
so whats the with "minimum cost"
trying to throw you off perhaps
thought i had a chance to use binary search finally
precisely
you're not meant to linear eq it afaik
but it could just be bait who know
I did and it worked but it was nasty
underline, emphasis, italics on nasty
what was the intended way?
do the math right so u don't have rounding errors. Other than that I can't say
i just used integer division and checked the answer it spit out against the prize coordinates
not the most efficient way but it worked
I'm probably just dumb and kept doing the algebra wrong lol
i just built matrix and vec structs with methods for getting the determinant, inverting, and multiplication, it worked well enough but i had to apply the scalar division by the determinant last when using integers otherwise everything is 0
shut up I'm stupid this is probably why I had rounding issues
basic ||arithmetics||, you just solve a ||system of 2 equations||
today i did my best time in 3 years
i dont think its the intended way though
im pretty sure you can solve it entirely discretely with dynamic programming
even part 2?
What how
not htinking about it
its like those other dynamic programming problems
idk abt part 2
pretty sure htose constraints exist for a reason
i.e. the knapsack problem I think
or maybe the counting change one
could you do something similar to the stones problem
or maybe similar to day 7
where you have 3 different operations to choose from at every step and they all might get you closer or farther from the goal, here you have two operations with a cost associated
idk how it would work on part 2 because its all unbounded
idk man what do I look like a scientist or something