Search found 4 matches

by 2481RE
Sat Mar 01, 2003 1:14 pm
Forum: Volume 104 (10400-10499)
Topic: 10451 - Ancient Village Sports
Replies: 22
Views: 13811

Thanks a lot for help. Both algos were good. The problem was precision.
When I used double instead of float I got accepted. :D
by 2481RE
Fri Feb 28, 2003 4:09 pm
Forum: Volume 104 (10400-10499)
Topic: 10451 - Ancient Village Sports
Replies: 22
Views: 13811

Can anyone tell me what's wrong?

area_r = (2 * acos(0)) * (area/(n*tan((2 * acos(0))/n)));
area_R = (2 * acos(0)) * 2*area/(n*sin(2*(2 * acos(0))/n));

spectators = area_R - area;
officials = area - area_r;

that's my algo, which works fne for test cases, but I receive WA...
by 2481RE
Thu Feb 27, 2003 2:10 pm
Forum: Volume 104 (10400-10499)
Topic: 10451 - Ancient Village Sports
Replies: 22
Views: 13811

if someone could give me any test cases...

OK - I tried 2*acos(0) - and for all test cases worked fine, but, still got WA. And I have no idea why. Can anyone send me more test cases?
by 2481RE
Wed Feb 26, 2003 11:48 pm
Forum: Volume 104 (10400-10499)
Topic: 10451 - Ancient Village Sports
Replies: 22
Views: 13811

10451 - Ancient Village Sports

I have encountered following problem:
I cannot use M_PI defined in math. In the description is:
more less PI = 2 * cos^-1 (0)
How to code it? I tried 2/cos(0) but it didn't work.
And I tried also #define PI = 3.14159265358979323846,
but it didn't work either (example set works fine but I've got WA)

Go to advanced search