文件名称:training
-
所属分类:
- 标签属性:
- 上传时间:2012-09-19
-
文件大小:1.02mb
-
已下载:0次
-
提 供 者:
-
相关连接:无下载说明:别用迅雷下载,失败请重下,重下不扣分!
介绍说明--下载内容来自于网络,使用问题请自行百度
某企业将挑选一批新员工进行培训,遵循以下规则:
将所有员工排成1个圈,从12点位置开始编号为1,逆时钟方向编号到N,第N号员工在第1号的左手边
两位培训官开始选择员工,培训官甲从1号开始逆时钟方向数,数到第k号员工停下;培训官乙从N号开始顺时钟方向数,数到第m号员工停下
被选中的第k号和第m号员工不是同一人,两人同时送往制造培训
被选中的第k号和第m号员工是同一人,将一人送往检测培训
接着继续往下数,培训官甲同样数到k就停止,培训官乙同样数到m就停止,重复上述的选择
输入
在一行输入一个3个整数n、k、m,3个参数互不相等,6<n<100,1<k<10,1<m<10,
分别表示n个员工,培训官甲每次数k个,培训官乙每次数m个,
输出
请用队列实现上述选择,并按选择顺序每行分别输出先甲后乙的选择结果-A enterprise will choose a batch of new staff training, follow the following rules: Will all employees lined up in a circle, from 12 o clock position began to Numbers for 1, counter-clockwise direction Numbers to N, N th staff in the no. 1 on the left hand side Two training officer begin to choose employees, training officer from a first counter-clockwise direction number, number to the first k, staff stop Training officer b, beginning the clock from N direction number, number to the first m employees, stop Of the selected the first k number and the first m workers are not the same number, two men also sent to manufacture training Of the selected the first k number and the first m, is the same person employees, will be a man sent to test training Then continue to count, training the same number to k a stop, training officer b also count to m stops, and repeat the choice input In a line of input a three integer n, k, m, three parameters are equal, 6 < n < 100, 1 < < < 1
将所有员工排成1个圈,从12点位置开始编号为1,逆时钟方向编号到N,第N号员工在第1号的左手边
两位培训官开始选择员工,培训官甲从1号开始逆时钟方向数,数到第k号员工停下;培训官乙从N号开始顺时钟方向数,数到第m号员工停下
被选中的第k号和第m号员工不是同一人,两人同时送往制造培训
被选中的第k号和第m号员工是同一人,将一人送往检测培训
接着继续往下数,培训官甲同样数到k就停止,培训官乙同样数到m就停止,重复上述的选择
输入
在一行输入一个3个整数n、k、m,3个参数互不相等,6<n<100,1<k<10,1<m<10,
分别表示n个员工,培训官甲每次数k个,培训官乙每次数m个,
输出
请用队列实现上述选择,并按选择顺序每行分别输出先甲后乙的选择结果-A enterprise will choose a batch of new staff training, follow the following rules: Will all employees lined up in a circle, from 12 o clock position began to Numbers for 1, counter-clockwise direction Numbers to N, N th staff in the no. 1 on the left hand side Two training officer begin to choose employees, training officer from a first counter-clockwise direction number, number to the first k, staff stop Training officer b, beginning the clock from N direction number, number to the first m employees, stop Of the selected the first k number and the first m workers are not the same number, two men also sent to manufacture training Of the selected the first k number and the first m, is the same person employees, will be a man sent to test training Then continue to count, training the same number to k a stop, training officer b also count to m stops, and repeat the choice input In a line of input a three integer n, k, m, three parameters are equal, 6 < n < 100, 1 < < < 1
(系统自动生成,下载前可以参看下载内容)
下载文件列表
training/Debug/training.exe
training/Debug/training.ilk
training/Debug/training.obj
training/Debug/training.pch
training/Debug/training.pdb
training/Debug/vc60.idb
training/Debug/vc60.pdb
training/training.cpp
training/training.dsp
training/training.dsw
training/training.ncb
training/training.opt
training/training.plg
training/Debug
training
training/Debug/training.ilk
training/Debug/training.obj
training/Debug/training.pch
training/Debug/training.pdb
training/Debug/vc60.idb
training/Debug/vc60.pdb
training/training.cpp
training/training.dsp
training/training.dsw
training/training.ncb
training/training.opt
training/training.plg
training/Debug
training
本网站为编程资源及源代码搜集、介绍的搜索网站,版权归原作者所有! 粤ICP备11031372号
1999-2046 搜珍网 All Rights Reserved.