文件名称:8
介绍说明--下载内容均来自于网络,请自行研究使用
1 电话薄排序 2 猴子选大王 n只猴子围成一圈,从1到n顺序编号。从第q只猴子开始,从1到m报数,凡报到m的猴子退出竞选,下一次又从退出的那只猴子的下一只开始从1到m报数,直至剩下的最后一只为大王。请问最后哪只猴子被选为大王。-A phone book sorting n 2 election monkey king monkey circle, sequentially numbered from 1 to n. Q monkeys from the beginning, the reported number from 1 to m, where m monkeys report withdraw from the race, the next exit and from under the monkey' s a start number from 1 to m reported until the last one remaining for the king. Will the last of which was elected king monkeys.
(系统自动生成,下载前可以参看下载内容)
下载文件列表
p3.c
p4.c