47th ICPC World Finals

Problem I: Waterworld

Problem authors: Walter Guttmann and Yujie An
Solved by 110 teams.
First solved after 16 minutes.
Shortest team solution: 171 bytes.
Shortest judge solution: 90 bytes.

The surface of a spherical cap or a spherical segment is proportional to its height. In cartography, this is known as a cylindrical equal-area projection. Formally, the surface area of any band of height h is 2πRh where R is the radius of the sphere. Each horizontal segment covers the same surface area during a whole rotation, and therefore also during a single step. The answer is simply the average of the numbers in the matrix.