文件名称:5_47908
下载
别用迅雷、360浏览器下载。
如迅雷强制弹出,可右键点击选“另存为”。
失败请重下,重下不扣分。
如迅雷强制弹出,可右键点击选“另存为”。
失败请重下,重下不扣分。
介绍说明--下载内容均来自于网络,请自行研究使用
题目描述:n只猴子要选大王;
选举方法如下:所有猴子按 1,2 ……… n 编号并按照顺序围成一圈,
从第 k 个猴子起,由1开始报数,报到m时,该猴子就跳出圈外,
下一只猴子再次由1开始报数,如此循环,
直到圈内剩下一只猴子时,这只猴子就是大王。
输入数据:猴子总数n,
起始报数的猴子编号k,
出局数字m
输出数据:猴子的出队序列和猴子大王的编号-Title Descr iption: n monkeys to elect king
Elections as follows: All the monkeys by 1,2 ......... n number and the order of a circle,
From the k-th monkey, starting 1 number off, when to report m, the monkey jumped out of the loop,
Under a monkey again starting 1 reported that the number, so the cycle,
Until the remaining circle a monkey, the monkey is king.
Input Data: Total monkey n,
Reported that the number of monkeys starting number k,
Out digital m
Output data: monkey monkey king and the team sequence number
选举方法如下:所有猴子按 1,2 ……… n 编号并按照顺序围成一圈,
从第 k 个猴子起,由1开始报数,报到m时,该猴子就跳出圈外,
下一只猴子再次由1开始报数,如此循环,
直到圈内剩下一只猴子时,这只猴子就是大王。
输入数据:猴子总数n,
起始报数的猴子编号k,
出局数字m
输出数据:猴子的出队序列和猴子大王的编号-Title Descr iption: n monkeys to elect king
Elections as follows: All the monkeys by 1,2 ......... n number and the order of a circle,
From the k-th monkey, starting 1 number off, when to report m, the monkey jumped out of the loop,
Under a monkey again starting 1 reported that the number, so the cycle,
Until the remaining circle a monkey, the monkey is king.
Input Data: Total monkey n,
Reported that the number of monkeys starting number k,
Out digital m
Output data: monkey monkey king and the team sequence number
(系统自动生成,下载前可以参看下载内容)
下载文件列表
单链表的删除.cpp
单链表的插入.cpp
单链表的查找.cpp
建立单链表.cpp
猴子选王.c