文件名称:task

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

加里森的任务

有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

........\.....\改进.ilk

........\.....\改进.pdb

........\ipch\改进-43de60df\改进-873d65c0.ipch

........\静态\Debug\CL.read.1.tlog

........\....\.....\CL.write.1.tlog

........\....\.....\link-cvtres.read.1.tlog

........\....\.....\link-cvtres.write.1.tlog

........\....\.....\link.3036-cvtres.read.1.tlog

........\....\.....\link.3036-cvtres.write.1.tlog

........\....\.....\link.3036.read.1.tlog

........\....\.....\link.3036.write.1.tlog

........\....\.....\link.read.1.tlog

........\....\.....\link.write.1.tlog

........\....\.....\mt.read.1.tlog

........\....\.....\mt.write.1.tlog

........\....\.....\rc.read.1.tlog

........\....\.....\rc.write.1.tlog

........\....\.....\vc100.idb

........\....\.....\vc100.pdb

........\....\.....\改进.exe.embed.manifest

........\....\.....\改进.exe.embed.manifest.res

........\....\.....\改进.exe.intermediate.manifest

........\....\.....\改进.lastbuildstate

........\....\.....\改进.log

........\....\.....\改进_manifest.rc

........\....\.....\改进之.obj

........\....\改进.vcxproj

........\....\改进.vcxproj.filters

........\....\改进.vcxproj.user

........\....\改进之.cpp

........\静态.sdf

........\静态.sln

........\静态.suo

........\ipch\改进-43de60df

........\静态\Debug

........\Debug

........\ipch

........\静态

静态实现

相关说明

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

相关评论

暂无评论内容.

发表评论

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

源码中国 www.ymcn.org