Search found 3 matches

by lukasP
Sat Aug 12, 2006 11:01 pm
Forum: Volume 110 (11000-11099)
Topic: 11065 - A Gentlemen's Agreement
Replies: 19
Views: 10339

11065 - A Gentlemen's Agreement

Hello,
this is maximum independent set problem, which is NP-complete. So how can it be solved in 15 seconds?
by lukasP
Tue Jun 06, 2006 9:28 am
Forum: Volume 110 (11000-11099)
Topic: 11047 - The Scrooge Co Problem
Replies: 31
Views: 19701

Hello,
I am getting WA. My program works good for input posted here. Did you assume that the names of cities don't contain spaces?
by lukasP
Mon Aug 08, 2005 12:55 pm
Forum: Volume 108 (10800-10899)
Topic: 10883 - Supermean
Replies: 30
Views: 17448

I have used logarithm to solve this problem. log(nCi)=log(nC i-1)+log(n-i)-log(i).

The smallest number is about 2^-50000. But log(2^-50000)=-34657.359 and there is no problem with precision. If log(nCi)+(n-1)*log(0.5) is small enough, you can ignore it.

Go to advanced search