文件名称:training

介绍说明--下载内容均来自于网络,请自行研究使用

某企业将挑选一批新员工进行培训,遵循以下规则:

将所有员工排成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.ilk

........\.....\training.obj

........\.....\training.pch

........\.....\training.pdb

........\.....\vc60.idb

........\.....\vc60.pdb

........\training.cpp

........\training.dsp

........\training.dsw

........\training.ncb

........\training.opt

........\training.plg

........\Debug

training

相关说明

  • 本站资源为会员上传分享交流与学习,如有侵犯您的权益,请联系我们删除.
  • 本站是交换下载平台,提供交流渠道,下载内容来自于网络,除下载问题外,其它问题请自行百度更多...
  • 请直接用浏览器下载本站内容,不要使用迅雷之类的下载软件,用WinRAR最新版进行解压.
  • 如果您发现内容无法下载,请稍后再次尝试;或者到消费记录里找到下载记录反馈给我们.
  • 下载后发现下载的内容跟说明不相乎,请到消费记录里找到下载记录反馈给我们,经确认后退回积分.
  • 如下载前有疑问,可以通过点击"提供者"的名字,查看对方的联系方式,联系对方咨询.

相关评论

暂无评论内容.

发表评论

*主  题:
*内  容:
*验 证 码:

源码中国 www.ymcn.org