码迷,mamicode.com
首页 >  
搜索关键字:tunnel warfare    ( 415个结果
hdu 1540 Tunnel Warfare(线段树)
题目链接:hdu 1540 Tunnel Warfare 题目大意:有连续的N个城镇,三种操作: D x:第x城镇被破坏Q x:插叙第x城镇所在联通块有多少个城镇没有被破坏R:修复最后一个被破坏的城镇 解题思路:线段树区间合并,每个城镇看成一个叶子节点,用一个vector记录破坏顺序。对于查询来说,每次只要判断是否在mid?R[lson(u)],mid+L[rson(u)]之间即...
分类:其他好文   时间:2014-10-03 13:05:44    阅读次数:256
hdu1540-Tunnel Warfare (线段树区间合并)
题意:n个村庄,有三种操作,D x 破坏位置为x的村庄,R 修复上一次被破坏的村庄,Q x 输出含有x村庄的连续村庄的最大个数。线段树搞之,区间合并。ls[maxn]为当前节点左面的连续区间,rs[maxn]为当前节点左面的连续区间,ms[maxn]当前节点的最大连续区间。 1 #include ....
分类:其他好文   时间:2014-09-26 03:07:38    阅读次数:181
UVA 6662 The Last Ant(模拟退火)
A straight tunnel without branches is crowded with busy ants coming and going. Some ants walk left to right and others right to left. All ants walk at a constant speed of 1 cm/s. When two ants meet, ...
分类:其他好文   时间:2014-09-26 02:19:18    阅读次数:188
ssh端口转发
ssh端口转发2013-04-12 14:44:45|分类:rhel_ssh|举报|字号订阅ssh的三个强大的端口转发命令:ssh -C -f -N -g-Llisten_port:DST_Host:DST_portuser@Tunnel_Hostssh -C -f -N -g-Rlisten_po...
分类:其他好文   时间:2014-09-09 17:31:29    阅读次数:403
UVA 1416 - Warfare And Logistics(最短路树)
UVA 1416 - Warfare And Logistics 题目链接 题意:给定一个无向图,每个边一个正权,c等于两两点最短路长度之和,现在要求删除一边之后,新图的c值最大的是多少 思路:直接枚举删边,每次做一次dijkstra的话复杂度太高,其实如果建好最短路树,如果删去的边在最短路树上,才需要去做,这样复杂度就优化到(n^2mlog(n)),勉强可以接受 代码: ...
分类:其他好文   时间:2014-09-02 17:48:45    阅读次数:263
POJ2892Tunnel Warfare
写完之后各种调试各种TLE,第二天早上整理了下思路,重写了一遍,立马AC了;具体见注释 #include #include #include #include #include #include #include #include #include #include #include #include #include using namespace std; #def...
分类:其他好文   时间:2014-09-02 12:24:44    阅读次数:147
利用webshell搭建socks代理[乌云]
https://github.com/sensepost/reGeorg使用示例:pythonreGeorgSocksProxy.py-p8080-uhttp://upload.sensepost.net:8080/tunnel/tunnel.jspStep1.上传一个脚本(aspx|ashx|jsp|php)到web服务器上。Step2.执行reGeorgSocksProxy.py脚本,连接shell监听端口。**如果你使用nmap等工..
分类:Web程序   时间:2014-08-31 10:40:11    阅读次数:564
415条   上一页 1 ... 37 38 39 40 41 42 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!