搜索资源列表
Assignment4
- 浙江工业大学C++数据结构课程设计的练习作品 有一定的难度 有英文原题说明(老外授课)大家可以先看题自己做再参考我的程序-C data structure courses designed exercises works have a certain degree of difficulty that the original is in English (non teaching) that we can look at ourselves with reference to the proc
复件 轮渡问题
- 1. 汽车轮渡口,过江渡船每次能载10辆车过江,过江车辆分为客车类和货车类,上渡船有如下规定:同类车先到先上船,客车先于货车上渡船,且每上4辆客车,才允许上一辆货车。若等待客车不足4辆,则从货车代替,若无货车等待允许客车上船。试写一个算法模拟渡口管理。 算法设计: 1客车和货车均建立一个链式队列,初始均为空。以后来一辆车不是货车就是客车,因此可以说整个程序的事件驱动event就是这两个,客车表示1,货车表示0. 2轮船还没有到达时客车和货车均按次序排在
关于编译原理课程讲义cth
- 好的学习资料编译没学好的要下了看看哦 ,我也是找老师要的-good learning information to the compiler diminish under a look at, oh, I also want to find teachers
LimitBin
- 装箱问题:在装箱问题中,有若干个容量为c 的箱子和n 个待装载入箱子中的物品。物品i 需占 用s[i]个单元(0< s[i]≤c)。成功装载是指能把所有物品都装入箱子。最优装载是指使用最 少箱子的成功装载。 例如某运输公司要把包裹装入卡车中,每个包裹都有一定的重量,且每辆卡车也有其载 重限制(假设每辆卡车的载重都一样)。在卡车装载问题中,希望用最少的卡车来装载包裹。 此问题可看作装箱问题。卡车对应于箱子,包裹对应于物品。 解装箱问题的Best Fit 算法: 设
storehouseoperatorsystem
- 这个是我大一时候C++的大作业,相信会有朋友需要的,在这里共享给大家了.-this is my first year at college when the big C operations, I believe there will be a friend in need, here to share people.
chswordhfm
- 求哈夫曼树的代码,基本不错,本人写的时候很注意 风格 ,应该一看就能看明白-Huffman tree for the code, the basic Yes, I wrote the great attention to style, one should look at Naikanmengbai
duoxiang
- 这是一个关于多项式操作的小程序,大家先看看吧,有什么问题我会及时改正-This is a polynomial on the operation of small procedures, we look at Look here, what I will promptly correct
IntroductionToAlgorithms
- 算法导论英文版 This book is one of a series of texts written by faculty of the Electrical Engineering and Computer Science Department at the Massachusetts Institute of Technology. I
数据结构答案(严慰敏)
- 数据结构 清华大学 严慰敏 C语言版答案,重要性不用我说了吧!考研的人-data structure Tsinghua University Yan Wei C-language version of the answer, I do not have the importance that! People look at taking tests
4
- 这是一个实现哈夫曼编码的代码,大家看看,参考一下。我觉得这个不错的。-This is a realization of Huffman code, let us look at reference. I think this is good.
filestructure
- 这是我用c++做的关于文件结构的实验算法,是我们学习数据结构的时候老师给我们做的很经典的实验之一,现在给大家参考一下!-This is what I used c++ Done on the file structure of the experimental algorithm, data structure is that we learn when the teacher gave us to do one classic experiment, and now for everyone
1108
- 在0 / 1背包问题中,需对容量为c 的背包进行装载。从n 个物品中选取装入背包的物品,每件物品i 的重量为wi ,价值为pi 。对于可行的背包装载,背包中物品的总重量不能超过背包的容量,最佳装载是指所装入的物品价值最高,即n ?i=1pi xi 取得最大值。约束条件为n ?i =1wi xi≤c 和xi?[ 0 , 1 ] [ 1≤i≤n]。-At 0/1 knapsack problem, there is a need for a capacity of c for the loaded
datastruct_example
- 本人讲授数据结构课程时的所写的示例程序,结构清晰规范,有注释,全部可编译运行,包括如下代码: 长整数:ch0_bigint2.c 顺序表的实现:ch2_stable.c 链表的实现ch2_ltable.c 合并两个有序表:ch2_stable_merge.c 表达式计算:ch3_express.c 队列的链式实现:ch3_lqueue.c 栈的链式实现:ch3_lstack.c 迷宫求解:ch3_maze.c 队列的顺序实现:ch3_squeue.c
d
- 1. 0-1背包问题 在0 / 1背包问题中,需对容量为c 的背包进行装载。从n 个物品中选取装入背包的物品,每件物品i 的重量为wi ,价值为pi 。对于可行的背包装载,背包中物品的总重量不能超过背包的容量,最佳装载是指所装入的物品价值最高 -1. 0-1 knapsack problem at 0/1 knapsack problem, there is a need for a capacity of c for the loaded backpack. N items from
0-1
- 在0 / 1背包问题中,需对容量为c 的背包进行装载。从n 个物品中选取装入背包的物品,每件物品i 的重量为wi ,价值为pi 。对于可行的背包装载,背包中物品的总重量不能超过背包的容量,最佳装载是指所装入的物品价值最高。-At 0/1 knapsack problem, there is a need for a capacity of c to load the backpack. N items from a selected items into the backpack, each i
unionfindset
- 我自己写的并查集的标程(例程),方便适用,短小精悍,可作为模板直接在oj上直接刷题使用。同时亦可作为数学结构学习者学习使用。-I wrote it myself and set the standard search process (routine) to facilitate the application of dapper, can be used as a template directly in the title oj brush to use directly. At the s
generallist
- 求广义表的深度 利用数组传值,建立单链表并将其初始化。 利用递归求出每个子表的深度,进而求出广义表的深度。 先看两个表的深度是否相同,若相同,对表A中的每个元素i,扫描表B中的每个元素,对与i深度相同的元素j,再将i中的每个元素与j中的每个元素进行比较。(运用递归算法)-Seeking a broad depth of the table The use of an array passed by value, establish a single list of its in
shortpath
- 1、读入城市结点数据 */ /* 2、邻接矩阵初始化:所有元素赋Infinity, */ /* 对角线元素赋0 */ /* 3、读入城市间边的数据,转换为邻接矩阵的数据 */ /* 4、路径矩阵初始化,若arc[i][j]<Infinity, */ /* 则: at[i][j]=i 否则:Path[i][j]=-1 */ /* 5、计算最短路径 */ /* 6、保存最小路径数据-1, read into the city node data*/
GreedySelector
- 设有n个活动的集合E={1,2,…,n},其中每个活动都要求使用同一资源,如演讲会场等,而在同一时间内只有一个活动能使用这一资源。每个活动i都有一个要求使用该资源的起始时间si和一个结束时间fi,且si <fi 。如果选择了活动i,则它在半开时间区间[si, fi)内占用资源。若区间[si, fi)与区间[sj, fj)不相交,则称活动i与活动j是相容的。也就是说,当si≥fj或sj≥fi时,活动i与活动j相容。-With n-set of the activities of E = (1
main-element
- 具体地讲,如果一个数组A[1..n]中超过半数的元素都相同时,该数组被称为含有一个主元素。 (a) 设计一个有效算法(至少是O(n logn)),确定该数组中是否含有一个主元素,如果有,找出这个元素。 (为简单起见,假设n是2的幂,且n<150) (b) 能否给出一个线性时间算法? 需注意的是,该数组的元素之间可能不存在顺序——即不能进行”A[i]<A[j]”的判断,但是可以进行是否相等的判断。 -Specifically, if an array A [1 ..