随笔分类 -  Codeforces

1 2 3 4 5 ··· 9 下一页
摘要:题目链接:传送门 题解: 设定dp[i][j]在深度为i下,使用j个节点的方案数 显然的转移方程组就是 dp[h][n] = dp[h-1][i] * dp[h-1][n-i-1] + 2*dp[h-1][i]*dp[h-2][n-i-1]; 卷积形式 利用FFT加速求解dp[h] 下面是AC代码 阅读全文
posted @ 2017-08-02 21:04 meekyan 阅读(615) 评论(0) 推荐(0)
摘要:D. The Bakery Some time ago Slastyona the Sweetmaid decided to open her own bakery! She bought required ingredients and a wonder-oven which can bake s 阅读全文
posted @ 2017-07-31 11:02 meekyan 阅读(324) 评论(0) 推荐(0)
摘要:E. Liar The first semester ended. You know, after the end of the first semester the holidays begin. On holidays Noora decided to return to Vičkopolis. 阅读全文
posted @ 2017-07-07 20:34 meekyan 阅读(215) 评论(0) 推荐(0)
摘要:D. My pretty girl Noora In Pavlopolis University where Noora studies it was decided to hold beauty contest "Miss Pavlopolis University". Let's describ 阅读全文
posted @ 2017-07-07 20:26 meekyan 阅读(262) 评论(0) 推荐(0)
摘要:C. Hacker, pack your bags! It's well known that the best way to distract from something is to do one's favourite thing. Job is such a thing for Leha. 阅读全文
posted @ 2017-07-07 20:18 meekyan 阅读(341) 评论(0) 推荐(0)
摘要:B. Crossword solving Erelong Leha was bored by calculating of the greatest common divisor of two factorials. Therefore he decided to solve some crossw 阅读全文
posted @ 2017-07-07 20:12 meekyan 阅读(525) 评论(0) 推荐(0)
摘要:A. I'm bored with life Holidays have finished. Thanks to the help of the hacker Leha, Noora managed to enter the university of her dreams which is loc 阅读全文
posted @ 2017-07-07 20:07 meekyan 阅读(386) 评论(0) 推荐(0)
摘要:E. Thief in a Shop A thief made his way to a shop. As usual he has his lucky knapsack with him. The knapsack can contain k objects. There are n kinds 阅读全文
posted @ 2017-07-02 15:24 meekyan 阅读(261) 评论(0) 推荐(0)
摘要:E. Okabe and El Psy Kongroo Okabe likes to take walks but knows that spies from the Organization could be anywhere; that's why he wants to know how ma 阅读全文
posted @ 2017-06-26 10:06 meekyan 阅读(432) 评论(0) 推荐(0)
摘要:F. Group Projects F. Group Projects There are n students in a class working on group projects. The students will divide into groups (some students may 阅读全文
posted @ 2017-06-25 11:48 meekyan 阅读(257) 评论(0) 推荐(0)
摘要:C. Karen and Supermarket On the way home, Karen decided to stop by the supermarket to buy some groceries. She needs to buy a lot of goods, but since s 阅读全文
posted @ 2017-06-21 12:37 meekyan 阅读(292) 评论(0) 推荐(0)
摘要:E. Army Creation As you might remember from our previous rounds, Vova really likes computer games. Now he is playing a strategy game known as Rage of 阅读全文
posted @ 2017-06-16 20:56 meekyan 阅读(514) 评论(0) 推荐(0)
摘要:E. Scheme To learn as soon as possible the latest news about their favourite fundamentally new operating system, BolgenOS community from Nizhni Tagil 阅读全文
posted @ 2017-06-15 11:13 meekyan 阅读(273) 评论(0) 推荐(1)
摘要:F. Leha and security system Bankopolis, the city you already know, finally got a new bank opened! Unfortunately, its security system is not yet workin 阅读全文
posted @ 2017-05-14 14:03 meekyan 阅读(525) 评论(0) 推荐(0)
摘要:E. Prairie Partition It can be shown that any positive integer x can be uniquely represented as x = 1 + 2 + 4 + ... + 2k - 1 + r, where k and r are in 阅读全文
posted @ 2017-05-08 20:07 meekyan 阅读(425) 评论(0) 推荐(0)
摘要:题目链接:点这里 题意: 1~N标号的球 现在A有C个,B有C个 每次可以随机得到D个不同的球(1~N);问你A或B中的C个球都出现一次的 期望次数 题解: dp[i][j][k]表示 随机出现了i个仅仅属于A的球的个数,仅仅属于B的球的个数,同时属于A,B的球的个数 阅读全文
posted @ 2017-04-23 20:09 meekyan 阅读(614) 评论(0) 推荐(0)
摘要:题目链接:点这里 题意: 让你构造一个长度范围在[A,B]之间 字符串(大小写字母,数字),问你有多少种方案 需要满足条件一下: 1:构成串中至少包含一个数字,一个大写字母,一个小写字母; 2:不能包含给定的N个病毒串 3:遵循一堆映射规则 题解: 将病毒串建立AC自动机 设定dp[i][j] [0 阅读全文
posted @ 2017-04-23 18:59 meekyan 阅读(371) 评论(0) 推荐(0)
摘要:C. Divide by Three A positive integer number n is written on a blackboard. It consists of not more than 105 digits. You have to transform it into a be 阅读全文
posted @ 2017-03-29 11:13 meekyan 阅读(379) 评论(0) 推荐(0)
摘要:D. Felicity's Big Secret Revealed The gym leaders were fascinated by the evolutions which took place at Felicity camp. So, they were curious to know a 阅读全文
posted @ 2017-03-27 18:36 meekyan 阅读(304) 评论(0) 推荐(0)
摘要:F. PolandBall and Gifts It's Christmas time! PolandBall and his friends will be giving themselves gifts. There are n Balls overall. Each Ball has some 阅读全文
posted @ 2017-03-26 20:45 meekyan 阅读(410) 评论(0) 推荐(0)

1 2 3 4 5 ··· 9 下一页