摘要:
题目链接水题依旧无法1Y。 1 #include 2 #include 3 #include 4 using namespace std ; 5 #define LL __int64 6 LL gcd(LL a,LL b) 7 { 8 return b == 0?a:gcd(b,a%b); 9 }10 11 int main()12 {13 LL a,b,x,y,t;14 LL str,end,mid;15 scanf("%I64d%I64d%I64d%I64d",&a,&b,&x,&y);16 t = gcd(x,y);17 x = x/. 阅读全文
posted @ 2013-10-19 12:28
Naix_x
阅读(177)
评论(0)
推荐(0)
摘要:
题目链接AC了。经典问题,a*x+b*y+c = 0整数点,有些忘记了扩展欧几里德,复习一下。 1 #include 2 #include 3 #include 4 using namespace std ; 5 #define LL __int64 6 LL x,y; 7 LL ext_eulid(LL a,LL b) 8 { 9 LL t,d;10 if(b == 0)11 {12 x = 1;13 y = 0;14 return a;15 }16 d = ext_eulid(b,a%b);17 ... 阅读全文
posted @ 2013-10-19 11:08
Naix_x
阅读(233)
评论(0)
推荐(0)

浙公网安备 33010602011771号