码迷,mamicode.com
首页 >  
搜索关键字:using password: yes    ( 53562个结果
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
从为什么要将基类的析构函数定义为虚函数谈起~~
首先,做一个最简单的实验,在电脑上运行下面的代码,将会产生运行错误,这或许会使你百思不得其解: #include using namespace std; class Base { private: int a; public: ~Base(){cout << "Base dtor..." << endl;} }; class Derived : public Base {...
分类:其他好文   时间:2014-04-29 13:48:21    阅读次数:357
uva 11988 这题可以看出c++中string效率的底下
用c语言实现 #include #include #include using namespace std; typedef struct node { char x; struct node *next; }chan; chan *root = new chan; char a[100010]; int main() { while(scanf("%...
分类:编程语言   时间:2014-04-29 13:47:20    阅读次数:358
大整数的加减乘除
多项式的加减乘除可以利用多项式的加减乘除进行运算,所以以下程序采用了多项式的加减乘除。多项式运算已经在《算法导论》第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
const map 成员变量初始化例子
Author:DriverMonkey Mail:bookworepeng@Hotmail.com Phone:13410905075 QQ:196568501 #include #include #include #include #include #include using namespace std; class a_t { publi...
分类:其他好文   时间:2014-04-29 13:35:21    阅读次数:598
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
迷上了代码!