
11373 - Happy Birthday
Moderator: Board moderators
I can't figure out how to calculate the area of each slice of cake (ignoring the height). 

Runtime errors in Pascal are reported as Wrong Answers by the online judge. Be careful.
Are you dreaming right now?
http://www.dreamviews.com
Are you dreaming right now?
http://www.dreamviews.com
OK, try this:
- draw a circle, mark two points on it (say A,B)
- pick a point inside the circle (not at the center), call it C
- connect A to C and B to C
Your problem is that you cannot calculate the area of ABC where AB is an arc, right?
- center of the circle is at the origin, so call it O
- connect A to O and B to O
What area do regions ABC and ABO have in common? If you can calculate ABO how can you calculate ABC? Again, look at the triangles formed by those points. Note that there are two cases.
- draw a circle, mark two points on it (say A,B)
- pick a point inside the circle (not at the center), call it C
- connect A to C and B to C
Your problem is that you cannot calculate the area of ABC where AB is an arc, right?
- center of the circle is at the origin, so call it O
- connect A to O and B to O
What area do regions ABC and ABO have in common? If you can calculate ABO how can you calculate ABC? Again, look at the triangles formed by those points. Note that there are two cases.