文件名称:basketball_cuopai
- 所属分类:
- 系统编程
- 资源属性:
- [Windows] [Visual C] [源码]
- 上传时间:
- 2012-11-26
- 文件大小:
- 20kb
- 下载次数:
- 0次
- 提 供 者:
- luck****
- 相关连接:
- 无
- 下载说明:
- 别用迅雷下载,失败请重下,重下不扣分!
介绍说明--下载内容均来自于网络,请自行研究使用
请编写程序求解篮球错排问题。已知n个篮子一字排开(n为用户输入的任意正整数),从左到右分别标着号:1,2,... ...,n;每个球也有编号,分别也是1,2,... ...,n。现要将这n个球全部放入这n个篮子中,满足:每个篮子放置1个球,球的号不能与其所在的篮子的号相同,且在相邻篮子内的球的球号不能相邻。例如,如果在相邻两个篮子内的球的球号分别为9和10,则是不允许的。请输出所有符合要求的放球方式(对于每种符合要求的放球方式,都应输出在每个篮子中的球号)。-Please write a program to solve the problem Basketball wrong row. Lined baskets known n (n is any positive integer entered by the user), from left to right were labeled No.: 1,2, ... ..., n each ball has numbers were also 1,2, ... ..., n. To the n balls are all placed in the n-basket to meet: Each basket to place a ball, the ball can not number the number of baskets with the same host, and the ball in the basket next to the ball can not be No. adjacent. For example, if two adjacent ball basket ball No. 9 and 10, respectively, it is not allowed. Please put out the ball all the way to meet the requirements (to meet the requirements for each release the ball way, should be output in each basket ball number).
(系统自动生成,下载前可以参看下载内容)
下载文件列表
篮球错排问题\array\array.cpp
............\.....\array.dsp
............\.....\array.dsw
............\.....\ReadMe.txt
............\.....\..lease\array.exe
............\.....\StdAfx.cpp
............\.....\StdAfx.h
............\Readme.txt
............\array\Release
............\array
篮球错排问题
............\.....\array.dsp
............\.....\array.dsw
............\.....\ReadMe.txt
............\.....\..lease\array.exe
............\.....\StdAfx.cpp
............\.....\StdAfx.h
............\Readme.txt
............\array\Release
............\array
篮球错排问题