题目:hdoj 2874 Connections between cities
题意:战争过后,一些城市毁坏了。意思图不连通,让你求任意两点的距离、
分析:很明显求LCA
但是图不连通,所以我们Tarjan的时候要对每个点进行。然后标记即可。
另外,这个题目卡vector,看来以后要学着用数组模拟邻接表了。
AC代码:
#include
#include
#...
分类:
其他好文 时间:
2014-11-06 17:30:51
阅读次数:
189
At the top is the Connection and Session Management which creates and manages sessions and connections for the database clients such as SAP BusinessOb...
分类:
其他好文 时间:
2014-11-06 17:18:09
阅读次数:
272
android防被杀现在的清理软件如360都有一键清理的功能,他会后台运行的程序一个个kill掉。程序死掉后也不会走正常的生命周期,比如调用ondestory方法。怎么才能让程序一直运行在后台,不被360杀掉呢?在测试了几种方法后,终于找到一种方法。android有个同步工具Sync Adapter...
分类:
移动开发 时间:
2014-11-05 22:52:23
阅读次数:
241
repo init -u https://android.googlesource.com/platform/manifest -b android-5.0.0_r2
repo sync -j16
或者
repo init -u https://android.googlesource.com/platform/manifest -b lollipop-release
repo s...
分类:
移动开发 时间:
2014-11-04 11:02:50
阅读次数:
156
Atitit.Gui控件and面板----web server区----- web服务器监控面板and控制台条目
1. Resin4.0.22 1
2. 查看http连接数::Summary>>tables 1
2.1.1. Open Connections 1
2.2. TCP ports? 1
3. 查看app::confgi?>>webapps 2
3.1. Host ht...
分类:
Web程序 时间:
2014-11-03 21:03:26
阅读次数:
230
更新Cocoapod之后出现问题:
diff: /../Podfile.lock: No such file or directory
diff: Manifest.lock: No such file or directory
error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or updat...
分类:
移动开发 时间:
2014-11-03 19:31:04
阅读次数:
194
gcc从4.1.2提供了__sync_*系列的built-in函数,用于提供加减和逻辑运算的原子操作。其声明如下:// 返回运算之前的值,*ptr指向参加运算的值,value是第二个操作的值type__sync_fetch_and_add(type*ptr,typevalue,...)type__s...
分类:
其他好文 时间:
2014-11-02 19:31:16
阅读次数:
145
1、use pgbouncer可以利用pgbouncer的server_idle_timeout参数server_idle_timeout:;; Close server connection if its not been used in this time.;; Allows to clean ...
分类:
数据库 时间:
2014-11-02 12:21:09
阅读次数:
296
1、PostgreSQL 9.1 and below:SELECT pg_terminate_backend(pg_stat_activity.procpid)FROM pg_stat_activityWHERE pg_stat_activity.datname = 'TARGET_DB' AND....
分类:
数据库 时间:
2014-11-01 20:27:22
阅读次数:
298
在网络不稳定时,openfire容易出现掉包情况,原因是在客户端掉线时,openfire并不能马上知道客户端已经断线,至于要多久才能发现客户端断线,跟服务器端设置的Idle Connections 时间有关。默认为360秒。 为解决掉...
分类:
系统相关 时间:
2014-10-31 01:19:54
阅读次数:
817