Cake
This problem devises a way of cutting a cake based on a variable 's' and asks us what integral value of 's' yields a value closest to some desired value.
From a geometry perspective, we need to calculate the area of the removed triangles. To do this, we need the length of the edges (Simply use pythagorean theorem and the two endpoints of each edge and multiple by 1/s), as well as the angle between two vectors (difference of arctan2 of the two vectors). We can then use some trig to calculate the xy coordinates of all points of the triangle, and the triangle, and the area is given by A=1/2*(A.x*B.y+B.x*C.y+C.x*A.y-A.x*C.y-B.x*A.y-C.x-B.y) (.5 * cross product of the two vectors).
Now that we can calcuate this, we can simply binary search on s, taking care to use 64 bit integers, and double checking around the candidate solution to ensure it is actually correct.
Alternate Solution
Triangle area grows at the square of the edge length. Evaluate at s==2 and then explicitly calculate the requisite value of s.