码迷,mamicode.com
首页 >  
搜索关键字:a strange lift    ( 510个结果
Codeforces Round #274 (Div. 2) E. Riding in a Lift(DP)
Imagine that you are in a building that has exactly n floors. You can move between the floors in a lift. Let's number the floors from bottom to top with integers from 1 to n. Now you're on the flo...
分类:其他好文   时间:2014-10-22 01:07:40    阅读次数:217
CF R274 Div2 E Riding in a Lift DP
先预处理出能到当前点的区间,然后通过前缀和求得当前值即可。#include #include #include #include #include #include #include #include #include #include using namespace std; #define MP...
分类:其他好文   时间:2014-10-21 23:06:45    阅读次数:274
Codeforces Round #274 Div.1 C Riding in a Lift --DP
题意:给定n个楼层,初始在a层,b层不可停留,每次选一个楼层x,当|x-now| b时, 那么dp[i][j] += dp[i-1][(j与b的中点(以下))~n]由于dp[i][j]的值只跟dp[i-1][]的一些值有关,所以用滚动数组会大大减小内存。用一个sum[i][j]维护前缀和即可。代码:...
分类:其他好文   时间:2014-10-20 11:32:25    阅读次数:147
Codeforces 480C Riding in a Lift dp
题目链接:点击打开链接 题意: 给定 n a b k 构造一个长度为k的序列。 使得序列中 对于任意两个相邻的数 | w[i-1] - w[i] | 且第一个数 |a - w[1] | 问: 有多少种不同的序列。 思路:dp 对于粗暴的dp复杂度是 n^3 我们可以用前缀和来优化掉一维的dp。。 反正是简单粗暴的题。具体看代码吧。。 #include ...
分类:其他好文   时间:2014-10-19 23:19:10    阅读次数:179
HDU 2899 Strange fuction (二分)
Strange fuctionTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 3301Accepted Submission(s): 2421Pro...
分类:其他好文   时间:2014-10-16 21:19:13    阅读次数:183
Scala的线程actor
?? 7.   actor http://www.scala-lang.org/docu/files/actors-api/actors_api_guide.html#   Scala中处理并发,有很多选择: l  actor消息模型,类似Erlang,首选,Lift和akka也实现了自己的actor模型。 l  Thread、Runnable l  java...
分类:编程语言   时间:2014-10-16 16:02:22    阅读次数:301
poj1837--Balance(dp:天平问题)
Balance Time Limit: 1000MS   Memory Limit: 30000K Total Submissions: 10773   Accepted: 6685 Description Gigel has a strange "balance" and he wants to poise it. Actually, th...
分类:其他好文   时间:2014-10-15 10:24:30    阅读次数:242
UVA 10801 Lift Hopping 最短路
2种方式直接代码就可以了。注意首次不需要60S的转换#include #include #include #include #include #include #include #include #include #include #include #include #include #includ...
分类:其他好文   时间:2014-10-06 17:39:00    阅读次数:153
Light OJ 1318 Strange Game 组合数+快速幂+分解因子
长度为l的用k种字符组成的字符串有k^l中 其中m个字符要不相同 那就是k^l*C(l, m)*(k-1)^m 有重复 要除以2 但是你mod n了 不能直接除 n不一定是素数 所以不能乘以逆元 所以我都mod 2倍的n 最后的结果再除以2 特判l = 1 和 m = 0的情况 #include #include #include using namespace std; typedef...
分类:其他好文   时间:2014-10-02 01:18:31    阅读次数:441
UVA 10519 !! Really Strange !!
//ans=2*n+(n-1)(n-2) n>=2#include #include #include #include #include #include #include #include #include #include #include #include #include #include...
分类:其他好文   时间:2014-09-19 13:29:35    阅读次数:188
510条   上一页 1 ... 42 43 44 45 46 ... 51 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!