ENG  RUSTimus Online Judge
Online Judge
Problems
Authors
Online contests
About Online Judge
Frequently asked questions
Site news
Webboard
Links
Problem set
Submit solution
Judge status
Guide
Register
Update your info
Authors ranklist
Current contest
Scheduled contests
Past contests
Rules
back to board

Discussion of Problem 1215. Exactness of Projectile Hit

How to output double diameter and what's wrong with 4(+)
Posted by SPIRiT 1 Sep 2006 16:22
I have 3 questions:
1) What does it mean "inside the polygon". If the target point lies on one of the edges is it inside the polygon.
2) I just found the distances from each edge to the target point and chose the minimal one. If the the target was inside the polygon, I output 0.000. Is that correct
3) I find the minimal distance, after that I multiply it on 2. How to output: should I use any round functions. I just used fprintf(stdout,"%.3f",res), where res is the diameter found and got WA at 4. If I tried to round it up to the third digit, I had WA at 2. What's the correct approach?