文件名称:lianxi
介绍说明--下载内容均来自于网络,请自行研究使用
关于算法的相关练习报告
实验三、银币问题问题描述与实验目的:
在n个银币中有一个是不合格的,不合格的银币比合格银币要轻。
现用天平秤银币,找出不合格的银币,且在最坏情况下秤银币的次数最少。
输入
输入有若干行。每行上有一个整数n,表示银币个数,n<100000。
当n=0,表示输入结束。
输出
对输入大于0的整数n,输出2行。第1行输出n的值,第2行上先输出“Times:”,接着输出在最坏情况下秤n个银币的最少次数。
当n=0时,这种情况你不必处理和结果输出。
-Experiment 3 silver coins Problem descr iption and purpose of the experiment: the n pieces of silver, there is a failure, rejected silver coins than qualified to light. Active balance scale silver coins, silver coins failed to identify, and in the worst case the number of silver coins weighing at least. Input a number line. Each row contains an integer n, indicating the number of coins, n < 100000. When n = 0, which means that the input. Greater than 0, the output of the input integer n, the output line 2. The first line output the value of n, the second line on the first output of " Times:" , followed by the output scales n in the worst case the minimum number of pieces of silver. When n = 0 when you do not have to deal with this situation and results output.
实验三、银币问题问题描述与实验目的:
在n个银币中有一个是不合格的,不合格的银币比合格银币要轻。
现用天平秤银币,找出不合格的银币,且在最坏情况下秤银币的次数最少。
输入
输入有若干行。每行上有一个整数n,表示银币个数,n<100000。
当n=0,表示输入结束。
输出
对输入大于0的整数n,输出2行。第1行输出n的值,第2行上先输出“Times:”,接着输出在最坏情况下秤n个银币的最少次数。
当n=0时,这种情况你不必处理和结果输出。
-Experiment 3 silver coins Problem descr iption and purpose of the experiment: the n pieces of silver, there is a failure, rejected silver coins than qualified to light. Active balance scale silver coins, silver coins failed to identify, and in the worst case the number of silver coins weighing at least. Input a number line. Each row contains an integer n, indicating the number of coins, n < 100000. When n = 0, which means that the input. Greater than 0, the output of the input integer n, the output line 2. The first line output the value of n, the second line on the first output of " Times:" , followed by the output scales n in the worst case the minimum number of pieces of silver. When n = 0 when you do not have to deal with this situation and results output.
(系统自动生成,下载前可以参看下载内容)
下载文件列表
实验四、哈夫曼编码.doc
实验二、最长公共子序列.doc
实验三、银币问题.doc
实验一、矩阵连乘问题.doc