Problem D
Mushroom Misery
The Institute of Ubiquitousness in Lichtenstein, LIU, conducts a project where the effect of a special type of fungi, sphera carnelevarium, are studied. This fungus is very special, since it grows in a circular fashion from its centre, without interference from other objects or other individuals.
Until now, the impact of this forest-living creature has
been measured by examining a grid consisting of
Of course, the task of examining grids is tedious and now
unnecessary, since Prof. Müggel discovered that the grow
rate is exactly
![\includegraphics[width=0.5\textwidth ]{fig1}](/problems/mushroommisery/file/statement/en/img-0001.png)
Input
Input starts with a line containing two integers
All real values are given with at most
Output
For every test case, output one line containing the number
of affected squares (a number between
You may assume that the input is such that increasing the
radius of any mushroom by
Sample Input 1 | Sample Output 1 |
---|---|
3 1 1.5 1.5 0.44 |
1 |
Sample Input 2 | Sample Output 2 |
---|---|
5 3 2 3 1.31 1.5 2.5 0.5 3 2 0.94 |
13 |
Sample Input 3 | Sample Output 3 |
---|---|
10 1 4.42 0.23 0.5 |
2 |