摘要: 使用Pollard_rho算法分解lcm/gcd的质因数,原因不说也明白了。然后排序,把相同的质因子合并,因为如果相同的质因子分落在两个因数,会使ab的GCD值改变。然后,枚举各种组合,呃。。。。这个实在想不到好方法,只好枚举了,真想不明白,那么两位数时间的是怎么样做到的。#include #inc... 阅读全文
posted @ 2014-09-08 20:24 chenjunjie1994 阅读(246) 评论(0) 推荐(0) 编辑
摘要: 使用Pollard_rho算法就可以过了#include #include #include #include #include #include #include #define LL __int64using namespace std;LL ans;const LL C=201;LL rand... 阅读全文
posted @ 2014-09-08 20:20 chenjunjie1994 阅读(210) 评论(0) 推荐(0) 编辑