随笔分类 - STl
摘要:#include #include #include #include #include using namespace std; #define MAXSIZE 100 #define OK 1 typedef int Ststus ; typedef char TElemType ; typedef struct BiThrNode { TElemType data; ...
阅读全文
摘要:#include #include #define LIST_INIT_SIZE 100 #define LISTINCREMEMT 10 #define OK 1 #define OVERFLOW -2 #define ERROR -1 typedef int ElemType; typedef int Status; typedef struct { ElemType *elem...
阅读全文
摘要:problem:http://acm.hdu.edu.cn/showproblem.php?pid=4329 题意:模拟 a. p(r)= R'/i rel(r)=(1||0) R是前n次输入有关URL的个数 R'是后n次已经输入有关URL的个数 b. 另加:输入 istringstream
阅读全文
摘要:1.定义 堆:若将此序列所存储的向量R[1..n]看做是一棵完全二叉树的存储结构,则堆实质上是满足如下性质的完全二叉树 树中任一非叶子结点的关键字均不大于(或不小于)其子结点的关键字。分为大根数(默认)和小根树(自定义cmp) 高度:堆可以被看成是一棵树,结点在堆中的高度可以被定义为从本结点到叶子结
阅读全文
摘要:#include<cstdio>#include<string>#include<vector>#include<iostream>using namespace std;const int maxn = 30;int n ;vector<int> pile[maxn];//找木块A所在的pile
阅读全文