
基础
Error Man
我是菜逼
展开
-
Codeforces 1114C (n阶乘在b进制下的末尾0数)
传送门题意:n阶乘在b进制下的末尾0数目思路:主要是理解一下进制的问题,一个数在b进制下含0,意思就是 能够整除b,那么自然可以想到。。。。这个题就是求n阶乘内能够包含多少个b。假如b的质因子是a1和a2分别出现b1,b2次,然后就求n!里a1和a2分别出现cn1,cnt2次,cnt1/b1和cnt2/b2之间的最小值就是n阶乘里b的个数了。。。这里我的代码丑的难看,就不要看了,...原创 2019-03-08 22:14:25 · 458 阅读 · 1 评论 -
杨辉三角的重要结论
第n行的m个数可表示为C(n-1,m-1),即为从n-1个不同元素中取m-1个元素的组合数。 第n行的第m个数和第n-m+1个数相等 ,为组合数性质之一。 每个数字等于上一行的左右两个数字之和。可用此性质写出整个杨辉三角。即第n+1行的第i个数等于第n行的第i-1个数和第i个数之和,这也是组合数的性质之一。即C(n+1,i)=C(n,i)+C(n,i-1)。 (a+b...原创 2019-04-17 00:02:34 · 4958 阅读 · 0 评论 -
POJ - 1061 青蛙的约会(扩展欧几里得 解同余方程,求最小正数解)
青蛙的约会有两只青蛙,青蛙A和青蛙B,它们在一个首尾相接的数轴上。设青蛙A的出发点坐标是x,青蛙B的出发点坐标是y。青蛙A一次能跳m米,青蛙B一次能跳n米,两只青蛙跳一次所花费的时间相同。数轴总长L米。要求它们至少跳了几次以后才会碰面。根据题意 可有方程 ( x + m * t ) % L = ( y + n * t ) % L ...原创 2019-07-18 10:21:51 · 462 阅读 · 0 评论 -
HDU - 2669 Romantic(扩展欧几里得 / 同余方程)
RomanticThe Sky is Sprite.The Birds is Fly in the Sky.The Wind is Wonderful.Blew Throw the TreesTrees are Shaking, Leaves are Falling.Lovers Walk passing, and so are You....................原创 2019-07-18 19:09:57 · 179 阅读 · 0 评论 -
2019 牛客多校 第一场 B.Integration(积分裂项+逆元)
B.Integration题目链接:https://ac.nowcoder.com/acm/contest/881/B题意:略思路:看了大佬的题解,对于连乘可以这样,,然后需要的工作就是求 Ci。对于Ci,可以在等式两边同时乘以 (ai² + x²)。如 C1, 乘完之后就是,那么令 X² = - a1² 即可解得。 有 为什么可以这样呢?以下是我的瞎BB假如...原创 2019-07-19 12:48:48 · 191 阅读 · 0 评论 -
HDU - 1792 A New Change Problem(两个互质的数不能组成的最大数和个数)
A New Change ProblemNow given two kinds of coins A and B,which satisfy that GCD(A,B)=1.Here you can assume that there are enough coins for both kinds.Please calculate the maximal value that you cann...原创 2019-07-19 15:52:19 · 602 阅读 · 0 评论 -
HDU - 4497 GCD and LCM (数论基础 + 组合数)
GCD and LCMGiven two positive integers G and L, could you tell me how many solutions of (x, y, z) there are, satisfying that gcd(x, y, z) = G and lcm(x, y, z) = L?Note, gcd(x, y, z) means the grea...原创 2019-07-17 16:12:07 · 247 阅读 · 0 评论 -
HDU - 2619 Love you Ten thousand years (数论,原根)
Love you Ten thousand yearsLove you Ten thousand years------Earth's rotation is a day that is the representative of a day I love you. True love, there is no limit and no defects. Earth's revolution ...原创 2019-07-19 20:40:22 · 321 阅读 · 0 评论 -
HDU - 2588 GCD (数论,欧拉函数,gcd)
GCDThe greatest common divisor GCD(a,b) of two positive integers a and b,sometimes written (a,b),is the largest divisor common to a and b,For example,(1,2)=1,(12,18)=6.(a,b) can be easily found by...原创 2019-07-20 10:28:29 · 254 阅读 · 0 评论