上一页 1 2 3 4 5 6 7 ··· 38 下一页

2018年10月3日

求大的组合数模板 利用Lucas定理

摘要: Lucas定理:A、B是非负整数,p是质数。A B写成p进制:A=a[n]a[n-1]…a[0],B=b[n]b[n-1]…b[0]。 则组合数C(A,B)与C(a[n],b[n])C(a[n-1],b[n-1])…*C(a[0],b[0]) mod p同余 即:Lucas(n,m,p)=C(n%p 阅读全文

posted @ 2018-10-03 16:30 九月旧约 阅读(202) 评论(0) 推荐(0) 编辑

2018年9月29日

2018CCPC 吉林现场赛 赛后总结

摘要: 一直以来都没有比赛完写总结的习惯,导致前面几次比赛都没有写过总结。 这是我写的第一场总结把,有时间有想法还记得细节的话再把前面几次比赛的总结给补上把。 热身赛: 热身赛的时候,写的比较急想着快点做出题,队友B看懂了A题发现是一个水题当时过的人也挺多的,就想着赶紧写完交,写完后过了样例就提交了,然后就 阅读全文

posted @ 2018-09-29 20:52 九月旧约 阅读(1055) 评论(0) 推荐(0) 编辑

2018年9月28日

CF915C Permute Digits 字符串 贪心

摘要: You are given two positive integer numbers a and b. Permute (change order) of the digits of a to construct maximal number not exceeding b. No number i 阅读全文

posted @ 2018-09-28 20:48 九月旧约 阅读(299) 评论(0) 推荐(0) 编辑

2018年9月11日

CF1036C Classy Numbers dfs+二分

摘要: Classy Numbers time limit per test 3 seconds memory limit per test 256 megabytes input standard input output standard output Let's call some positive 阅读全文

posted @ 2018-09-11 16:58 九月旧约 阅读(185) 评论(0) 推荐(0) 编辑

2018年9月10日

Ryuji doesn't want to study 2018徐州icpc网络赛 树状数组

摘要: Ryuji is not a good student, and he doesn't want to study. But there are n books he should learn, each book has its knowledge a[i]a[i]. Unfortunately, 阅读全文

posted @ 2018-09-10 18:48 九月旧约 阅读(154) 评论(0) 推荐(0) 编辑

2018年9月9日

Supreme Number 2018沈阳icpc网络赛 找规律

摘要: A prime number (or a prime) is a natural number greater than 11 that cannot be formed by multiplying two smaller natural numbers. Now lets define a nu 阅读全文

posted @ 2018-09-09 20:19 九月旧约 阅读(380) 评论(0) 推荐(0) 编辑

Trace 2018徐州icpc网络赛 思维+二分

摘要: There's a beach in the first quadrant. And from time to time, there are sea waves. A wave ( xx , yy) means the wave is a rectangle whose vertexes are 阅读全文

posted @ 2018-09-09 20:12 九月旧约 阅读(681) 评论(2) 推荐(2) 编辑

Features Track 2018徐州icpc网络赛 思维

摘要: Morgana is learning computer vision, and he likes cats, too. One day he wants to find the cat movement from a cat video. To do this, he extracts cat f 阅读全文

posted @ 2018-09-09 19:59 九月旧约 阅读(289) 评论(0) 推荐(0) 编辑

2018年8月30日

牛客多校第六场 C Generation I 组合数学 阶乘逆元模板

摘要: 链接:https://www.nowcoder.com/acm/contest/144/C来源:牛客网 Oak is given N empty and non-repeatable sets which are numbered from 1 to N. Now Oak is going to d 阅读全文

posted @ 2018-08-30 15:02 九月旧约 阅读(263) 评论(0) 推荐(0) 编辑

关于斐波那契数列的一些恒等式 模板 牛客OI测试赛 A 斐波拉契

摘要: 牛客A 斐波拉契 链接:https://www.nowcoder.com/acm/contest/181/A来源:牛客网 设f[i]表示斐波那契数论的第i项 f[1]=1,f[2] =1,f[i] = f[i - 1] + f[i - 2] 给定一个n 求 输入描述: 输出描述: 示例1 输入 复制 阅读全文

posted @ 2018-08-30 11:26 九月旧约 阅读(524) 评论(0) 推荐(0) 编辑

上一页 1 2 3 4 5 6 7 ··· 38 下一页

导航