pls someone give a detailed explanation of Problem 379E from codeforces. I am not able to get the explanation provided on codeforces.
thanks
pls someone give a detailed explanation of Problem 379E from codeforces. I am not able to get the explanation provided on codeforces.
thanks
I think the explanation is not so bad.
Ok. See what I understandβ¦
Explanation:
In this problem there will be some polyline(that forms a polygon in this problem), one placed upon another. First polygon will be the top. Then second polygon will be placed under first one. Then third polygon under the second and so on. You have to figure out what amount of area of each polygon one can see.
Input:
The first line contains two integers, n and k (1ββ€βn,βkββ€β300). Each of the following n lines contains kβ+β1 integers - each integer is the value for y-axis. If the i-th line contains integers y(i,0),βy(i,1),ββ¦,βy(i,k), that means that the polyline of the i-th polygon goes through points (0,β0), (0,βy(i,0)), (1,βy(i,1)), (2,βy(i,2)), β¦, (k, y(i,k)), (k,β0) where (1ββ€βy(i,j)ββ€β1000). Each polyline must start from (0,0) and end at(k,0).
Here n is number of polyline (or polygon). For example, in the given picture there are 3 polygon colored as red, yellow and blue.
Output:
For each polygon print visible area in float and you have to solve this problem such a way that after decimal point minimum 4 digit must be correct(not truncated value).
I think this will help u. If not then know me where is the difficulty.