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 Ly86 at 2011-01-25 12:55:08 on Problem 2142
ax+by=c;
求出通解x = xo + k1*i
       y = y0 - k2*i
k1,k2,你懂的.i是变量。
然后根据直线方程。
s = -x0/k1;
e = y0/k2;
min=min{s,e},max=max{s,e}
在区间[min-1,max+1]
这一段内,必取极小值。枚举这一段的 i

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