码迷,mamicode.com
首页 >  
搜索关键字:using 127.0.0.1 for servername    ( 53996个结果
UVA 10981 - String Morphing(记忆化搜索)
题目链接:10981 - String Morphing 题意:给定开始的字符串,要求根据表格变化成一个字符串,问变化的顺序(注意,不一定要最少步数) 思路:记忆化搜索,用map来存字符串的状态,一开始按最少步数去做TLE,其实只要找到一个符合的就可以了 代码: #include #include #include #include #include using namespac...
分类:其他好文   时间:2014-07-22 23:03:54    阅读次数:293
A*算法的寻路中的应用——无阻挡
按照之前转载的文章,自己先实现了下,表示还是很多坑: #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
POJ - 2926 Requirements
题意:多维的曼哈顿最远距离 思路:做了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
cocos2d-x3.0 ScrollView
.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
c++调用基类的构造函数(模板类)
代码如下 #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
UVA 278 - Chess(数论)
题目链接:278 - Chess 题意:求出四种棋子最多放几个 思路:车能放行列的较小值,王隔着放,皇后根据八皇后问题可知,也是放行列最小值。 关键在于马,之前做过一题类似的,马分一行,两行,和两行以上考虑,一行就能全放,两行就隔一个田字格放,三行以上就每个马隔一个位置放。 代码: #include #include #include using namespace std; i...
分类:其他好文   时间:2014-04-29 13:45:20    阅读次数:381
ZOJ 2588 Burning Bridges 求无向图桥 边双连通裸题
题目链接: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
Timus 1601. AntiCAPS 修正大写句子
The blonde Angela has a new whim: internet chats. Of course, as any blonde, she writes her messages using the upper case. You are the moderator of Angela's favorite chat and you're fed up with her upp...
分类:其他好文   时间:2014-04-29 13:17:21    阅读次数:293
Linq To Entity 多表联合查询
using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace LinqToEntity { class Program { static void Main(string[] args) { //...
分类:其他好文   时间:2014-04-29 13:16:21    阅读次数:574
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!