red_coder's blog

By red_coder, 13 years ago, In English

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://mirror.codeforces.com/contest/280/problem/A

  • Vote: I like it
  • +3
  • Vote: I do not like it

»
13 years ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

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.

»
13 years ago, hide # |
Rev. 2  
Vote: I like it +10 Vote: I do not like it

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