Online JudgeProblem SetAuthorsOnline ContestsUser
Web Board
Home Page
F.A.Qs
Statistical Charts
Problems
Submit Problem
Online Status
Prob.ID:
Register
Update your info
Authors ranklist
Current Contest
Past Contests
Scheduled Contests
Award Contest
User ID:
Password:
  Register

某个牛人的总结大家领会下

Posted by zxs7 at 2008-04-16 02:57:36 on Problem 2607
a*(a-1)=p*c*(c-1)/q
set up an array : m[i] = i*(i-1)
find c that m[c]%q==0
solve the equation a^2-a-p*m[c]/q=0
if a exists (a,c-a) is the answer, or find next c;

 p/q = a(a-1)/(a+b)(a+b-1)
令a = x, a+b = y;
则:            p/q = (x^2-x)/(y^2-y)
               x^2-x-np = 0
               y^2-x-np = 0
由二次方程根与系数的关系,以及 x<y 得到的


Followed by:

Post your reply here:
User ID:
Password:
Title:

Content:

Home Page   Go Back  To top


All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator