ACM ICPC World Finals 2015
Shortest judge solution: 983 bytes. Shortest team solution (during contest): 966 bytes.
This was one of the easiest problems in the set. To compute where to make the ith cut, simply binary search for the z coordinate where the volume up to coordinate z is an i/s fraction of the total volume of the cheese.
To compute the volume up to a given z coordinate, we subtract the volume of holes below this z coordinate. This involves calculating volumes of spherical caps, which is a relatively straightforward calculus problem; the volume of a spherical cap of height h of a sphere of radius 1 is
∫x=1−h1 π(1 − x2)dx = π(h − 1/3 + (1 − h)3/3).
(And for a spherical cap of height h · r of a sphere of radius r, the volume is scaled by a factor r3.)