码迷,mamicode.com
首页 >  
搜索关键字:std    ( 41627个结果
广度优先搜索求树的深度
#include#include#include#include#include#include#includeusing namespace std;class node{public: int val; node* left; node* right; node():va...
分类:其他好文   时间:2014-05-26 09:10:54    阅读次数:179
判断是否AVL平衡二叉书
#include#include#include#include#include#include#includeusing namespace std;class node{public: int val; node* left; node* right; node():va...
分类:其他好文   时间:2014-05-26 06:48:48    阅读次数:246
c++错误及解决方案随记
————string"未定义标识":添加#include using namespace std;————cout"未定义标识":添加#include
分类:编程语言   时间:2014-05-26 06:45:13    阅读次数:205
约瑟夫环 c++ 循环输入
#include#include#include#include using namespace std;template class joseph{ struct node { T data; node * next; node():next(...
分类:编程语言   时间:2014-05-26 06:44:29    阅读次数:390
hdu-1540-Tunnel Warfare-线段树
lmax[i]:i区间内,从左往右,连续的最大长度 rmax[i]:i区间内,从右往左,连续的最大长度 val[i]:i区间的长度。 #include #include #include #include #include #include using namespace std; #define INF 99999999 #define lmin 1 #define rmax n #def...
分类:其他好文   时间:2014-05-26 05:25:27    阅读次数:289
POJ3067 树状数组+逆序数
设两线段为(x1,y1) ,(x2,y2), 若使两线段相交,需使x1y2||x1>x2&&y1 2 #include 3 #include 4 #define MAXH 1005 5 using namespace std; 6 7 int n, m, k; 8 struct mem{ 9 ...
分类:其他好文   时间:2014-05-24 12:43:55    阅读次数:333
ZOJ Problem Set - 1005
注意,条件:B>=C 。应考虑B=C的情况。#includeusing namespace std;int A,B,C;void jugs(int a,int b,int C){ if(b==C) { cout=B) { a=A-(B-b...
分类:其他好文   时间:2014-05-24 09:34:19    阅读次数:288
stack2
#includeusing namespace std;template class Stack{ private: struct Node{ Object data; Node * next; Node(cons...
分类:其他好文   时间:2014-05-24 09:32:25    阅读次数:215
ProjectEuler 004题
1 #include 2 using namespace std; 3 4 int main() { 5 bool isPalindromic (int num); 6 int res = 0; 7 8 for(int i = 100; i res)11 ...
分类:其他好文   时间:2014-05-24 09:26:42    阅读次数:168
用递归方法判断两棵树是否相等
#include#include#include#include#include#include#includeusing namespace std;class node{public: int val; node* left; node* right; node():va...
分类:其他好文   时间:2014-05-24 08:57:31    阅读次数:270
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!