hey guys i am stuck with this geometry problem. I tried the editorial but the explanation is not at all understandable. I also tried to understand from the submitted codes but not able to understand much. Can anyone please explain in a nice manner how to solve this problem...http://codeforces.me/contest/280/problem/A
firstly u must find points of rotated rectangle , then find the points that intersect with first rectangle lines and rotated rectangle lines then make simple polygon area with k points.
As you read from the nice tutorial, there are two cases. The second case isn't too hard to find the area of the parallelogram. I will talk about the first case: how to find the area of the four triangles? They are calculated in the similar way. I think you can get the idea from this picture and my code.
Here is my solution 3363199
why do you use swap function?
I have also incorporated swap func but just after I realized my code didn't work well when w<h :D:D
Just for simplicity, I want to keep the height less than or equal to the width as I was reasoning my code
thanks a lot dude excellent explanation. But can u please tell how to calculate the area for the second case.
For the second case, consider the two trapezoids as a parallelogram
finally understood :)
by the way how did u find the value of angle beta?