树上背包,说实话写起来很难受。看到别人写的代码时间都那么短,实在是自愧不如。#include
#include using namespace std;#define MAXV (3000)#define MAXE (MAXV - 1)int
Vefw[MAXE], Ve...
分类:
其他好文 时间:
2014-05-12 09:02:54
阅读次数:
178
转自
http://blog.csdn.net/ve_love/article/details/19685399
分类:
数据库 时间:
2014-05-10 08:04:50
阅读次数:
266
如果你想要一个可以盛放各种类型的对象,那么基本上可以说在C++里没有,或者你可以用vector或者其他的什么来模拟,我说那都不怎么好。问题就在于我的类型会在运行时动态的增加,你不可能知道我会增加什么类型,我的头文件也不会给你。
现在是不是觉得C++的泛型用不上了,是的,C++的泛型本质上是对相似代码的复用,做的事情都是同一件事情,但仅仅是处理类型的差别。这种情况用的还是比较少的,比如ve...
分类:
编程语言 时间:
2014-05-10 02:15:34
阅读次数:
361
IntroductionThis article is part of the ongoing
series I’ve been writing recently, but can be read as a standalone article. I’m
going to do a better j...
分类:
其他好文 时间:
2014-05-08 13:01:13
阅读次数:
599
参考算法导论第三版中译本,DFS的Pseudocode如下: 1 DFS(G) 2 for
each vertex u ∈ G.V 3 u.color = WHITE 4 u.π = NIL 5 time = 0 6 for each ve...
分类:
其他好文 时间:
2014-05-08 06:44:52
阅读次数:
380
Restoring Purchased ProductsUsers restore
transactions to maintain access to content they’ve already purchased. For
example, when they upgrade to a ne...
分类:
移动开发 时间:
2014-05-07 17:06:59
阅读次数:
869
I’ve worked with a lot of programmers over the
years — some of them super amazing, and some distinctly lackluster. As I’ve had
the pleasure of working...
分类:
其他好文 时间:
2014-05-07 00:33:56
阅读次数:
586
Cutting Recipes
The chef has a recipe he wishes to use for his guests,
but the recipe will make far more food than he can serve to the guests.
The chef therefore would like to make a reduced ve...
分类:
其他好文 时间:
2014-05-04 17:54:01
阅读次数:
387
Zxing图片识别 从相册选取二维码图片进行解析总结
在Zxing扫描识别和图片识别的解析对象是相同的
本文分三个步骤:
1 获取相册的照片
2 解析二维码图片
3 返回结果
1) 获取相册照片
google对4.4的uri做了点改动 为了适配多种手机 需要做一个判断版本
在Activity中开启相册:
Intent innerIntent = new Intent(); // "android.intent.action.GET_CONTENT"
if (Build.VE...
分类:
其他好文 时间:
2014-05-03 17:36:19
阅读次数:
389
开发环境:操作系统: (uname -a output)Linux ubuntu
3.8.0-19-generic #29-Ubuntu SMP Wed Apr 17 18:16:28 UTC 2013 x86_64 x86_64
x86_64 GNU/LinuxJDK 版本 : (java -ve...
分类:
编程语言 时间:
2014-05-01 20:46:54
阅读次数:
565