CodeBus
www.codebus.net
Search
Sign in
Sign up
Hot Search :
Source
embeded
web
remote control
p2p
game
More...
Location :
Home
Search - tip
Main Category
SourceCode
Documents
Books
WEB Code
Develop Tools
Other resource
Sub Category
Compress-Decompress algrithms
STL
Data structs
Algorithm
AI-NN-PR
matlab
Bio-Recognize
Crypt_Decrypt algrithms
mathematica
Maple
DataMining
Big Data
comsol
physical calculation
chemical calculation
simulation modeling
Search - tip - List
[
Data structs
]
Simulate_Allocate_Memory_Implement_by_C
DL : 0
模拟内存分配的c语言实现 六、 实验目的 了解用户程序分配内存以及回收所用内存的过程,加深对操作系统存储管理机制的理解。 七、 实验内容 采用首次适应法、最佳适应法或最差适应法,编写一内存分配和回收模拟程序。 (提示:“内存空闲区”数组的设置原理类似于实验一。动态地随机产生新的“内存分配”或“内存回收”请求,再按照你选定的分配算法修改这个数组。由于这个实验的重点在于内存分配,所以不考虑与某内存区相关的进程情况。) -simulation memory allocation in C Language 6, the experiment was to understand user program memory allocation and recovery of memory used by the process, enhance the operating system memory management mechanisms and understanding. 7, the first experiment using content to adapt, adapt best or the worst adaptation law, the preparation of a memory allocation and recovery simulation program. (Tip : "memory free zone" set up an array of principles similar to the experimental one. Dynamic random to create a new "memory allocation" or "memory recovery" request, then you have chosen in accordance with the allocation algorithm to change the array. As the focus of this experiment is memory allocation, there is no test taking into account with a certain memory areas rela
Date
: 2025-12-23
Size
: 3kb
User
:
丘方
[
Data structs
]
ntree
DL : 0
设T 是一棵带权树,树的每一条边带一个正权。又设S 是T 的顶点集,T/S 是从树T 中 将S中顶点删去后得到的森林。如果T/S中所有树的从根到叶的路长都不超过d ,则称T/S 是一个d 森林。 (1)设计一个算法求T的最小顶点集S,使T/S是d 森林。(提示:从叶向根移动) (2)分析算法的正确性和计算复杂性。 (3)设T中有n 个顶点,则算法的计算时间复杂性应为O(n)。-based T is a right to bring a tree for every one of the sideband is the right one. S is also based Vertex Set T, T/S from the tree T Lieutenant General S vertex deletion the forest. If the T/S all trees from the roots to leaves of a long road, do not exceed d, said the T/S is a d forest. (1) design a T algorithm for the minimum vertex set S, T/S is d forest. (Tip : from roots to leaves mobile) (2) analysis algorithm correctness and computational complexity. (3) The T with n vertices, the algorithm complexity of computing time for the O (n).
Date
: 2025-12-23
Size
: 1kb
User
:
自由人
[
Data structs
]
PackageProblem
DL : 0
实现背包问题 package problem 1. 问题描述 假设有一个能装入总体积为T的背包和n件体积分别为w1 , w2 , … , wn 的物品,能否从n件物品中挑选若干件恰好装满背包,即使w1 +w2 + … + wn=T,要求找出所有满足上述条件的解。例如:当T=10,各件物品的体积{1,8,4,3,5,2}时,可找到下列4组解: (1,4,3,2)、(1,4,5)、(8,2)、(3,5,2)。 2. 基本要求 读入T、n、w1 , w2 , … , wn 3.提示: 可利用递归方法:若选中w1 则问题变成在w2 , … , wn 中挑选若干件使得其重量之和为T- w1 ,若不选中w1,则问题变成在w2 , … , wn 中挑选若干件使得其重量之和为T 。依次类推。 也可利用回溯法的设计思想来解决背包问题。首先将物品排成一列,然后顺序选取物品装入背包,假设已选取了前i 件物品之后背包还没有装满,则继续选取第i+1件物品,若该件物品“太大”不能装入,则弃之而继续选取下一件,直至背包装满为止。但如果在剩余的物品中找不到合适的物品以填满背包,则说明“刚刚”装入背包的那件物品“不合适”,应将它取出“弃之一边”,继续再从“它之后”的物品中选取,如此重复,,直至求得满足条件的解,或者无解。 注:没压缩密码-knapsack problem achieve a package problem. Problem description one would assume that the total volume of loaded backpack and T n size pieces of w1, w2, ..., wn items Can n items from the selected pieces were just filled with backpacks, even w1 w2 ... wn = T, asked to identify all of the above conditions are met solution. For example : when T = 10, the volume of items (1,8,4,3,5,2), may find the following four solutions : (1,4,3,2), (1,4,5), (8,2), (3,5,2). 2. Basic requirements read T, n, w1, w2, ..., wn 3. Tip : Recursive methods can be used : If the problem were selected w1 into the w2, ..., wn selected several pieces make its weight and as a T-w1, if selected w1, w2 issue into the .... wn selected several pieces make its weight and as T. Renumbered accordingly. Retrospective can also u
Date
: 2025-12-23
Size
: 9kb
User
:
李昭明
[
Data structs
]
Thecarstop
DL : 0
停车场是一条可以停放n辆车的狭窄通道,且只有一个大门汽车停放安到达时间的先后依次由北向南排列(大门在最南端,最先到达的第一辆车停在最北端)若停车场已经停满n辆车,后来的汽车在便道上等候,一旦有车开走,排在便道上的第一辆车可以开入;当停车场的某辆车要离开时,停在他后面的车要先后退为他让路,等它开出后其他车在按照原次序开入车场,每两停在车场的车要安时间长短缴费。 要求:以栈模拟停车场,以队列车场外的便道,按照从终端输入的数据序列进行模拟管理。每一组数据包括三个数据项:汽车“到达”或“离去”信息、汽车牌照号码、以及到达或离去的时刻。对每一组数据进行操作后的信息为:若是车辆到达,则输出汽车在停车场的内或便道上的位置:若是车辆离去则输出汽车在停车场内的停留时间和应缴纳的费用(在便道上的停留时间不收费)。栈以顺序结构实现,队列以链表结构实现。 -parking can be a n vehicles parked in a narrow channel. and only one door car parked on the time of arrival has followed from north to south with (the southernmost tip of the door, the first to reach No. 1 car was parked in the most northern end of the project) if the car park has been full of parked cars n, and later in the car on the sidewalk waiting Once a car drive away, on the sidewalk on the first one into the car; When parking a car to leave, He stopped at the first car behind the back of his crazy, it has come out after the other vehicles in the original order into the garage, Every two parked cars in the parking lots to pay security duration. Requirements : Stack simulated car parks, to train teams outside the sidewalk, according to the input from the terminal sequence simulation
Date
: 2025-12-23
Size
: 3kb
User
:
牛纪超
[
Data structs
]
1
DL : 0
1、用二叉链表作为存储结构,建立一棵二叉树。 2、分别按先序、中序和后序遍历二叉树,输出各遍历序列。 3、编写交换二叉树中所有结点左右孩子的非递归算法。 提示: 可以基于后序遍历方法,实现交换二叉树每一结点的左右孩子。 -1, used as a binary linked list storage structure, the establishment of a binary tree. 2, respectively, according to first order, in sequence and post-order tree traversal, the output of the traversal sequence. 3, prepared by the exchange of binary tree all nodes about their children s non-recursive algorithm. Tip: after the traversal can be based on methods, to achieve the exchange of binary tree nodes around each child.
Date
: 2025-12-23
Size
: 2kb
User
:
[
Data structs
]
wine_dividing
DL : 0
分酒问题:已知有3个容量分别为3kg,5kg和8kg且没有刻度的酒瓶,3kg和5kg的酒瓶均装满了酒,而8kg的瓶子为空.现要求仅用这3个瓶子将这些酒分为两个4kg,并分别装入5kg和8kg的瓶子中. 提示:回溯,递归算法.最初始的状态为(350),最终的状态为(044),要求求解所有的解法.-Hours of liquor question: known to have three capacity, respectively 3kg, 5kg and 8kg without calibration bottles, 3kg and 5kg bottles are filled with wine and 8kg bottle is empty. Are now required only that three bottle of wine will be divided into two 4kg, respectively 5kg and 8kg load of the bottle. Tip: backtracking, recursive algorithm. s initial state is (350), and the final state for the (044), the requirements for solving all the Solution.
Date
: 2025-12-23
Size
: 1kb
User
:
crystal
[
Data structs
]
xunhuanliedui
DL : 0
2. 假设以数组sequ[m]存放循环队列的元素,同时设变量rear和quelen 分别指示循环队列中队尾元素的位置和内含元素的个数。编写实现该循环队列的入队和出队操作的算法。提示:队空的条件:sq->quelen==0;队满的条件:sq->quelen==m。-2. Assuming an array sequ [m] cycle queue storage elements, while the variable set, respectively, rear and instructions cycle quelen squadron tail queue element contains the location and the number of elements. Prepared to achieve the cycle queue into teams and teams of the algorithm operation. Tip: Force air-conditions: sq-> quelen == 0 team full conditions: sq-> quelen == m.
Date
: 2025-12-23
Size
: 157kb
User
:
李月
[
Data structs
]
tingchechang
DL : 0
设停车场是一个可以停放n辆汽车的狭长通道,且只有一个大门可供汽车进出。汽车在停车场内按车辆到达时间的先后顺序,依次有北向南排列(大门在最南端,最先到达的第一车停放在车场的最北端),若车场内已停满n辆车,那么后来的车只能在门外的便道上等候,一旦有车开走,则排在便道上的第一辆车即可开入;当停车场内某辆车要离开时,在它之后进入的车辆必须先退出车场为它让路,待该辆车开出大门外,其他车辆再按原次序进入车场,每辆停放在车场的车在它离开停车场时必须按它停留的时间长短交纳费用。-Car parks are located a vehicle parked n the long and narrow channel, and there is only one door open to motor out. Car in the parking lot with the arrival of the vehicles by the time the order are arranged north to south (the southern tip of the door in the first car to reach the first car parked in the most northern end), if the car had been parked inside vehicles over n, then later vehicles can only wait for the sidewalk outside, once the car away, then in the sidewalk on the first car to be opened when parking vehicles within a certain time to leave, after it entered the vehicle must be first from the yard to make way for it to be out of the vehicles outside the gate, then the original order of other vehicles into the yard, each car parked in the car when it left the car park must stay the length of time it costs to pay.
Date
: 2025-12-23
Size
: 2kb
User
:
jun
[
Data structs
]
acarparkmanagesystem
DL : 0
设停车场内只有一个可停放辆汽车的狭长通道且只有一个大门可供汽车进出。汽车在停车场内按车辆到达时的先后顺序依次由北向南排列(大门在最南端,最先到达的第一辆车停放在车场的最北端若车场内已停满N辆车,则最后来的汽车只能在门外的便道上等候,一旦停车场内有车开走,则排在便道上的第一辆车可开入;当停车场内某辆车要离开时由于停车场是狭长的通道,在它之后开入车场的车辆必须先退出车场为它让路,待该车开出大门外后,为它让路的车辆再按原次序进入车场。在这里假设汽车不能从便道上开走。试设计一个停车场管理系统-There is only one car park for the parking of vehicles can be long and narrow and there is only one channel open to motor out of the door. Car in the parking lot with the arrival of the vehicles according to the order in which they followed north to south at the time of order (the door in the southernmost tip of the first to arrive at the first car parked in the most northern end of the depot if the car had been parked inside vehicles over N, then the last car can only wait for the sidewalk outside, once the car park a car drive away, then in the sidewalk on the first car to be opened when parking vehicles within a certain time to leave the car park is long and narrow as a result of the channel in it into the car after the vehicle must first withdraw from the yard to make way for it to be outside the main entrance of the car out after it to make way for vehicles to enter the car and then the original sequence. Here the assumption that the vehicle can not be driven away from the sidewa
Date
: 2025-12-23
Size
: 3kb
User
:
张磊
[
Data structs
]
tttcccccc
DL : 0
设停车场是一个可以停放n辆汽车的狭长通道,且只有一个大门可供汽车进出。汽车在停车场内按车辆到达时间的先后顺序,依次有北向南排列(大门在最南端,最先到达的第一车停放在车场的最北端),若车场内已停满n辆车,那么后来的车只能在门外的便道上等候,一旦有车开走,则排在便道上的第一辆车即可开入;当停车场内某辆车要离开时,-Car parks are located a vehicle parked n the long and narrow channel, and there is only one door open to motor out. Car in the parking lot with the arrival of the vehicles by the time the order are arranged north to south (the southern tip of the door in the first car to reach the first car parked in the most northern end), if the car had been parked inside vehicles over n, then later vehicles can only wait for the sidewalk outside, once the car away, then in the sidewalk on the first car to be opened when parking vehicles within a certain time to leave,
Date
: 2025-12-23
Size
: 1kb
User
:
XH
[
Data structs
]
AAAAAaaaaaaaaaaaaaaaaaa
DL : 0
设停车场内只有一个可停放n辆汽车的狭长通道,且只有一个大门可供汽车出进。汽车在停车场内按车辆到达的时间先后顺序,依次由北向南排列-There is only one car park located inside the vehicles can be parked n the long and narrow channels, there is only one door and out into the open to motor. Car in the parking lot with the arrival of the vehicles by the time the order in order from north to south (the southern tip of the door in the first car to reach the first car parked in the most northern end), if the car had been parked inside vehicles over n, then later only in the car waiting outside the pavement, once a car drive away, then in the sidewalk on the first car to be opened when parking vehicles within a certain time to leave, after he entered the vehicles must be from the yard to make way for it,
Date
: 2025-12-23
Size
: 3kb
User
:
小赖
[
Data structs
]
Unarysimplecalculator
DL : 0
一元多项式计算器的基本功能定为 (1) 建立多项式 (2) 输出多项式 (3) 两个多项式相加,建立并输出和多项式 (4) 两个多项式相减,建立并输出差多项式 实现提示:可选择带头结点的单向循环链表 或单链表存储多项式,头结点可存放多项式 的参数,如项数等。 除以上功能外,还有乘法和除法的计算和导数计算-Unary polynomial basic functions of the calculator as (1) the establishment of polynomials (2) output polynomial (3) The sum of two polynomials, create and output, and polynomial (4) two more Phase-cut, create and output to achieve differential polynomial Tip: choose to take the lead node of the one-way linked list or a single chain store polynomials, the first node can be stored polynomial parameters, such as the number of such items. In addition to these features, there are multiplication and division calculations and derivative calculation
Date
: 2025-12-23
Size
: 2kb
User
:
郑海鹏
[
Data structs
]
park
DL : 0
停车场管理。设停车场内只有一个可停放n辆汽车的狭长通道,且只有一个大门可供汽车进出。汽车在停车场内按车辆到达时间的先后顺序,依次由北向南排列(大门在最南端,最先到达的第一辆车停放在车场的最北端),若车场内已停满n辆汽车,则后来的汽车只能在门外的便道上等候,一旦有车开走,则排在便道上的第一辆车即可开入。当停车场内某辆车要离开时,在它之后开入的车辆必须先退出车场为它让路,待该辆车开出大门外,其它车辆再按原次序进入车场。每辆停放在车场的车在它不离开停车场时必须按它停留的时间长短交费。试为停车场编制按上述要求进行管理的模拟程序。-Parking. Parking lots within the park is only a narrow channel n cars, and only one gate for car access. Car in a car park by vehicles, time of arrival of the order in ordered north to south (entrance at the southern tip of the first arrival of the first car parked in the yard of the most northern end), if the car had been parked inside n cars, then later The car only on the sidewalk outside waiting, when a car drove off, then came in the first car on the pavement can be opened into. When the car park a car to leave, after it opened into the vehicle must first leave the yard to make way for it, to be out of the car outside the gate, other vehicles and then into the yard of the original order. Every car parked in yards in that it does not leave the car park must stay the length of time by its Contributions. Test preparation for the parking requirements according to the management of simulation programs.
Date
: 2025-12-23
Size
: 2kb
User
:
木清澄
[
Data structs
]
Schedule
DL : 1
拓扑排序------打印输出计算机本科专业4年每学期的课表 1.采用C++实现。 2.熟练掌握图的应用。 3.熟练掌握图的邻接表存储结构以及拓扑排序的基本思想。 4.上机调试程序,掌握查错、排错使程序能正确运行。 5.算法提示:拓扑排序用队列存储入度为零的顶点-Computer printout of topological sorting------ 4-year undergraduate curriculum of each semester 1. Using C++ implementation. 2. Master map. 3. Mastery of the adjacency table storage structure and the basic idea of topological sort. 4. The machine debugger, control troubleshooting, debugging to run correctly. 5. Algorithm Tip: topological sorting with queue storage into the vertices of degree zero
Date
: 2025-12-23
Size
: 908kb
User
:
wang
[
Data structs
]
38
DL : 0
请编写函数fun,函数的功能是:将放在字符串数组中的M各字符串(每串的长度不超过N),按顺序合并组成一个新的字符串。函数fun中给出的语句仅供参考。 例如,字符串数组中的M个字符串为 AAAA BBBBBBB CC 则合并后的字符串的内容应是:AAAABBBBBBBCC。 提示:strcat(a,b)的功能是将字符串b复制到字符串a的串尾上,成为一个新串。 注意:部分源程序在文件APROG1.C中。 请勿改动主函数main和其它函数中的任何内容,仅在函数fun的花括号中填入你编写的若干语句。-Please write the function fun, function is the function: string array will be placed in the M of string (the length of each string of not more than N), merged in order to form a new string. Function fun statement given for reference only. For example, the string array of M string AAAA BBBBBBB CC is the combined contents of the string should be: AAAABBBBBBBCC. Tip: strcat (a, b) function is copied into the string b string on the end of a string, a new string. Note: Some source code in the file APROG1.C. Do not change main function and other functions in any content, only the braces in the function fun fill a number of statements you write.
Date
: 2025-12-23
Size
: 4kb
User
:
储谢东
[
Data structs
]
exam1
DL : 0
请编写函数fun,,函数的功能是:将放在字符串数组中的M个字符串(每串的长度不超过N),按顺序合并组成一个新的字符串。函数fun中给出的语句仅供参考。 例如,字符串数组中的M个字符串为 AAAA BBBBBBB CC 则合并后的字符串的内容应是:AAAABBBBBBCC。 提示:strcat(a,b)的功能是将字符b复制到字符串a的串尾上,成为一个新串。 注意:部分源文件存在文件PROG1.C中。数据文件IN.DAT中的数据不得修改。 请勿改动主函数main和其它函数中的任何内容,仅在函数fun的花括号中填入你编写的若干语句。 -Please write the function fun,, function is the function: string array will be placed in the M-string (the length of each string of not more than N), merged in order to form a new string. Function fun statement given for reference only. For example, the string array of M string AAAA BBBBBBB CC is the combined contents of the string should be: AAAABBBBBBCC. Tip: strcat (a, b) function is a character string b string copied to the tail, a new string. Note: some of the source file exists in the file PROG1.C. The data in the data file IN.DAT not modify. Do not change main function and other functions in any content, only the braces in the function fun fill a number of statements you write.
Date
: 2025-12-23
Size
: 25kb
User
:
kaixin
[
Data structs
]
exa2m
DL : 0
请编写函数fun,,函数的功能是:将放在字符串数组中的M个字符串(每串的长度不超过N),按顺序合并组成一个新的字符串。函数fun中给出的语句仅供参考。 例如,字符串数组中的M个字符串为 AAAA BBBBBBB CC 则合并后的字符串的内容应是:AAAABBBBBBCC。 提示:strcat(a,b)的功能是将字符b复制到字符串a的串尾上,成为一个新串。 注意:部分源文件存在文件PROG1.C中。数据文件IN.DAT中的数据不得修改。 请勿改动主函数main和其它函数中的任何内容,仅在函数fun的花括号中填入你编写的若干语句。 -Please write the function fun,, function is the function: string array will be placed in the M-string (the length of each string of not more than N), merged in order to form a new string. Function fun statement given for reference only. For example, the string array of M string AAAA BBBBBBB CC is the combined contents of the string should be: AAAABBBBBBCC. Tip: strcat (a, b) function is a character string b string copied to the tail, a new string. Note: some of the source file exists in the file PROG1.C. The data in the data file IN.DAT not modify. Do not change main function and other functions in any content, only the braces in the function fun fill a number of statements you write.
Date
: 2025-12-23
Size
: 7kb
User
:
kaixin
[
Data structs
]
exam3
DL : 0
请编写函数fun,,函数的功能是:将放在字符串数组中的M个字符串(每串的长度不超过N),按顺序合并组成一个新的字符串。函数fun中给出的语句仅供参考。 例如,字符串数组中的M个字符串为 AAAA BBBBBBB CC 则合并后的字符串的内容应是:AAAABBBBBBCC。 提示:strcat(a,b)的功能是将字符b复制到字符串a的串尾上,成为一个新串。 注意:部分源文件存在文件PROG1.C中。数据文件IN.DAT中的数据不得修改。 请勿-Please write the function fun,, function is the function: string array will be placed in the M-string (the length of each string of not more than N), merged in order to form a new string. Function fun statement given for reference only. For example, the string array of M string AAAA BBBBBBB CC is the combined contents of the string should be: AAAABBBBBBCC. Tip: strcat (a, b) function is a character string b string copied to the tail, a new string. Note: some of the source file exists in the file PROG1.C. The data in the data file IN.DAT not modify. Do not
Date
: 2025-12-23
Size
: 7kb
User
:
kaixin
[
Data structs
]
exam4
DL : 0
请编写函数fun,,函数的功能是:将放在字符串数组中的M个字符串(每串的长度不超过N),按顺序合并组成一个新的字符串。函数fun中给出的语句仅供参考。 例如,字符串数组中的M个字符串为 AAAA BBBBBBB CC 则合并后的字符串的内容应是:AAAABBBBBBCC。 提示:strcat(a,b)的功能是将字符b复制到字符串a的串尾上,成为一个新串。 注意:部分源文件存在文件PROG1.C中。数据文件IN.DAT中的数据不得修改。 请勿改动主函数main和其它函数中的任何内容,仅在函数fun的花括号中填入你编写的若干语句。 -Please write the function fun,, function is the function: string array will be placed in the M-string (the length of each string of not more than N), merged in order to form a new string. Function fun statement given for reference only. For example, the string array of M string AAAA BBBBBBB CC is the combined contents of the string should be: AAAABBBBBBCC. Tip: strcat (a, b) function is a character string b string copied to the tail, a new string. Note: some of the source file exists in the file PROG1.C. The data in the data file IN.DAT not modify. Do not change main function and other functions in any content, only the braces in the function fun fill a number of statements you write.
Date
: 2025-12-23
Size
: 6kb
User
:
kaixin
[
Data structs
]
5
DL : 0
请编写函数fun,,函数的功能是:将放在字符串数组中的M个字符串(每串的长度不超过N),按顺序合并组成一个新的字符串。函数fun中给出的语句仅供参考。 例如,字符串数组中的M个字符串为 AAAA BBBBBBB CC 则合并后的字符串的内容应是:AAAABBBBBBCC。 提示:strcat(a,b)的功能是将字符b复制到字符串a的串尾上,成为一个新串。 注意:部分源文件存在文件PROG1.C中。数据文件IN.DAT中的数据不得修改。 请勿改动主函数main和其它函数中的任何内容,仅在函数fun的花括号中填入你编写的若干语句。 -Please write the function fun,, function is the function: string array will be placed in the M-string (the length of each string of not more than N), merged in order to form a new string. Function fun statement given for reference only. For example, the string array of M string AAAA BBBBBBB CC is the combined contents of the string should be: AAAABBBBBBCC. Tip: strcat (a, b) function is a character string b string copied to the tail, a new string. Note: some of the source file exists in the file PROG1.C. The data in the data file IN.DAT not modify. Do not change main function and other functions in any content, only the braces in the function fun fill a number of statements you write.
Date
: 2025-12-23
Size
: 3kb
User
:
kaixin
«
1
2
»
CodeBus
is one of the largest source code repositories on the Internet!
Contact us :
1999-2046
CodeBus
All Rights Reserved.