-
a description of the problem is : No. 1, 2, ..., n n clockwise direction by indi...
约瑟夫问题的一种描述是:编号为1,2,…,n的n个人按顺时针方向围坐一圈,没人持有一个密码。一开始人选一个正整数作为报数上限值m,从第一个人开始按顺时针自1开始报数,报到m是停止报数。报m的人出列,将他的密码作为新的m值,从他在顺时针方向上的下一个人开始重新从1报数,如此下去,直至所有人全部出列为止。-a description of the problem is : No. 1, 2, ..., n n clockwise direction by individuals sitting around a circle, no one holding a password. One person started as a positive integer limits on the number of reported m, from the first individuals to embark on the clockwise from a few reportedly started, the report m is reportedly stopped a few. M reported out of the list of his password as a new value m, from a clockwise direction in the next re-started from a newspaper a few, like that, until the total of all listed so far.
- 2022-02-03 16:31:48下载
- 积分:1
-
图的关节点
使用:
首先,输入结点名称,最好以单个字母表示。然后,根据输入的名称顺序,在输入0或1,分别表示点点未连,点点相连。最后任意输入1个已有点的名称,程序开始正常运行。
结果:
以邻接链表的形式展示已输入的图,同时给出关节点的名称,或关节点不存在
- 2022-05-17 11:10:27下载
- 积分:1
-
快速 RSA 密码体制实现使用中国剩余定理
/ / RSATestFast: 测试快速 RSA 实现
导入 java.math.* ; / / 为 BigInteger
导入 java.util.* ; / / 为随机
公共类 RSATestFast {
公共静态 void elapsedTime (长开始时间) {
长时间停止时间 = System.currentTimeMillis() ;
双 elapsedTime = ((双)(stopTime-startTime)) / 1000.0 ;
System.out.println ("已用时间:"+ elapsedTime +"秒") ;
}
公共静态 void main (字符串 [] args) {
随机 rnd = 新 Random() ;
BigInteger m、 m1、 m2、 m3、 c、 s,s1 ;
RSAPrivateKeyFast 爱丽丝 = 新 RSAPrivateKeyFast (1024,rnd,"爱丽丝") ;
RSAPrivateKeyFast bob = 新 RSAPrivateKeyFast (1024,rnd,"鲍勃 ") ;
m = 新 BigInteger (
"1234567890987654321012345678909876543210"+
"1234567890987654321012345678909876543210"+
"1234567890987654321012345678909876543210"+
"1234567890987654321012345678909876543210"+
"1234567890987654321012345678909876543210"+
"1234567890987654321012345678909876543210") ;
System.out.println
- 2022-05-29 11:03:37下载
- 积分:1
-
计算几何书籍中的Fortran代码,对学习计算几何有一定参考价值...
计算几何书籍中的Fortran代码,对学习计算几何有一定参考价值-computer geometry
- 2022-01-25 16:26:41下载
- 积分:1
-
matlab编写的数值计算程序,用于数学实验方面
matlab编写的数值计算程序,用于数学实验方面-Matlab prepared by the numerical calculation program for math experiments
- 2022-01-26 14:59:23下载
- 积分:1
-
Shortest Path
资源描述Write a program to find the weighted shortest distances from any vertex to a given source vertex in a digraph. If there is more than one minimum path from v to w, a path with the fewest number of edges is chosen. It is guaranteed that all the weights are positive and such a path is unique for any vertex.
- 2022-08-26 06:49:00下载
- 积分:1
-
经典的Ad Hoc路由协议
这是一个经典的路由协议的代码,在ns-2仿真实验证明了协议的有效性。直接借鉴本代码,可以写出好的协议程序。对NS-2的初学者,有很大的帮助。
- 2022-05-06 17:08:47下载
- 积分:1
-
野人和传教士的算法
这是一个算法来解决问题的野蛮人和传道人,这是用Cpp 语言写的。
- 2022-03-11 00:57:02下载
- 积分:1
-
ODE Numericla Methods for Heat
ODE Numericla Methods for Heat
- 2022-05-07 01:49:58下载
- 积分:1
-
在MATLAB环境下进行各种曲线拟合算法,…
在matlab环境下能进行各种曲线拟合的算法,非常好。-In the matlab environment to conduct various kinds of curve fitting algorithms, very good.
- 2022-05-22 17:14:18下载
- 积分:1