搜索资源列表
accepted1
- 解决时钟问题,acm竞赛题 A weird clock marked from 0 to 59 has only a minute hand. It won t move until a special coin is thrown into its box. There are different kinds of coins as your options. However once you make your choice, you cannot use any other kind.
joseph小程序
- 2.1将n个人围成一圈,m为未进入游戏前的先行码,用来淘汰第一个出 局的人,然后依次给出淘汰者的密码,根据输入的密码来确定下一个淘汰是哪一个,并依次输出被淘汰的人对应的号码。 2.2用单向循环链表实现操作。-2.1 n personal cordons m not yet entered the game before the first yards out for the first out, then eliminated were given the password, the passw
约瑟夫环循环报数链表
- M个人围成一圈,从第一个人开始依次从1到N循环报数,当报到N的时候此人出圈,直到圈中只剩一人为止.要求按退出顺序给出原始编号-M personal circle, starting from the first person in turn reported from 1 to N number of cycles, N, when the report when the person out circle, circle until only one person so far. Requir
EvaluateExpression.tar 数据结果实验 表达式求值
- 数据结果实验 表达式求值 中缀表达式转后缀表达式求值-Results of experimental data to evaluate the expression in infix postfix expression evaluation turn
Joseph
- 约瑟夫问题,用循环队列解决,从指定的第m个元素到第n个元素依次读出队列中的元素-Joseph problems, and use circular queue resolved, the first m from the specified element to the first n elements in turn to read out the elements of the queue
queen
- 运用回溯法解决8皇后问题,进而可以使用本方向推广到N皇后问题。-The use of backtracking to solve 8 queens problem, in turn, can be extended to use the direction of N Queens problem.
middlechanfinally
- 输入一个中缀表达式,将其变为后缀, 内有VC++源代码 -Enter a infix expression to turn it into suffix, with VC++ Source code
myprogrom
- 下楼问题,质数问题,分书问题,开灯问题,排球问题,排课问题,等c++源码-Problem downstairs, prime number problem, sub-book questions, questions turn on the lights, volleyball questions, Course Scheduling problem, such as c++ source code
hanoi
- 汉诺塔(又称河内塔)问题是印度的一个古老的传说。开天辟地的神勃拉玛在一个庙里留下了三根金刚石的棒,第一根上面套着64个圆的金片,最大的一个在底下,其余一个比一个小,依次叠上去,庙里的众僧不倦地把它们一个个地从这根棒搬到另一根棒上,规定可利用中间的一根棒作为帮助,但每次只能搬一个,而且大的不能放在小的上面。-Tower of Hanoi (also known as the Hanoi tower) problem is an ancient Indian legend. Epoch-making
b
- 【问题描述】: 有一个渡口,每条渡轮一次能装载10辆汽车过江,过江车辆分为客车和货车两类,上渡轮有如下规定: ⑴同类汽车先到先上船; ⑵客车先于货车上船; ⑶每上4辆客车才允许上一辆货车,但若等待的客车不足4辆则用货车填补,反过来,若没有货车等待则用客车填补; ⑷装满10辆后则自动开船,当等待时间较长时车辆不足10辆也应人为控制发船。 【实现提示】: 此题可建立和使用两个链式队列,一个为客车队列,另一个为货车队列,到渡口需过江的汽车分别进入到相应队列中。当渡口有渡轮
collectioncaculator
- 运用顺序表的基本运算。(插入、删除) 1)集合的数据类型为一个结构体,其中包括一个数组用来存放集合元素,一个整型数据来统计集合元素的个数。生成两个集合A和B。 2)将集合中的元素按照从小到大排序。具体方法为:从第二个元素起(i),依次扫描每个元素前面的所有元素(j),若i<j,则将j插在i的前面,结束对i的排序,照这个方法,再依次对i后的元素进行排序。 3)求两集合的并:生成一个新集合C,将集合A的元素复制过来,对集合B的元素依次进行扫描,若没有该元素,则插入,若已存在,则扫描
2
- 在线性表的顺序存储结构上的第i个位置上插入一个元素时,必须先将线性表的第i个元素之后的所有元素依次后移一个位置,以便腾空一个位置,再把新元素插入到该位置。若要删除第i个元素时,也必须把第i个元素之后的所有元素前移一个位置-Online storage structure of the order of the table on the first i positions to insert an element, you must first linear element in the tabl
huffman_3
- 功能包括从文件中读取文章,将文章转换为哈夫曼编码,将哈夫曼编码还原,就是那几个基本算法的实现啦。 为了方便查看,这里输出的哈夫曼编码是1byte的,其实真正应该将其变为1bit存储,这样才能达到压缩的目的。-Features include articles to read from the file, the article is converted to Huffman coding, Huffman coding will be restored and that is the rea
mataqipan
- 能够实现马踏棋盘得算法运算 输入开始坐标点即可依次得到下个节点的坐标直到整个棋盘遍历完毕-Horse riding can be achieved board may enter a start coordinate point arithmetic operations can in turn be the coordinates of the next node until it has finished traversing the entire board
MergeSort
- 数据结构--合并排序法.基本是将两笔已排序的数据合并并进行排序,如果所读入的数据尚未排序,可以先利用其它的排序方式来处理这两笔资料,然后再将排序好的这两笔数据合并。 只要将所有的数字不断的分为两个等分,直到最后剩一个数字为止,然后再反过来不断的合并。 -Data structure- merge sort method. Is basically the two pens had been sorted and sort data consolidation, if the read d
yuesefu
- 构造单项循环链表储存结构,存储依次输入的个人密码和号码数 2)构造数组依次存储出列人的号码数 3)输入测试m初值,从第一个人按顺时针开始报数,第m个人的号码数存储在数组中,删除出列者的结点,继续循环,直到所有人出列 4)按顺序输出数组里的号码数 -Single loop structure linked list storage structure, storage order and number of input PIN number 2) construct an arr
Test(2)
- 用循环单链表实现: N个人围圆圈而坐,分别标以数字1到N。从坐在1号的位置的人开始依次传递土豆。M次传递之后,拿到土豆的人被排除,圆圈收缩,然后从离开圆桌的人后面的那个人开始继续游戏。游戏一直进行,直到留下最后一个人,为赢家。因此,如果M=0且N=5,所有的人依次被排除,5号最后胜利。如果M=1且N=5,排除的顺序为2,4,1,5. -Achieved with cyclic single-linked list: N individuals sitting around a circl
Nqueensproblem
- 题目说明: 在一个N×N的国际象棋棋盘中摆N个皇后,使这N个皇后不能互相被对方吃掉。 题目要求: (1)依次输出各种成功的放置方法。 (2)最好能画出棋盘的图形形式,并动态的演示试探过程。 (3)程序能方便的移植到其它规格的棋盘上。 -Title Descr iption: In an N × N chess board in place N queens, so that the N-Queen can not eat each other to be each
stackANDqueue
- 1. 用栈模拟停车场,队列模拟便道。停车场满的时候在便道排队,一旦有车开走,排在第一位的就进入停车场。 2. 当有车要开走的时候在它后面进入停车场的车先依次开出,待该车缴费离开后再依次回到停车场。 3. 离开停车场时应按时间缴纳费用,排队车辆进入停车场时也应该缴纳相应的排队费用。 4. 车辆到达时输出停车位置,离开时输出停留时间和应缴纳费用。 -1. With a stack simulation parking lot, queue simulation of pavement
main
- 平衡树的数据结构作业 完成了平衡树的建立于左转、右转-Balanced tree data structure to complete the balance of work established in the tree, turn left, turn right
