文件名称:badCoin
-
所属分类:
- 标签属性:
- 上传时间:2013-04-25
-
文件大小:525byte
-
已下载:0次
-
提 供 者:
-
相关连接:无下载说明:别用迅雷下载,失败请重下,重下不扣分!
介绍说明--下载内容来自于网络,使用问题请自行百度
给定一组硬币,共N枚,其中N-1枚是好的,1枚是坏的。所有好的硬币都有同样的重量,坏的硬币的重量与好的硬币不同,且有一枚好的硬币被做上标记。
编写一个程序,对于给定N和K,确定能否用最多K次的天平,找出那个坏的硬币。如果可以输出"POSSIBLE" ,否则输出"IMPOSSIBLE"。
-Given a set of coins, a total of N pieces, N-1 pieces is good, one bad. All the good coins have the same weight, the weight of bad coin with good coin, and there is a good coin flag. Write a program to determine whether to use a maximum of K times the balance for a given n and k, identify the bad coin. If the output " Possible" , otherwise output " Impossible" .
编写一个程序,对于给定N和K,确定能否用最多K次的天平,找出那个坏的硬币。如果可以输出"POSSIBLE" ,否则输出"IMPOSSIBLE"。
-Given a set of coins, a total of N pieces, N-1 pieces is good, one bad. All the good coins have the same weight, the weight of bad coin with good coin, and there is a good coin flag. Write a program to determine whether to use a maximum of K times the balance for a given n and k, identify the bad coin. If the output " Possible" , otherwise output " Impossible" .
(系统自动生成,下载前可以参看下载内容)
下载文件列表
data.out
badCoin.c
data.in
badCoin.c
data.in
本网站为编程资源及源代码搜集、介绍的搜索网站,版权归原作者所有! 粤ICP备11031372号
1999-2046 搜珍网 All Rights Reserved.