【BZOJ 3505】[Cqoi2014]数三角形 组合数学
组合数学C(n*m,3)-一条线的情况就好了#include#include#include#define LL long longusing namespace std;LL ans,n,m;LL gcd(LL a,LL b){return !b ? a : gcd(b,a%b);}inline LL C(LL x){return x*(x-1)*(x-2)/6;}i
原创
2017-02-06 14:29:19 ·
219 阅读 ·
0 评论