-
一个求解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
-
包括Pheromones Algorythm、Memory Algorythm和Hill Climbing Algorythm I,II,III在内的多个人工智...
包括Pheromones Algorythm、Memory Algorythm和Hill Climbing Algorythm I,II,III在内的多个人工智能算法的实现-including Pheromones Algorythm, Memory Algorythm and Hill Climbing Algorythm I, II, III from the number of artificial intelligence algorithms to achieve
- 2022-05-14 02:23:02下载
- 积分:1
-
快速排序! 经典的算法。 provides methods to sort a set of objects with quicksort algorithm....
快速排序! 经典的算法。 provides methods to sort a set of objects with quicksort algorithm.-rapid sequencing! The classical algorithm. Provides methods to sort a set of objects with quicksort algorithm.
- 2023-03-18 04:35:04下载
- 积分:1
-
SHA-1 Algorithm implemented in C
在我的项目中,我用C语言实现了一个SHA-1算法。我尽量使它简单易懂。输入是一个测试文件,输出是编码字符串。
- 2023-09-02 07:10:08下载
- 积分:1
-
Matrix的实例
Matrix的实例-Matrix
- 2022-04-01 02:13:52下载
- 积分:1
-
mpi并行计算的c++代码 可用vc或gcc编译通过 可以用来搭建并行计算试验环境...
mpi并行计算的c++代码 可用vc或gcc编译通过 可以用来搭建并行计算试验环境-mpi parallel computing available vc c code or compile gcc structures can be used to test parallel computing environment
- 2022-04-12 23:37:21下载
- 积分:1
-
Huffman算法
资源描述Huffman算法是相当简单的(至少在理论上),这个想法是基于这样的事实,在大多数的文件,一些字节(字符如果和你会),可能会出现更多的时间,他们其他人。
- 2022-04-27 05:43:08下载
- 积分:1
-
ELM-极限学习机
极限学习机算法,由于模式识别、非线性回归等方面。希望对您有帮助。。。。
- 2022-07-03 07:57:22下载
- 积分:1
-
vc++6.0 使用MFC实现的计算器小程序,可以执行
vc++6.0 使用MFC实现的计算器小程序,可以执行-vc++ 6.0 ??用MFC实现的 ?扑闫 ????绦????梢灾
- 2022-12-25 12:40:03下载
- 积分:1
-
看论坛上有个要钱的关于数学运算表达式的东西,之前写过一个关于数学表达式的单元,现免费发给大家了,当然因为只是临时用才写的,有些粗糙,请原谅。...
看论坛上有个要钱的关于数学运算表达式的东西,之前写过一个关于数学表达式的单元,现免费发给大家了,当然因为只是临时用才写的,有些粗糙,请原谅。-Have a look forum money on things mathematical expressions, written before the mathematical expression on the cell, is distributed free to the U.S., of course, because it is only a temporary use only written, some rough, please forgive me.
- 2022-01-30 19:04:27下载
- 积分:1