码迷,mamicode.com
首页 >  
搜索关键字:a strange lift    ( 510个结果
A strange lift
点击打开链接 题意:有n层楼层,现在在每一层有两个按钮,分别为up和down,按动按钮时,可以向上或向下跳动num[ i ]层;问能否以最少的次数从A到B层,不能输出-1; 解析:构图,将从i层到按动按钮后跳转的楼层,看作连通状态,赋值为1,这样就转换成单源最短路问题; #include #include #include using namespace std; const int m...
分类:其他好文   时间:2014-07-13 18:37:00    阅读次数:231
[题解]UVA10801 Lift Hopping
链接:http://vjudge.net/problem/viewProblem.action?id=22172描述:有n部电梯,每部电梯都有不能停下的楼层,要求搭乘电梯从第0层到第k层。思路:单源点最短路 建图:将每层楼拆成n个点,用边权解决换乘等待的时间。将每部电梯能到达的楼层顺次连接,边...
分类:其他好文   时间:2014-07-06 19:12:36    阅读次数:198
hdu 1882 Strange Billboard(位运算+枚举)
http://acm.hdu.edu.cn/showproblem.php?pid=1882感觉非常不错的一道题。给一个n*m(1=2)行j列翻转情况受上一行的制约,仅仅有当上一行也是‘X’的时候,该行j列才干翻转,使i-1行j列变为‘.’,否则i行j列不能翻转。依次进行下去,当最后一行全变为白色,...
分类:其他好文   时间:2014-07-05 21:11:36    阅读次数:180
zoj 3332 Strange Country II
DFS+回溯...
分类:其他好文   时间:2014-06-26 12:12:01    阅读次数:266
POJ 2891 Strange Way to Express Integers 中国剩余定理
裸题,上模版,,嘿嘿 #include #include #include #include #include #include #include #include #include using namespace std; #define ll __int64 ll gcd(ll a, ll b) { return b == 0 ? a : gcd(b, a%b); } //求一组解(x,y...
分类:其他好文   时间:2014-06-25 19:51:56    阅读次数:138
Customize toolbar style in LibreOffice 4.2.4.2 on Linux
It is strange but interesting to see that all the toolbars in LibreOffice 4.2.4.2 have title bar displayed on Linux operating system (Debian Wheezy wi...
分类:系统相关   时间:2014-06-24 14:30:25    阅读次数:303
HDU2899 Strange fuction 【二分】
Strange fuction Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 2982    Accepted Submission(s): 2202 Problem Description Now, here ...
分类:其他好文   时间:2014-06-22 17:53:42    阅读次数:221
poj 2891 Strange Way to Express Integers (非互质的中国剩余定理)
Strange Way to Express IntegersTime Limit:1000MSMemory Limit:131072KTotal Submissions:9472Accepted:2873DescriptionElina is reading a book written by R...
分类:其他好文   时间:2014-06-15 21:22:33    阅读次数:272
poj 2891 Strange Way to Express Integers (扩展gcd)
题目链接题意:给k对数,每对ai, ri。求一个最小的m值,令m%ai = ri;分析:由于ai并不是两两互质的, 所以不能用中国剩余定理。只能两个两个的求。a1*x+r1=m=a2*y+r2联立得:a1*x-a2*y=r2-r1;设r=r2-r2;互质的模线性方程组m=r[i](mod a[i])...
分类:其他好文   时间:2014-06-11 07:25:30    阅读次数:203
HDU - 4813 Hard Code (长春赛区水题)
Description Some strange code is sent to Da Shan High School. It's said to be the prophet's note. The note is extremely hard to understand. However, Professor Meng is so smart that he successfully ...
分类:其他好文   时间:2014-06-01 09:18:38    阅读次数:246
510条   上一页 1 ... 48 49 50 51 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!