Search found 5 matches

by Diego Caminha
Sat Apr 08, 2006 9:16 pm
Forum: Volume 110 (11000-11099)
Topic: 11021 - Tribles
Replies: 15
Views: 5455

After trying a lot I got it. So many things come to my mind but not the relationship between P(k, m) and P(1, m). When I finally understood it was really simple.

Thanks sclo.
by Diego Caminha
Fri Apr 07, 2006 9:16 pm
Forum: Volume 110 (11000-11099)
Topic: 11021 - Tribles
Replies: 15
Views: 5455

Can anyone help me? I know the problem is solved with DP but my probability skills are limited and I can't think a way of solving it properly! The only way I found that solves the problem is (or something very similar, i didn't coded it, just solved the sample input): P(k, m) = p0^k + W(k,1)*P(1, m-...
by Diego Caminha
Tue Mar 22, 2005 4:08 am
Forum: Volume 108 (10800-10899)
Topic: 10830 - A New Function
Replies: 33
Views: 15517

"Input is terminated by a line where the value of n=0. This line should not be processed." I didn't read the problem very well the first time and got some WA because of this. The sample input doesn't have a 0 at the end :evil: Input: 1 2000000000 1347838239 123848 137587 38495969 34888888 1234923 40...
by Diego Caminha
Wed Mar 16, 2005 6:22 am
Forum: Volume 108 (10800-10899)
Topic: 10824 - Regular Polygon
Replies: 20
Views: 9701

By different I mean: fabs(r1-r2) > 1e-8. Maybe epsilon could be larger, but that was the only value I tested. And it was enough to make my solution wrong!

But if it isn't a problem in the judge data, then get it as a warning to the ones who are getting WA.
by Diego Caminha
Wed Mar 16, 2005 1:58 am
Forum: Volume 108 (10800-10899)
Topic: 10824 - Regular Polygon
Replies: 20
Views: 9701

Maybe there's a problem in the judge data. After many WA I got accepted just chaging the way a calculated the radius. Instead of using the first x and y, I used the last ones. I did that after I found out that my program calculated differents radius by the simple formula "radius = sqrt(x^2 + y^2)". ...

Go to advanced search