![](https://img-blog.csdnimg.cn/20201014180756927.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
Data Stucture
文章平均质量分 59
汪少升
这个作者很懒,什么都没留下…
展开
-
pat Data_stucture 表达式转换-栈的应用
#include#includeusing namespace std;bool p[5][5]={ 1,1,0,0,1, 1,1,0,0,1, 1,1,1,1,1, 1,1,1,1,1, 0,0,0,0,1};int con(char ch){ switch(ch) { case'+': return 0; case'-': return 1; cas原创 2014-05-08 18:10:49 · 408 阅读 · 0 评论 -
pat Data_Structure 前缀表达式的计算--堆栈法
well,联合的标记问题。。。。怎么弄?#include#includeusing namespace std;struct element{ char op; double nu;};int main(){ stack st; char s[61]; gets(s); double tmp; for(int i=0;s[i]!='\0';++i)原创 2014-05-09 19:25:00 · 589 阅读 · 0 评论 -
并查集的基本操作
#includetypedef int T;T const &Find(T const &element,T *father){ if(father[element]<0) { return element; } else { return father[element]=Find(father[element],father); }}T const &Union(原创 2014-05-12 15:28:02 · 443 阅读 · 0 评论 -
windows 消息队列
#include#include#includeusing namespace std;struct Message{ string msg; int priority;};struct Cmp{ bool operator()(Message const &msg_a,Message const &msg_b) { return msg_a.priority>msg原创 2014-05-12 15:56:15 · 608 阅读 · 0 评论 -
pat Data structure --4-05家谱处理 数据结构实验项目
without tree,we can still solve this problem.the key point is how to原创 2014-05-14 14:28:16 · 1695 阅读 · 0 评论 -
pat4-06 Data_sturcture 搜索树判断
#includeusing namespace std;struct Node{ int data; Node *left,*right;};bool LessTree(int *a,int start,int end,Node *&tree){ if(start==end) { tree=new Node; tree->data=a[start]; tree-原创 2014-05-20 21:19:16 · 680 阅读 · 0 评论 -
PAT 1004 Counting Leaves
A family hierarchy is usually presented by a pedigree tree. Your job is to count those family members who have no child.InputEach input file contains one test case. Each case starts with a line原创 2014-08-23 18:04:47 · 327 阅读 · 0 评论 -
PAT 1026 Table tennis
使用了3个优先队列和两个普通队列。原创 2016-08-20 12:14:06 · 334 阅读 · 0 评论