摘要: #define _CRT_SECURE_NO_DEPRECATE /*取消scanf,printf不安全之类的错误提示*//* fopen example */#include #include int main(){ FILE * pFile, *pFile2; char buf[101]; c... 阅读全文
posted @ 2014-12-13 19:15 Mr.Ethan 阅读(284) 评论(0) 推荐(0) 编辑
摘要: #define _CRT_SECURE_NO_WARNINGS#include #include int main(){ char head[15]; char message[150]; char tail[15]; int i = 0; for (;;) { gets(head); if (... 阅读全文
posted @ 2014-12-13 09:29 Mr.Ethan 阅读(129) 评论(0) 推荐(0) 编辑
摘要: 1 #include 2 using namespace std; 3 4 class Time 5 { 6 private: 7 int hour; 8 int minute; 9 int second;10 public:11 //Time() //无参够创... 阅读全文
posted @ 2014-12-10 15:29 Mr.Ethan 阅读(168) 评论(0) 推荐(0) 编辑
摘要: 快速排序思想:通过一趟排序将待排序记录分割成独立的两部分(取出一个分割点),分割点左边的记录均<分割点,分割点右边的记录均>分割点;再分别对左边和右边的记录进行排序;一趟快速排序的具体做法:1.附设两个直针low和high,他们的初值分别为low和high,设枢轴记录的关键字为pivot,2.则首先... 阅读全文
posted @ 2014-12-09 21:49 Mr.Ethan 阅读(179) 评论(0) 推荐(0) 编辑
摘要: #define _CRT_SECURE_NO_WARNINGS#include typedef float ElementType;void Select_Sort(ElementType n[], int num);void Swap(ElementType *a, ElementType *b)... 阅读全文
posted @ 2014-12-08 22:22 Mr.Ethan 阅读(242) 评论(0) 推荐(0) 编辑
摘要: #define _CRT_SECURE_NO_WARNINGS#include int Is_SXH(int num);int main(){ int in1, in2; int temp = 0; int flag = 0; while (scanf("%d %d", &in1, &in2) !=... 阅读全文
posted @ 2014-12-07 21:49 Mr.Ethan 阅读(140) 评论(0) 推荐(0) 编辑
摘要: 纸上谈兵: 树, 二叉树, 二叉搜索树作者:Vamei 出处:http://www.cnblogs.com/vamei 欢迎转载,也请保留这段声明。谢谢!树的特征和定义树(Tree)是元素的集合。我们先以比较直观的方式介绍树。下面的数据结构是一个树:树有多个节点(node),用以储存元素。某些节点之... 阅读全文
posted @ 2014-12-07 20:29 Mr.Ethan 阅读(138) 评论(0) 推荐(0) 编辑
摘要: /*杭电ACM ID:2007*/#define _CRT_SECURE_NO_WARNINGS#include int main(){ int in1, in2, out1, out2; int temp = 0, min, max; while (scanf("%d %d", &in1, &in... 阅读全文
posted @ 2014-12-07 16:40 Mr.Ethan 阅读(217) 评论(0) 推荐(0) 编辑
摘要: /* MyArryLinkstack.h */#ifndef _MYARRYLINKSTACK_H_#define _MYARRYLINKSTACK_H_#include #define ElementType int#define EmptyTOS (-1)#define MinStackSize... 阅读全文
posted @ 2014-12-07 16:39 Mr.Ethan 阅读(138) 评论(0) 推荐(0) 编辑
摘要: #define _CRT_SECURE_NO_DEPRECATE /*取消scanf,printf不安全之类的错误提示*/#include #include typedef struct node{ int value; struct node* next;}listnode;listnode* ... 阅读全文
posted @ 2014-12-07 16:34 Mr.Ethan 阅读(162) 评论(0) 推荐(0) 编辑