摘要:
拓展欧几里得,求出符合条件的最小整数解 #include <iostream> #include <stdio.h> #include <string.h> #include <stdlib.h> #include <algorithm> #include <math.h> #define LL l 阅读全文
posted @ 2017-03-06 20:31
声声醉如兰
阅读(145)
评论(0)
推荐(0)
摘要:
拓展欧几里得:求直线ax+by+c=0上有多少个整数点(x,y)满足x1<x<x2,y1<y<y2. exgcd代码 通过exgcd求出一直特解(x0,y0) 则任意整数解都可以写成(x0+kb',y0-ka')k取任意整数 若c不是gcd(a,b)的整倍数时无整数解 阅读全文
posted @ 2017-03-06 20:29
声声醉如兰
阅读(182)
评论(0)
推荐(0)

浙公网安备 33010602011771号