码迷,mamicode.com
首页 >  
搜索关键字:rescue the princess    ( 698个结果
HDU 1028 Ignatius and the Princess III 母函数
其实这题是水题,DP随便搞一下就能求,但是第一次写母函数,所以找了道水题做好理解些~_~#include #include #include #include #include #include #include #include #include #include #include #includ...
分类:其他好文   时间:2014-08-07 12:31:29    阅读次数:175
rails resce_from设置错误页面
1、设置ActiveRecord find方法没找到不报错,调用一个显示404页面的方法 class?ApplicationController?<?ActionController::Base ??rescue_from?ActiveRecord::RecordNotFound,?:with?=>?:record_not_f...
分类:其他好文   时间:2014-08-06 19:37:02    阅读次数:262
hdu 1028
Ignatius and the Princess III Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 12639    Accepted Submission(s): 8929 Problem Descriptio...
分类:其他好文   时间:2014-08-04 17:53:07    阅读次数:288
HDOJ--4781--Assignment For Princess【构造有向图】
链接:http://acm.hdu.edu.cn/showproblem.php?pid=4781 题意:给你两个数,n代表顶点个数,m代表边数,要你建一个图,要求: 1. 有向图,且两个点之间最多只有一条边。 2. 边的权值大小为1~m,每个值只能用一次。 3. 任意一个点都可以到达其余各个顶点。 4. 任意一个环的边上权值之和是3的倍数。 5. 不存在自身环。 思路:先从...
分类:其他好文   时间:2014-08-04 17:45:57    阅读次数:254
HDU 1242 Rescue(优先队列+bfs)
题目地址:HDU 1242 这个题相比于普通的bfs有个特殊的地方,经过士兵时会额外消耗时间,也就是说此时最先搜到的时候不一定是用时最短的了。需要全部搜一遍才可以。这时候优先队列的好处就显现出来了。利用优先队列,可以让队列中的元素按时间排序,让先出来的总是时间短的,这样的话,最先搜到的一定是时间短的,就不用全部搜一遍了。PS:我是为了学优先队列做的这题。。不是为了这题而现学的优先队列。。 代码...
分类:其他好文   时间:2014-08-02 20:59:44    阅读次数:245
linux centos 6.0 救援模式
linuxcentos6.0救援模式昨天机器我强制把它关机了,今早上班发现系统起不来了。是因为我昨晚没好好对她吗?废话少说了就好好补她吧!1.开机引导系统报错:直接CONtrol-D继续重启还是很坏!2.连单用户都进不了,插入第一张光盘赶紧起用linuxrescue模式接在就开始修复fsck急救!f..
分类:系统相关   时间:2014-08-01 20:09:42    阅读次数:345
cf 148D Bag of mice
The dragon 选一只老鼠,然后会跑掉一只the princess选一只老鼠,不会跑出另外的老鼠求the princess赢的概率 1 #include 2 #include 3 #include 4 #include 5 #include 6 #include 7 #include 8 #i...
分类:其他好文   时间:2014-07-31 23:38:40    阅读次数:213
HDU 1242——Rescue(优先队列)
天使找她的小伙伴...
分类:其他好文   时间:2014-07-30 17:45:04    阅读次数:176
HDU 1026 Ignatius and the Princess I (基本算法-BFS)
HDU 1026 Ignatius and the Princess I (基本算法-BFS) 题目大意: 给定1张图,走到“.”需要1步,走到数字除了需要1步,还要停留数字上那么多步,“#”不能走,问你从左上角到右下至少走多少步,并输出路径 解题思路: 简单的BFS,再加上记录前1步可以从终点往前来获得路径。...
分类:其他好文   时间:2014-07-29 22:01:23    阅读次数:368
杭电 1029 Ignatius and the Princess IV
http://acm.hdu.edu.cn/showproblem.php?pid=1029 Ignatius and the Princess IV Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32767 K (Java/Others) Total Submission(s): 16754    Accepte...
分类:其他好文   时间:2014-07-29 21:58:22    阅读次数:352
698条   上一页 1 ... 63 64 65 66 67 ... 70 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!