输入 n a b k 有n层楼 起点在a层 b层是不能到达的 假设当前在x层 每一次可以到达y层 满足 |x-y|
dp[i][j]为第i次到达j层的方案数 dp[i][j] = sum(dp[i-1][k]) 其中|k-j|
满足条件的k是连续的一段 用前缀和优化
#include
#include
#include
using namespace std;
typedef l...
分类:
其他好文 时间:
2014-11-06 21:59:40
阅读次数:
244
真是状况百出的一次CF啊……
最终还Unrated了,你让半夜打cf 的我们如何释怀(中途茫茫多的人都退场了)……虽说打得也不好……
在这里写一下这一场codeforces的解题报告,A-E的 题目及AC代码,部分题目有简单评析,代码还算清晰,主要阅读代码应该不难以理解。...
分类:
其他好文 时间:
2014-11-06 07:06:51
阅读次数:
237
题意:有一个数x,给定k组ai和ri,使得x%ai=ri
求x最小为多少
分析:求解模线性方程组
x = a1(mod m1)
x = a2(mod m2)
x = a3(mod m3)
先求解方程组前两项。 x=m1*k1+a1=m2*k2+a2
-> m1*k1+m2*(-k2)=a2-a1...
分类:
其他好文 时间:
2014-11-05 17:21:01
阅读次数:
159
Godfather
Time Limit: 2000MS
Memory Limit: 65536K
Total Submissions: 4853
Accepted: 1671
Description
Last years Chicago was full of gangster fights and strange murder...
分类:
其他好文 时间:
2014-11-03 19:26:31
阅读次数:
192
题目链接:Codeforces 479E Riding in a Lift
题目大意:有一栋高N层的楼,有个无聊的人在A层,他喜欢玩电梯,每次会做电梯到另外一层。但是这栋楼里有个秘
密实验室在B层,所以每次他移动的时候就有了一个限制,x为当前所在层,y为目标层,|x - y|
后,有多少不同的路径。
解题思路:dp[i][j]表示在第i步到达j层有多少种不同的路径,dis...
分类:
其他好文 时间:
2014-11-03 00:03:07
阅读次数:
244
Strange Way to Express IntegersDescriptionElina is reading a book written by Rujia Liu, which introduces a strange way to express non-negative integer...
分类:
其他好文 时间:
2014-10-30 20:47:17
阅读次数:
242
Elevate_601电梯设计软件Lift.Designer.v5.2.Premium.Suite 电梯系统设计 2020 Kitchen design 6.1(占美国97%以上市场的橱卫设计软件)Segmented.Project.Planner.v2.01.0126 车床木器部件加工辅助软件S....
分类:
其他好文 时间:
2014-10-29 10:30:55
阅读次数:
1136
http://acm.hdu.edu.cn/showproblem.php?pid=1548A strange liftTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others)Total Submi...
分类:
其他好文 时间:
2014-10-25 20:05:08
阅读次数:
224
In cases like this, where the independent variable does not have an intrinsic ordering, it isoften a good idea to sort entries by the dependent variab...
分类:
其他好文 时间:
2014-10-24 12:32:15
阅读次数:
233
The number of steps
Time Limit: 1000ms Memory limit: 65536K 有疑问?点这里^_^
题目描述
Mary stands in a strange maze, the maze looks like a triangle(the first layer have one room,the ...
分类:
其他好文 时间:
2014-10-22 20:22:52
阅读次数:
235