摘要: 问题:求和:1^k+2^k+...+n^k 例题: https://codeforces.com/contest/622/problem/F 代码: #include<bits/stdc++.h> #define fore(x,y,z) for(LL x=(y);x<=(z);x++) #defin 阅读全文
posted @ 2022-09-10 21:59 80k 阅读(214) 评论(0) 推荐(0)
摘要: exgcd用于计算,形如ax+by=c的解。 证明:参考:https://www.cnblogs.com/mrclr/p/9380300.html 1、利用exgcd求解ax0+by0=gcd(a,b)的一个解: LL ExGCD(LL a, LL b, LL &x, LL &y) { if (b 阅读全文
posted @ 2022-09-10 11:28 80k 阅读(58) 评论(0) 推荐(0)