很简单的bellmanford题目,这里比较详细:http://blog.csdn.net/lyy289065406/article/details/6645790
直接代码
#include
#include
#include
#include
#include
#include
using namespace std;
const int SIZE=11111;
const i...
分类:
其他好文 时间:
2014-06-03 04:10:45
阅读次数:
182
贴模板~KM算法引进了顶标函数,不断缩小这个顶标来让相等子图的可能范围扩大#include#include//KM 复杂度O^3 using namespace
std;const int N=200;int lx[N],ly[N];//顶标函数int w[N][N];//图bool vix[N],...
分类:
其他好文 时间:
2014-06-02 21:53:12
阅读次数:
334
针对2.x1、CCSprite无法直接用文件名更换图片,可以添加如下函数bool
CCSprite::setWithFile(const char *pszFilename){ CCAssert(pszFilename != NULL,
"Invalid filename for sprite")....
分类:
其他好文 时间:
2014-06-02 20:41:58
阅读次数:
325
题意:给你坐标和n个点,求最少移动的点使得n个点成等差数列
思路:既然要成等差数列,那么最起码有两个点是不动的,然后枚举这两个点中间的点的个数,最近水的要死,看了队友的代码做的
#include
#include
#include
#include
#include
#include
using namespace std;
const double eps = 1e-9;
con...
分类:
其他好文 时间:
2014-06-01 10:53:02
阅读次数:
193
不断找增广路,直到没有增广路,每找到一条增广路匹配数就加1 //hungary const
int X=100,Y=100;int match[Y];// initial to -1bool vis[Y];int g[X][Y];bool
dfs(int x){ for(int y=1;y<=Y;y...
分类:
其他好文 时间:
2014-05-31 20:49:41
阅读次数:
247
【问题描述】一块N x N(1 2 #include 3 #include 4
#include 5 #include 6 #include 7 const int maxn=15; 8 const int INF=0x7fffffff;
9 using namespace...
分类:
其他好文 时间:
2014-05-31 19:38:46
阅读次数:
343
看完EffectiveC++的关于转型的章节,顿时认为周围的代码都处在悬崖边上~~C的旧式转型:inta = 10; double b =
(double)a;对于C++的四种转型函数,const_cast去掉对象的常量性(仅仅此一个操作符有此功能!)dynamic_cast一般用于继承体系中某对象...
分类:
编程语言 时间:
2014-05-31 19:20:35
阅读次数:
288
函数原型:string& replace (size_t pos, size_t len,
const string& str);具体请查阅C++开发文档。只贴示例代码。示例代码:// replacing in a string#include
#include int ...
分类:
其他好文 时间:
2014-05-31 18:35:32
阅读次数:
202
Sprintf函数声明:int sprintf(char *buffer, const char
*format [, argument1, argument2, …])用途:将一段数据写入以地址buffer开始的字符串缓冲区所属库文件:
参数:(1)buffer,将要写入数据的起始地址;(2)fo...
分类:
编程语言 时间:
2014-05-31 18:30:24
阅读次数:
255
有根树同构。参考论文《hash在。。。。》 1 #include 2 #include 3
#include 4 #include 5 #include 6 #include 7 8 using namespace std; 9 10 const
int leaf_hash=2099;...
分类:
其他好文 时间:
2014-05-31 18:21:24
阅读次数:
187