摘要: Given A,B,C, You should quickly calculate the result of A^B mod C. (1 include include include include include define sf scanf define pf printf define 阅读全文
posted @ 2018-07-24 21:27 一无所知小白龙 阅读(396) 评论(0) 推荐(0) 编辑
摘要: 求a^b(%mod) 如果是接近1e18的数字的快速幂,则会爆long long,这就要用快速乘; 阅读全文
posted @ 2018-07-24 20:48 一无所知小白龙 阅读(138) 评论(0) 推荐(0) 编辑
摘要: The Sky is Sprite. The Birds is Fly in the Sky. The Wind is Wonderful. Blew Throw the Trees Trees are Shaking, Leaves are Falling. Lovers Walk passing 阅读全文
posted @ 2018-07-24 18:15 一无所知小白龙 阅读(167) 评论(0) 推荐(0) 编辑
摘要: The Farey Sequence Fn for any integer n with n = 2 is the set of irreducible rational numbers a/b with 0 include include include include include defin 阅读全文
posted @ 2018-07-24 17:42 一无所知小白龙 阅读(272) 评论(0) 推荐(0) 编辑
摘要: 1.欧几里得原理是辗转相除法,用来求最大公约数的; 2.拓展欧几里得原理,可以用来解二元一次方程:A X+B Y=C; 模板 (返回值是gcd(a,b)) 因为用的是A X+B Y=gcd(A,B),所以结果x,y要乘上 c/gcd(a,b)!!!!! int ans=exgcd(int a,int 阅读全文
posted @ 2018-07-24 11:05 一无所知小白龙 阅读(412) 评论(0) 推荐(0) 编辑