| ||||||||||
| 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 | |||||||||
一次欧几里得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: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator