码迷,mamicode.com
首页 >  
搜索关键字:extended lights out    ( 36586个结果
hdu4770:Lights Against Dudely(回溯 + 减枝)
题目:hdu4770:Lights Against Dudely 题目大意:同样是n*m的矩阵代表room,房间同样也有脆弱和坚固之分,现在要求要保护脆弱的房间,需要将每个脆弱的房间都照亮,但是坚固的房间不允许照到灯。灯是成L形的,即在x,y上有一盏灯,那么(x - 1, y)和(x, y + 1)就可以被照亮,当然包括(x,y)。题目又提供了一盏特殊的灯,它可以该改变方向,但是只有一盏...
分类:其他好文   时间:2014-07-08 20:13:43    阅读次数:215
java输出矩阵
输出如下矩阵: 0000 0111 0122 0123 public static void main(String[] args){ for(int i=0;i<4;i++){ for(int j=0;j=j?j:i); } System.out.println(); } }...
分类:编程语言   时间:2014-07-08 19:15:05    阅读次数:733
Mqtt协议IOS端移植3
ServerMqFramework.h #import "MqttFramework.h" @interface ServerMqFramework : MqttFramework /** * @brief 得到模块控制器的句柄单例 * * @param [in] N/A * @param [out] N/A * @return void * @note */ +(S...
分类:移动开发   时间:2014-07-08 18:29:44    阅读次数:272
HDU 4770 Lights Against Dudely(暴力)
HDU 4770 Lights Against Dudely 题目链接 题意:给定灯,有一盏灯可以旋转,问最少几个灯可以照亮.的位置,并且不能照到# 思路:暴力求解,先枚举特殊的灯,再枚举正常的灯,要加剪枝,不然会TLE 代码: #include #include #include using namespace std; const int INF = 0x...
分类:其他好文   时间:2014-07-08 18:23:55    阅读次数:196
POJ-1324-Holedox Moving(BFS)
Description During winter, the most hungry and severe time, Holedox sleeps in its lair. When spring comes, Holedox wakes up, moves to the exit of its lair, comes out, and begins its new life.  Hol...
分类:其他好文   时间:2014-07-08 17:28:54    阅读次数:256
POJ-2892-Tunnel Warfare(线段树)
Description During the War of Resistance Against Japan, tunnel warfare was carried out extensively in the vast areas of north China Plain. Generally speaking, villages connected by tunnels lay in a...
分类:其他好文   时间:2014-07-08 16:51:42    阅读次数:506
hdu 4770 Lights Against Dudely(回溯)
题目链接:hdu 4770 Lights Against Dudely 题目大意:在一个N*M的银行里,有N*M个房间,‘#’代表坚固的房间,‘.‘代表的是脆弱的房间,脆弱的房间个数不会超过15个,现在为了确保安全,要在若干个脆弱的房间上装灯,普通的灯是照亮{0, 0}, {-1, 0}, {0, 1}(和题目中坐标有点出入),然后可以装一个特殊的,可以照射 { {0, 0}, {0,...
分类:其他好文   时间:2014-07-08 13:34:07    阅读次数:152
Understanding Safari Reader
Interesting enough to find out the Reader function in Safari is actually Javascript and there are many interesting stuff from the 2000 line code: * 5 main parts in the file: * 1. define const * 2...
分类:其他好文   时间:2014-07-08 13:11:46    阅读次数:469
Java——网络编程
?? // TODO Auto-generated method stub //获取本地主机IP对象 InetAddress ip = InetAddress.getLocalHost(); System.out.println(ip.getHostAddress()); System.out.println(ip.getHostName()); //获取其他主...
分类:编程语言   时间:2014-07-08 12:58:09    阅读次数:278
c#值类型,引用练习,ref,out
usingSystem; usingSystem.Collections.Generic; usingSystem.Linq; usingSystem.Text; usingSystem.Threading.Tasks; namespaceConsoleApplication1 { classProgram { staticvoidMain(string[]args) { inti=10;//值类型 intj=10;//必须初始化 intk;//不需要初始化 int[]iarr={..
分类:其他好文   时间:2014-07-08 09:42:06    阅读次数:221
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!