-
编号为1,2,…,n的n个人按顺时针方向围坐一圈,每人持有一个密码(正整数),一开始人选一个正整数作为报数上限m,从第一个人开始按顺时针方向从自1开始顺序报数,...
编号为1,2,…,n的n个人按顺时针方向围坐一圈,每人持有一个密码(正整数),一开始人选一个正整数作为报数上限m,从第一个人开始按顺时针方向从自1开始顺序报数,报道m时停止报数。报m的人出列,将他的密码作为新的m值,从他的顺时针方向上的下一个人开始重新从1报数,如此下去,直至所有人全部出列为止,设计一个程序求出出列顺序。采用单向循环链表模拟此过程,按照出列的顺序印出各人的编号测试数据:m的初值为20;n=7,7个人的密码依次为:3,1,7,2,4,8,4,首先m的值为6(正确的出列顺序应为6,1,4,7,2,3,5)-No. 1, 2, ..., n n clockwise direction by individuals sitting around a circle, each holding a password (positive integers), a candidate started as a positive integers m ceiling on the number of reported from the first individuals to embark on the clockwise direction from the start sequence from a few newspaper reports m reportedly stopped a few. M reported out of the list of his password as a new value m, from the clockwise direction on the next re-started from a few reported so on, until all out all out, the design of a procedure sought out the order out. Listless one-cycle simulation process and follow the sequence shown in the numbers printed each test data : m for the initial 20; N = 7,7 personal passwords were : 3,1,7,2,4,8
- 2022-01-24 15:11:40下载
- 积分:1
-
清华大学第三版C语言教材习题答案
清华大学第三版C语言教材习题答案-Tsinghua University Column C language teaching answer Exercises
- 2022-04-30 23:17:21下载
- 积分:1
-
A database searching programme written by vc.I find it on internet.
用VC编写的一个数据库的搜索程序,网上找到的-A database searching programme written by vc.I find it on internet.
- 2023-02-27 22:10:03下载
- 积分:1
-
electric power admittance building program,accordind liner parameter become a li...
电力工作者常用软件,通过录入线路参数,形成导纳矩阵,用于电力潮流、仿真等基本计算-electric power admittance building program,accordind liner parameter become a linear matrix,it use for elecrtronic circuit ...etc
- 2022-04-20 09:55:15下载
- 积分:1
-
smart card
smart card 基于windows端的驱动例程,希望对智能卡驱动给大家提供一些参考-smart card-based driver-side windows routines, in the hope that the smart card driver to provide some reference
- 2022-01-28 07:03:05下载
- 积分:1
-
一个加壳工具的源码,是学习高级汇编技巧的了例子
一个加壳工具的源码,是学习高级汇编技巧的了例子-A source加壳tool is to learn advanced techniques to compile the examples
- 2022-03-23 18:54:49下载
- 积分:1
-
这是一个五子棋游戏代码,里面可以调节难度级别。
这是一个五子棋游戏代码,里面可以调节难度级别。-This is a backgammon game code, which can adjust the difficulty level.
- 2023-01-01 04:10:04下载
- 积分:1
-
一个适合delphi初学者的软件源代码,自动数字排序
一个适合delphi初学者的软件源代码,自动数字排序-Suitable for beginners delphi software source code, automatic digital sorting
- 2022-11-24 23:40:03下载
- 积分:1
-
听说过‘三子棋’游戏吗?该程序是单机版的‘三子棋’游戏。规则很简单:下子阶段,组成’三‘时,可把对方的子变为无效子(下完后该子会被去掉)。行棋阶段,组成“三”时...
听说过‘三子棋’游戏吗?该程序是单机版的‘三子棋’游戏。规则很简单:下子阶段,组成’三‘时,可把对方的子变为无效子(下完后该子会被去掉)。行棋阶段,组成“三”时,可把对方的子直接去掉。谁最先无子谁就输-heard "three-game" game? The program is stand-alone version of the "three-game" game. Very simple rules : Now phase, composed of "three", the other side can void the son son (after the son will be removed). OK chess stage and formed a "3", the other side can direct the children removed. Who is the first one without a son who will lose
- 2022-10-23 14:00:03下载
- 积分:1
-
a test messaging procedures
一个测试消息发送的程序-a test messaging procedures
- 2022-03-07 20:32:09下载
- 积分:1