exgcd
摘要:exgcd 解决的问题: 求出a*x+b*y=c(a,b,c为常量)的一组解,时间复杂度log(a) 首先先做一个证明 a*x+b*y=c 有整数解的充要条件是c整除gcd(a,b) 设gcd(a,b)=p 1.充分性: a*x+b*y=c a'*p*x+b'*p*y=c(a'=a/p) p(a'*
阅读全文
Codeforces Round #375 (Div.2)
摘要:723A - The New Year: Meeting Friends 723B - Text Document Analysis 723C - Polycarp at the Radio 723D - Lakes in Berland 723E - One-Way Reform 题面大意:给一个
阅读全文
Codeforces Round #514 (Div. 2)
摘要:1059A - Cashier 1059B - Forgery 1059C - Sequence Transformation
阅读全文