-
一个求解Josephus问题的函数
#include
#include
#define NULL 0
#include
typedef struct Lnode
{
int data;
struct Lnode *next;
}Josephus;
void CreateList(Josephus*&L,int n)//建立循环链表
{
int i;
Josephus *p,*s;
s=(Josephus*)malloc(sizeof(Josephus));
s->data=1;
L=p=s;
for(i=2;idata=i;
p->next=s;
p=s;
}
p->next=L;
}
void DeleteList(Josephus*&L,Josephus*p,Josephus*q)
{
q->next=p->next;
free(p);
}
void Josephus1(Josephus*&L,int s,int m)
- 2022-01-27 23:12:59下载
- 积分:1
-
keccak实现的sha3
资源描述这是用C语言实现的hash算法,sha3。这是用C语言实现的hash算法,sha3。这是用C语言实现的hash算法,sha3。这是用C语言实现的hash算法,sha3
- 2022-03-23 17:02:24下载
- 积分:1
-
hmac-sha256
应用背景此源代码文件包含一个独立的ANSI C程序没有 ;*外部依赖除了标准的ANSI C库。关键技术在苹果的操作系统上,可以通过在一个终端中执行以下命令来编译和运行。
- 2022-03-20 06:42:50下载
- 积分:1
-
计算低于平均分的学生人数
计算score中m个人的平均成绩aver,将低于aver的成绩放在below中,通过函数名返回人数。例如,当score={10,20,30,40,50,60,70,80,90},m=9时,函数返回的人数应该是4,below={10,20,30,40}
- 2022-01-26 02:30:57下载
- 积分:1
-
C语言作的四色验证1.需求分析问题描述:证明了可以用不多于4种颜色对n个区域着色,而满足相邻的区域具有不同的颜色输入形式 : 暂定最多50个区域,如需证明更多区...
C语言作的四色验证1.需求分析问题描述:证明了可以用不多于4种颜色对n个区域着色,而满足相邻的区域具有不同的颜色输入形式 : 暂定最多50个区域,如需证明更多区域,修改#define S 50 即可;以整形形式输入(取值范围1-32767)用户需要证明的区域数目,相联的一对矩阵; 输出形式:以0和1输出关联矩阵,和以blue yellow orange pink形式输出每个区域相对应证明出的颜色;-C language does four colors confirm 1. demands analyses
question description: Had proven may use not to be many to 4 kind of
colors to n region coloration, but satisfies the neighboring region to
have the different color input form: Establishes provisionally more
than 50 regions, if must prove more regions, revise#define S 50 then;
Region number (value scope 1-32767) the user needs to prove which by
the reshaping form input, unites a pair of matrix; Output form: By 0
and 1 output incidence matrixs, with form outputs the color by blue
yellow orange the pink which each region corresponds proves;
- 2022-10-20 02:35:04下载
- 积分:1
-
实现数学中的warshall算法,既完成对传递闭包的求解
实现数学中的warshall算法,既完成对传递闭包的求解-To achieve in mathematics warshall algorithm, both to complete the transitive closure of the solution
- 2022-01-21 02:39:12下载
- 积分:1
-
VB实现Floyd算法
VB实现Floyd算法-VB Floyd Algorithm
- 2022-03-03 23:22:55下载
- 积分:1
-
serial port
这个解释有点复杂和晦涩。我们的
- 2023-07-22 03:20:03下载
- 积分:1
-
数值方法上机实验内容. 自适应算法用图象实现效果.
数值方法上机实验内容. 自适应算法用图象实现效果.-numerical methods for experiments. Adaptive algorithms used images to achieve results.
- 2022-05-16 08:49:17下载
- 积分:1
-
particle filter
unlike kalman filter this filter is more suitable to deal with nonlinear data types. the source code is of omnet++ simulators. which contains a c++ file and other two files is used for network description and the general initialization files.
- 2022-01-28 02:07:30下载
- 积分:1