码迷,mamicode.com
首页 >  
搜索关键字:std    ( 41627个结果
hdu 1016 Prime Ring Problem (素数环)
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=1016题目大意:输入一个n,环从一开始到n,相邻两个数相加为素数。代码如下:#include #include #include using namespace std;int visit[22],q[1...
分类:其他好文   时间:2014-07-11 20:21:56    阅读次数:255
HDU 3791 二叉搜索树 题解
Problem Description推断两序列是否为同一二叉搜索树序列Input開始一个数n,(1#include #include using std::string;using std::cin;const int SIZE = (1>root; for (int i = 0; i >chi....
分类:其他好文   时间:2014-07-11 18:44:26    阅读次数:205
hdu 1253 胜利大逃亡(简单题)
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=1253题目大意:在所给的时间能顺利离开城堡。题目代码:#include #include #include #include using namespace std; int map[55][55...
分类:其他好文   时间:2014-07-11 18:19:06    阅读次数:246
HDU4847
一道简单的用getline带空格带回车的字符串输入处理问题还是WA了一次 orz。。。。#include#include#includeusing namespace std;int main(){ int i,j,len; string str; int count=0; while(getlin...
分类:其他好文   时间:2014-07-11 09:58:25    阅读次数:214
HDU4849
一道简单的dijkstra 写了好久。。。了个大去 果然代码太弱了#include#include#include#define INF 0x3f3f3f3f#define MAXM 1009using namespace std;long long x[MAXM*MAXM],y[MAXM*MAXM...
分类:其他好文   时间:2014-07-11 09:49:22    阅读次数:196
20140709
话说今天这个1个同学2002的题目真的有可总结性吗。今天的结论是我的暴力又进化了,现在可以长达5KB,一节更比六节强。明天再来听评讲。#include#include#include#includeusing namespace std;struct edge{ long long to,d; ed...
分类:其他好文   时间:2014-07-11 09:46:51    阅读次数:153
找割顶的模板
用邻接矩阵写的。自己慢慢理解吧#include #include using namespace std;#define CC(c) memset(c, 0, sizeof(c))const int maxn=5000;int iscut[maxn], g[maxn][maxn], low[maxn...
分类:其他好文   时间:2014-07-11 08:45:04    阅读次数:206
C++中的结构的使用
#include using std::cout; using std::endl; //定义结构 struct Box{ double length; double width; double height; }; double volume(const Box& aBox); int main(){ Box box={70.0,60.0,40.0}; d...
分类:编程语言   时间:2014-07-11 08:37:11    阅读次数:189
C++模板实现单向链表
模板实现头文件:#ifndef SUN_LINKLIST_H#define SUN_LINKLIST_H#include using namespace std ;//#include "List.h"// T : operator= , operator!= , operator== , cop....
分类:编程语言   时间:2014-07-10 16:23:14    阅读次数:220
XTU1199:Number Game
题目描写叙述给你一个有N个数的集合S和一个数X,推断是否存在S的一个子集,子集里的数的最小公倍数正好是X。输入第一行是数据组数T。 接下来有多组数据,每组数据包括两行: 第一行有2个数N和X,1#include #include using namespace std;#define ll __in...
分类:其他好文   时间:2014-07-10 15:29:01    阅读次数:176
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!