转载请注明出处: http://www.cnblogs.com/fraud/          ——by fraud The number of steps Time Limit: 1 Sec  Memory Limit: 128 M Description Mary stands in a strange maze, the maze looks like a triangle(the first layer have one room,the second layer have two ro…
Description Mary stands in a strange maze, the maze looks like a triangle(the first layer have one room,the second layer have two rooms,the third layer have three rooms …). Now she stands at the top point(the first layer), and the KEY of this maze is…
转载请注明出处: http://www.cnblogs.com/fraud/          ——by fraud 2224: Boring Counting Time Limit: 3 Sec  Memory Limit: 128 MB Description In this problem you are given a number sequence P consisting of N integer and Pi is the ith element in the sequence.…
The number of steps nid=24#time" style="padding-bottom:0px; margin:0px; padding-left:0px; padding-right:0px; color:rgb(83,113,197); text-decoration:none; padding-top:0px"> Time Limit: 1000ms   Memory limit: 65536K  有疑问?点这里^_^ 题目描写叙述 Mary…
转载请注明出处: http://www.cnblogs.com/fraud/          ——by fraud Mountain Subsequences Time Limit: 1 Sec  Memory Limit: 128 MB Description Coco is a beautiful ACMer girl living in a very beautiful mountain. There are many trees and flowers on the mountain,…
We Love MOE Girls Time Limit: 1000/500 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 572    Accepted Submission(s): 378 Problem Description Chikami Nanako is a girl living in many different parallel worlds. In this…
The Number Off of FFF Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 78    Accepted Submission(s): 36 Problem Description X soldiers from the famous "*FFF* army" is standing in a line, fro…
题目链接: http://codeforces.com/gym/101194/attachments https://icpcarchive.ecs.baylor.edu/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&problem=5919 题意: 给出正整数 $N(1 \le N \le 10^5)$,询问对于正整数 $k$,有多少个小于 $2^N$ 的 $2^k-1$ 是 $7$ 的整数倍. 题解: $…
http://www.lightoj.com/volume_showproblem.php?problem=1065 题意:给出递推式f(0) = a, f(1) = b, f(n) = f(n - 1) +f(n - 2) 求f(n) 思路:给出了递推式就是水题. /** @Date : 2016-12-17-15.54 * @Author : Lweleth (SoungEarlf@gmail.com) * @Link : https://github.com/ * @Version : *…
这是一道比较水的期望概率dp但是考场想歪了.......我们可以发现奇数一定是不能掉下来的,因为若奇数掉下来那么上一次偶数一定不会好好待着,那么我们考虑,一个点掉下来一定是有h/2-1个红(黑),h/2+1个黑(红),而且一定是差不多相间的(我就是因为没有看出来这里才会去想组合数,然后......),那么我们发现只要一奇一偶,就可以组成一对,因为偶数一定是平的因此,我们发现在掉下来的那对之前都是红黑或黑红,但是到了这里就是红红或黑黑了,我们只要求出(异色的概率)^(h/2-1)*(同色的概率)就…