按照之前转载的文章,自己先实现了下,表示还是很多坑:
#include "stdio.h"
#include
#include
#include
#include
using namespace std;
int neigor[][2] ={
{-1, -1}, {0, -1}, {1, -1}, {1, 0}, {1, 1}, {0, 1}, {-1, 1}, {-1, 0}
}...
分类:
其他好文 时间:
2014-05-01 18:03:27
阅读次数:
320
题意:多维的曼哈顿最远距离
思路:做了1,2,3维的,其实就是枚举所有绝对值的可能的表达式
#include
#include
#include
#include
using namespace std;
const int MAXN = 100005;
const int M = 5;
const double inf = 1e200;
struct node{
double x...
分类:
其他好文 时间:
2014-05-01 17:31:01
阅读次数:
283
题目:寻找最长上升自序列。
代码:
#include
#include
#include
#include
using namespace std;
struct node
{
int w,s; //重量,速度
int num; //编号
int t; //用来记录当前编号...
分类:
其他好文 时间:
2014-05-01 17:17:32
阅读次数:
285
最近在进行两个项目开发时,需要使用WebService进行通信,在一个项目中使用axis2实现了,但在别一个项目中调用时,却发生异常,错误信息:namespace mismatch require http://webservice.transcoding.module.iefree.com found http://ws.apache.org/axis2/xsd产生错误的代码: public s...
分类:
其他好文 时间:
2014-04-30 22:33:39
阅读次数:
266
.h
#include "cocos2d.h"
#include "cocos-ext.h"
#include "ui/CocosGUI.h"
#include "cocostudio/CocoStudio.h"
USING_NS_CC;
USING_NS_CC_EXT;
using namespace ui;
.cpp
layout = Layout::crea...
分类:
其他好文 时间:
2014-04-30 22:33:39
阅读次数:
382
代码如下
#include
#include
#include
using namespace std;
template
class Base
{
public:
Base(T name);
virtual void toString();
protected:
T id;
};
template
Base::Base(T n)
{
printf("B...
分类:
编程语言 时间:
2014-04-30 22:27:39
阅读次数:
450
多项式的加减乘除可以利用多项式的加减乘除进行运算,所以以下程序采用了多项式的加减乘除。多项式运算已经在《算法导论》第30章有简要的介绍,具体的请参考数学书。
大整数加法:(利用书上公式轻松得出)
//多项式加法-大数加法
#include
#include
using namespace std;
#define m1 4
#define m2 5
//a[0]=x^0 a[1]=x^1....
分类:
其他好文 时间:
2014-04-29 13:46:21
阅读次数:
326
题目链接:278 - Chess
题意:求出四种棋子最多放几个
思路:车能放行列的较小值,王隔着放,皇后根据八皇后问题可知,也是放行列最小值。
关键在于马,之前做过一题类似的,马分一行,两行,和两行以上考虑,一行就能全放,两行就隔一个田字格放,三行以上就每个马隔一个位置放。
代码:
#include
#include
#include
using namespace std;
i...
分类:
其他好文 时间:
2014-04-29 13:45:20
阅读次数:
381
从今天开始,我们来学习JavaEE中一个非常重要的规范:Ejb。既然您已经找到了这篇文章,就说明您就已经对Ejb有个大体上的概念了,之前没看过也没关系,正好通过咱们的共同学习,一起来了解它学习它。
首先,我们来看一些Ejb的总括图:
我们在展开学习之前,我们要弄明白:什么是Ejb?
Ejb也就是Enterprise JavaBeans,它是Java...
分类:
其他好文 时间:
2014-04-29 13:27:21
阅读次数:
405
题目链接:http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemId=1588
#include
#include
#include
#include
#include
using namespace std;
#define N 10050
#define M 200005
int n,m;//n个点 m条边
struct Edge{...
分类:
其他好文 时间:
2014-04-29 13:25:21
阅读次数:
383