文件名称:task
-
所属分类:
- 标签属性:
- 上传时间:2012-11-16
-
文件大小:684.51kb
-
已下载:0次
-
提 供 者:
-
相关连接:无下载说明:别用迅雷下载,失败请重下,重下不扣分!
介绍说明--下载内容来自于网络,使用问题请自行百度
加里森的任务
有n个加里森敢死队的队员要炸掉敌人的一个军火库,谁都不想去,队长加里森决定用轮回数数的办法来决定哪个战士去执行任务。如果前一个战士没完成任务,则要再派一个战士上去。现给每个战士编一个号,大家围坐成一圈,随便从某一个战士开始计数,当数到5时,对应的战士就去执行任务,且此战士不再参加下一轮计数。如果此战士没完成任务,再从下一个战士开始数数,被数到第5时,此战士接着去执行任务。以此类推,直到任务完成为止。
加里森本人是不愿意去的,假设加里森为1号,请你设计一程序为加里森支招,求出从第几号战士开始计数才能让加里森最后一个留下来而不去执行任务。
要求自拟1个实验实例验证程序正确性(即:n自拟)。
-Garrison s task
A n garrison of death squads players to blow up the enemy s a Arsenal, who all don t want to go, captain garrison decided to use to cycle count to decide which soldiers to perform the task. If a soldier before didn t finish the task, want to be a warrior and send up. Now give each soldier make up a number, you sit in a circle, literally from a soldier began to count, when several to 5, the corresponding warrior is to perform the task, and the warrior will no longer take part in the next round of counting. If the soldiers didn t finish the task, and from a soldier began to count down, number to the fifth, the soldiers then to perform the task. And so on, until task completion date.
Garrison himself does not want to go to is, provided garrison for 1, please design a program for the garrison court, find out what number from soldiers start counting to make garrison last to stay and not to perform the task.
Since one experiment to request an example to verify the correctn
有n个加里森敢死队的队员要炸掉敌人的一个军火库,谁都不想去,队长加里森决定用轮回数数的办法来决定哪个战士去执行任务。如果前一个战士没完成任务,则要再派一个战士上去。现给每个战士编一个号,大家围坐成一圈,随便从某一个战士开始计数,当数到5时,对应的战士就去执行任务,且此战士不再参加下一轮计数。如果此战士没完成任务,再从下一个战士开始数数,被数到第5时,此战士接着去执行任务。以此类推,直到任务完成为止。
加里森本人是不愿意去的,假设加里森为1号,请你设计一程序为加里森支招,求出从第几号战士开始计数才能让加里森最后一个留下来而不去执行任务。
要求自拟1个实验实例验证程序正确性(即:n自拟)。
-Garrison s task
A n garrison of death squads players to blow up the enemy s a Arsenal, who all don t want to go, captain garrison decided to use to cycle count to decide which soldiers to perform the task. If a soldier before didn t finish the task, want to be a warrior and send up. Now give each soldier make up a number, you sit in a circle, literally from a soldier began to count, when several to 5, the corresponding warrior is to perform the task, and the warrior will no longer take part in the next round of counting. If the soldiers didn t finish the task, and from a soldier began to count down, number to the fifth, the soldiers then to perform the task. And so on, until task completion date.
Garrison himself does not want to go to is, provided garrison for 1, please design a program for the garrison court, find out what number from soldiers start counting to make garrison last to stay and not to perform the task.
Since one experiment to request an example to verify the correctn
(系统自动生成,下载前可以参看下载内容)
下载文件列表
静态实现/Debug/改进.exe
静态实现/Debug/改进.ilk
静态实现/Debug/改进.pdb
静态实现/ipch/改进-43de60df/改进-873d65c0.ipch
静态实现/静态/Debug/cl.command.1.tlog
静态实现/静态/Debug/CL.read.1.tlog
静态实现/静态/Debug/CL.write.1.tlog
静态实现/静态/Debug/link-cvtres.read.1.tlog
静态实现/静态/Debug/link-cvtres.write.1.tlog
静态实现/静态/Debug/link.3036-cvtres.read.1.tlog
静态实现/静态/Debug/link.3036-cvtres.write.1.tlog
静态实现/静态/Debug/link.3036.read.1.tlog
静态实现/静态/Debug/link.3036.write.1.tlog
静态实现/静态/Debug/link.command.1.tlog
静态实现/静态/Debug/link.read.1.tlog
静态实现/静态/Debug/link.write.1.tlog
静态实现/静态/Debug/mt.command.1.tlog
静态实现/静态/Debug/mt.read.1.tlog
静态实现/静态/Debug/mt.write.1.tlog
静态实现/静态/Debug/rc.command.1.tlog
静态实现/静态/Debug/rc.read.1.tlog
静态实现/静态/Debug/rc.write.1.tlog
静态实现/静态/Debug/vc100.idb
静态实现/静态/Debug/vc100.pdb
静态实现/静态/Debug/改进.exe.embed.manifest
静态实现/静态/Debug/改进.exe.embed.manifest.res
静态实现/静态/Debug/改进.exe.intermediate.manifest
静态实现/静态/Debug/改进.lastbuildstate
静态实现/静态/Debug/改进.log
静态实现/静态/Debug/改进_manifest.rc
静态实现/静态/Debug/改进之.obj
静态实现/静态/改进.vcxproj
静态实现/静态/改进.vcxproj.filters
静态实现/静态/改进.vcxproj.user
静态实现/静态/改进之.cpp
静态实现/静态.sdf
静态实现/静态.sln
静态实现/静态.suo
静态实现/ipch/改进-43de60df
静态实现/静态/Debug
静态实现/Debug
静态实现/ipch
静态实现/静态
静态实现
静态实现/Debug/改进.ilk
静态实现/Debug/改进.pdb
静态实现/ipch/改进-43de60df/改进-873d65c0.ipch
静态实现/静态/Debug/cl.command.1.tlog
静态实现/静态/Debug/CL.read.1.tlog
静态实现/静态/Debug/CL.write.1.tlog
静态实现/静态/Debug/link-cvtres.read.1.tlog
静态实现/静态/Debug/link-cvtres.write.1.tlog
静态实现/静态/Debug/link.3036-cvtres.read.1.tlog
静态实现/静态/Debug/link.3036-cvtres.write.1.tlog
静态实现/静态/Debug/link.3036.read.1.tlog
静态实现/静态/Debug/link.3036.write.1.tlog
静态实现/静态/Debug/link.command.1.tlog
静态实现/静态/Debug/link.read.1.tlog
静态实现/静态/Debug/link.write.1.tlog
静态实现/静态/Debug/mt.command.1.tlog
静态实现/静态/Debug/mt.read.1.tlog
静态实现/静态/Debug/mt.write.1.tlog
静态实现/静态/Debug/rc.command.1.tlog
静态实现/静态/Debug/rc.read.1.tlog
静态实现/静态/Debug/rc.write.1.tlog
静态实现/静态/Debug/vc100.idb
静态实现/静态/Debug/vc100.pdb
静态实现/静态/Debug/改进.exe.embed.manifest
静态实现/静态/Debug/改进.exe.embed.manifest.res
静态实现/静态/Debug/改进.exe.intermediate.manifest
静态实现/静态/Debug/改进.lastbuildstate
静态实现/静态/Debug/改进.log
静态实现/静态/Debug/改进_manifest.rc
静态实现/静态/Debug/改进之.obj
静态实现/静态/改进.vcxproj
静态实现/静态/改进.vcxproj.filters
静态实现/静态/改进.vcxproj.user
静态实现/静态/改进之.cpp
静态实现/静态.sdf
静态实现/静态.sln
静态实现/静态.suo
静态实现/ipch/改进-43de60df
静态实现/静态/Debug
静态实现/Debug
静态实现/ipch
静态实现/静态
静态实现
本网站为编程资源及源代码搜集、介绍的搜索网站,版权归原作者所有! 粤ICP备11031372号
1999-2046 搜珍网 All Rights Reserved.