How to solve the problem?
I first thought matching every possible solution, O(n^2) , it must be TLE.
then I thought sorting by angle, still can't find any relation.
Could someone offer me a hint? Thx
You have to check just from one point to all other points if the center of mass lies between this points. If there is no such points then answer is no.
Farid Ahmadov wrote:You have to check just from one point to all other points if the center of mass lies between this points. If there is no such points then answer is no.
what do you mean?
I choose a point randomly, then find the center of mass lies on the other points?
@@~~
I know how the solve the problem, at least i have the idea. the problem is that i have to use the function "atan2(y,x);" - that is in C. I must include "math.h", i know, i did that but i get complietion error. Please how can i use this function?.
Thanks.
The judge always compiles with this option, so you don't have to do anything.
If you get compilation error from the judge, it has nothing to do with including math.h, but maybe something else is wrong? Look at the reply sent back to you by the judge.
Yes, i figured it out.... I was using M_PI witch should be the pi constant (it probably works only in borland C, or i dont't know...) . But
where do i see the "reply sent back to me by the judge"? . It just shows Compilation error.
It depends on your personal settings. If you choose to let the judge send a reply to your email address, you'll get an email explaining the result, including the compiler output in case of compilation error. That can be quite helpful, especially if you don't use gcc.