Online Judge | Problem Set | Authors | Online Contests | User | ||||||
---|---|---|---|---|---|---|---|---|---|---|
Web Board Home Page F.A.Qs Statistical Charts | Current Contest Past Contests Scheduled Contests Award Contest |
有挺多问题的In Reply To:请教。我得解法是O(n)的。但是不知道哪儿错了。 Posted by:Lucifer at 2005-08-13 18:32:48 1。b,c都是正整数,也就是数b>=1,c>=1;所以k-sqrtl((unsigned long)(k*k-4*(a*k+1)));要大于0,同时k-sqrtl((unsigned long)(k*k-4*(a*k+1)))/2和k+sqrtl((unsigned long)(k*k-4*(a*k+1)))/2都要是正整数,所以诸b=1/2,c=1/2,b+c=1,但还是会wa.如果要这样做还是比较烦,不推荐! Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator