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 |
题解求x,y的通解,设为u,v,就是要求|u-at|+|v+bt|的最小值,其中只有t是未知数,这就是一个分段函数,零点就在两个绝对值的零点时取到,所以就枚举零点两端最近的4个整数,4种情况就好了。Bug:用欧几里得求出一组解后,要马上带回原方程然后求通解,不能求完通解后再回到原方程,那样会漏解 Followed by:
Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator