题意就是给出一个f值,然后假如两个点u,v间的所有路径上的最大边中的最小值大于f,那么这个点对是合法的,对于每个询问f,输出有多少个合法点对。最大边最小就是最小瓶颈路,即最小生成树上的路径。一个简单的想法就是求出最小生成树后,n次dfs求出任意两点间的最大边,然后对于每个询问再查找一遍,可是时间复杂...
分类:
其他好文 时间:
2014-07-16 20:59:37
阅读次数:
206
Background Task 的运行时间在iOS 6及以前有大约10分钟左右,在iOS 7中有180秒。Reference:1. Multitasking in iOS 7http://www.slideshare.net/mremond/multitasking-in-ios-72. Backg...
分类:
移动开发 时间:
2014-07-16 20:50:14
阅读次数:
190
转载自 居家懒人http://www.cnblogs.com/JD85/archive/2012/09/17/2688128.html加入写了新场景SecondScene,结果在cpp文件里类名地方报错说undefined reference to `vtable for SecondScene',...
分类:
移动开发 时间:
2014-07-16 20:30:58
阅读次数:
205
JS部分/*删除当前的索引行,从后往前删*/ function removeModel(count) { var o = confirm("确认删除?"); if (o) { var i ...
分类:
Web程序 时间:
2014-07-13 11:53:40
阅读次数:
275
相关控件初始化方法:showSmscPref private voidshowSmscPref() { int count = MSimTelephonyManager.getDefault().getPhoneCount(); boolean airplaneModeOn = Settings.S...
分类:
移动开发 时间:
2014-07-13 10:58:45
阅读次数:
311
select a.TABLE_NAME as "TableName", case when (select count(*) from user_views v where v.VIEW_NAME =a.TABLE_NAME )>0 then 'V' else 'U'end as "TableTyp...
分类:
数据库 时间:
2014-07-13 00:44:11
阅读次数:
308
c++ 联邦语言:
typedef {
unit C;
unit Object-Oriented C++;
unit Template C++;
unit STL;
};
notice: C++高效编程取决于你使用C++的哪一个部分。
eg:pass-by-reference and pass-by-value.
c:内置类型value kill reference...
分类:
编程语言 时间:
2014-07-13 00:14:37
阅读次数:
282
#pragma once
#include
#include
#include
#include
#include
class CountDownLatch : boost::noncopyable
{
public:
explicit CountDownLatch(int count);
void wait();
void countDown();
int getCo...
Distinct SubsequencesGiven a stringSand a stringT, count the number of distinct subsequences ofTinS.A subsequence of a string is a new string which is...
分类:
其他好文 时间:
2014-07-12 13:37:37
阅读次数:
141