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 (2r)2=2r2.

The area of a regular circle is πr2. π can be embedded in the source code as a constant or calculated (better) as 4atan(1) or 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.