Editorial for COCI '06 Contest 1 #2 Herman


Remember to use this editorial only when stuck, and not to copy-paste code from it. Please be respectful to the problem author and editorialist.

Submitting an official solution before solving the problem yourself is a bannable offence.

A circle in taxicab geometry is a square in regular geometry (at an angle of 45 degrees if when placed in a Cartesian coordinate system). The area of such a "circle" is thus (\sqrt 2 r)^2 = 2r^2.

The area of a regular circle is \pi r^2. \pi can be embedded in the source code as a constant or calculated (better) as 4 \operatorname{atan}(1) or \operatorname{acos}(-1). Some implementations of the C language define the constant M_PI in the header <math.h>, though this is not defined by the C standard.


Comments

There are no comments at the moment.