########数论########
文章平均质量分 73
papapa_swust
这个作者很懒,什么都没留下…
展开
-
gcd,扩展gcd
欧几里得算法 int gcd(int a,int b){ return b==0?a:gcd(b,a%b); } 扩展欧几里得 一个结论:ax+by的最小正整数等于gcd(a,b); 如何求出ax+by=gcd(a,b)的解呢? 例如 60x+36y = gcd(60,36) 模拟一下gcd过程 序号 a b 1原创 2017-09-01 16:52:15 · 445 阅读 · 0 评论 -
LightOJ-1370 Bi-shoe and Phi-shoe
题目: Bamboo Pole-vault is a massively popular sport in Xzhiland. And Master Phi-shoe is a very popular coach for his success. He needs some bamboos for his students, so he asked his assistant Bi-Sho原创 2017-09-11 08:33:44 · 176 阅读 · 0 评论 -
POJ1305 勾股数组
Computer generated and assisted proofs and verification occupy a small niche in the realm of Computer Science. The first proof of the four-color problem was completed with the assistance of a computer原创 2017-08-31 16:10:23 · 228 阅读 · 0 评论 -
HDU5391 Zball in Tina Town 威尔逊定理
Tina Town is a friendly place. People there care about each other. Tina has a ball called zball. Zball is magic. It grows larger every day. On the first day, it becomes 11 time as large as its o原创 2017-08-31 22:27:19 · 202 阅读 · 0 评论 -
POJ1061 青蛙的约会 拓展欧几里得
题目: 两只青蛙在网上相识了,它们聊得很开心,于是觉得很有必要见一面。它们很高兴地发现它们住在同一条纬度线上,于是它们约定各自朝西跳,直到碰面为止。可是它们出发之前忘记了一件很重要的事情,既没有问清楚对方的特征,也没有约定见面的具体位置。不过青蛙们都是很乐观的,它们觉得只要一直朝着某个方向跳下去,总能碰到对方的。但是除非这两只青蛙在同一时间跳到同一点上,不然是永远都不可能碰面的。为了帮助这两原创 2017-09-02 15:37:15 · 173 阅读 · 0 评论