12 2015 档案
摘要:1 #include "stdio.h" 2 #include "malloc.h" 3 4 #define maxlen 100 5 #define infinity 65535 6 7 struct bnode 8 { 9 int data;//数据 10 bnode *lchild,*rchi
阅读全文
摘要:1 #include"stdio.h" 2 #include"stdlib.h" 3 #include"malloc.h" 4 5 6 const int maxlen=1000;//线性表的最大长度 7 typedef char type; 8 //------------线性表---------
阅读全文
摘要:1 #include"stdio.h" 2 #include"stdlib.h" 3 #include"malloc.h" 4 5 6 const int maxlen=1000;//线性表的最大长度 7 8 //------------线性表------------------ 9 struct
阅读全文
摘要:1 #include "stdio.h" 2 const int maxlen = 1000; 3 #define infinity 65535 4 5 struct encode{ 6 char Data[maxlen];//存储编码(字符类型) 7 int count;//编码的位数 8 };
阅读全文
摘要:顺序线性表的操作 (4人)⑴ 问题描述:已知两长度相同的定长数组,他们分别存放相同个数的整数。实现要求:⑴ 两个数组大小的比较。若第一个数组中的数比第二个数组中的数大的个数大于第一个数组中的数比第二个数组中的数小的个数,认为第一个数组大;若第一个数组中的数比第二个数组中的数大的个数小于第一个数组中的
阅读全文
摘要:1 #include<stdio.h> 2 #include<string> 3 using namespace std; 4 5 const int N=30; 6 int min(int n,int m)//返回两个数中的最小一个数 7 { 8 return (n<m) ? n : m; 9 }
阅读全文
摘要:对任意一篇英文文章,统计其中每个单词分别出现了多少次,并可替换指定的单词。【功能要求】(1)英文文章以文件形式输入。(2)统计结果保存为文件。(3)对单词进行替换时,允许用户选择全部替换,或逐个替换。替换完成后,将文章存盘。 1 #include<stdlib.h> 2 #include<stdio
阅读全文
摘要:5个菜单功能,每个菜单功能含有不同得类,构造函数,至少有一个菜单功能模块含有友元函数,友元类,多重继承,虚基类,虚函数或抽象类的应用,有异常处理。 1 #include 2 #include 3 #include 4 using namespace std; 5 6 const int...
阅读全文
摘要:问题描述:统计英文文单词数,具体要求:对于给定的一片英文文章,统计单词的个数、关键词的个数、空格的个数标点符号的个数,同时还能将原来的关键词替换成新的词语 1 #include 2 #include 3 #include 4 #include 5 using namespace std;...
阅读全文
摘要:由于数值分析需要numpy计算包,我找了很多numpy-cp27的下载地址,下了最新版的.whl文件,但总是安装不成功,后来找到一个.exe文件直接下载安装即可使用:下面是网址链接http://download.csdn.net/download/z1137730824/8384347备份Thean...
阅读全文
摘要:人生如戏,全靠演技,戏如人生,何必当真。最近总是感慨很多,估计是最近很闲的缘故,要不然哪来的时间进行感慨。首先想谈的是现在的我,天天到底在做什么。时间转瞬即逝,这一学期就这样过去了,上了大学,每天都是数着日子过得,不是嫌日子过得太慢,而是嫌日子过得太快。记得小时候,冬天真的很漫长,慢慢等,好不容易等...
阅读全文
摘要:每行数据最后需要Tab处理 1 #include 2 #include 3 #include 4 using namespace std; 5 6 int spilt_n(string s)//每行以‘\t’来统计有多个子字符串 7 { 8 const char *ch; 9 ...
阅读全文
摘要:单选框 复选框 按钮 标签 文本框的应用 1 #coding=utf-8 2 __author__ = 'minmin' 3 from Tkinter import * 4 5 class Application(Frame): 6 def __init__(self,mast...
阅读全文
摘要:1 #coding=utf-8 2 # __author__ = 'minmin' 3 from Tkinter import * 4 5 #创建一个基于Frame的Application类 6 class Application(Frame): 7 #初始化 8 def __i...
阅读全文
摘要:1 #Tic-Tac-Toe 2 #机器人和人类下井字棋 3 4 #全局变量 5 import random 6 X = "X" 7 O = "O" 8 EMPTY = " " #表示棋盘上的空空格 9 TIE = "TIE" #表示平局 10 NUM_SQ...
阅读全文
摘要:1 #include "iostream" 2 #include "vector" 3 using namespace std; 4 5 void print(vectorArray) 6 { 7 int i; 8 for(i=0;i&Array,int i,int j)16 {...
阅读全文
摘要:1 #include "iostream" 2 #include "vector" 3 using namespace std; 4 5 const int maxlen = 100; 6 #define infinity 65535 7 8 struct bnode 9 {...
阅读全文
摘要:1 #include "iostream" 2 using namespace std; 3 4 typedef char type; 5 struct bnode{ 6 type data; 7 type parent; 8 bnode *lchild,...
阅读全文
摘要:1 #include "iostream" 2 #include "stdlib.h" 3 using namespace std; 4 5 typedef char type; 6 struct bnode{ 7 type data; 8 bnode *lchi...
阅读全文
摘要:1 #include "iostream" 2 using namespace std; 3 4 typedef char type; 5 struct bnode{ 6 type data; 7 bnode *lchild,*rchild; 8 }; 9 10 class tr...
阅读全文
摘要:顺序表: 1 #include 2 using namespace std; 3 4 enum error{rangeerror,underflow,overflow,success}; 5 const int maxlen=1000; 6 7 class list{ 8 pub...
阅读全文
摘要:链栈: 1 #include 2 using namespace std; 3 struct node{ 4 int data; 5 node *next; 6 }; 7 enum error{underflow,overflow,success,fail}; 8 class sta...
阅读全文
摘要:1 #include 2 #include 3 using namespace std; 4 5 enum error{overflow,underflow,success}; 6 const int maxlen=100; 7 8 class queue{ 9 public:10 q...
阅读全文
摘要:1 #include 2 #include 3 using namespace std; 4 5 enum error{overflow,underflow,success}; 6 const int maxlen=100; 7 8 class stack 9 { 10 p...
阅读全文
摘要:(1) 指针本身是常量不可变(char*) const pContent;const (char*) pContent;(2) 指针所指向的内容是常量不可变const (char) *pContent;(char) const *pContent;(3) 两者都不可变const char* cons...
阅读全文
摘要:1 #include "iostream" 2 #include "iomanip" 3 #include "time.h" 4 using namespace std; 5 6 #define num 13 7 8 struct Bnode{ 9 int data;10 Bn...
阅读全文
摘要:简单顺序查找,有序表的二分查找,索引顺序表的查找 1 #include "iostream" 2 #include "iomanip" 3 #include "time.h" 4 #include "stdlib.h" 5 using namespace std; 6 7 #defi...
阅读全文
摘要:1 #include "iostream" 2 #include "iomanip" 3 #include "time.h" 4 using namespace std; 5 6 #define num 28 7 typedef int type;//type类型为int 8 9 /*10 *...
阅读全文
摘要:1 #include "iostream" 2 #include "vector" 3 #include "time.h" 4 #include "iomanip" 5 using namespace std; 6 7 #define num 25 8 typedef int t...
阅读全文
摘要:有向图图中任何两个可到达的顶点之间最短路径以及相应的长度Dijkstra算法 和Floyd算法 1 #include "iostream" 2 #include "vector" 3 #include "stdlib.h" 4 using namespace std; 5 6 cons...
阅读全文
摘要:从单个顶点到其余各顶点之间的最短路径: 1 #include "iostream" 2 #include "vector" 3 #include "stack" 4 using namespace std; 5 6 const int MaxNumVertex = 20; //最大顶...
阅读全文
摘要:关键路径求解 1 #include "iostream" 2 #include "vector" 3 #include "stack" 4 using namespace std; 5 6 const int MaxNumVertex = 20; //最大顶点数 7 const i...
阅读全文
摘要:拓扑排序方法:①找出一个入度为0的顶点,输出(作为序列的一个元素)②删除顶点v及其牺牲你关掉的弧,(因而后继定点的入度为1,并可能出现新的入度为0的顶点)③重复上述步骤①②,直到找不到入度为0的顶点为止。(拓扑序列不唯一) 1 #include "iostream" 2 #include "st...
阅读全文
摘要:Prim 算法求解方法:首先将所指定的起点作为已选顶点,然后反复在满足如下条件下的边中选择一条最小边,直到所有顶点已成为已选顶点为止(选择n-1条边)。 1 #include "iostream" 2 using namespace std; 3 4 typedef char Vertex...
阅读全文

浙公网安备 33010602011771号