摘要: UVA.12716 GCD XOR (暴力枚举 数论GCD)题意分析题意比较简单,求[1,n]范围内的整数队a,b(a#include #include #include #define nmax 30000010#define ll long longusing namespace... 阅读全文
posted @ 2017-08-10 11:33 pengwill 阅读(338) 评论(0) 推荐(1) 编辑
摘要: UVA.10791 Minimum Sum LCM (唯一分解定理)题意分析也是利用唯一分解定理,但是要注意,分解的时候要循环(sqrt(num+1))次,并要对最后的num结果进行判断。代码总览#include #include #include #include #define ... 阅读全文
posted @ 2017-08-10 09:12 pengwill 阅读(129) 评论(0) 推荐(0) 编辑
摘要: UVA.10375 Choose and divide (唯一分解定理)题意分析首先写出组合数的公式,然后利用唯一分解定理分解每一项,若是在分子,则加一,在分母减一,最后根据分解的结果计算即可。代码总览#include #include #include #include #inc... 阅读全文
posted @ 2017-08-10 09:09 pengwill 阅读(121) 评论(0) 推荐(0) 编辑