-
一个求解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
-
Goertzel基本算法在每次采样后立即进行处理,在每个第N次采样进行一次音调检测。在采用FFT算法时,我们要对成块的采样进行处理,但这并不意味着必须按块来处理...
Goertzel基本算法在每次采样后立即进行处理,在每个第N次采样进行一次音调检测。在采用FFT算法时,我们要对成块的采样进行处理,但这并不意味着必须按块来处理数据。数字处理的时间很短,因此如果每次采样都存在一次中断,那么这些数字处理完全可以在中断服务程序(ISR)内完成。或者,如果系统中存在采样缓存,那么可以持续采样,然后进行批处理。-Goertzel basic algorithms in each sample immediately after processing, in each of the first N sub-samples to conduct a tone detection. In the use of FFT algorithms, we would like to be processed into a block of samples, but this does not mean that must block processing the data. Digital processing time is very short, so if an interrupt for each sample are present, then the digital processing is fully able to interrupt service routine (ISR) to complete. Or, if the system exists in sample buffer, you can continue to sample, and then batch.
- 2022-05-27 11:46:36下载
- 积分:1
-
相位编组提取直线(matlab)
相位编组提取直线(matlab)
- 2022-04-01 22:48:47下载
- 积分:1
-
计算典型相关算法,求出最大投影向量,以及最大投影向量对应的相关系数...
计算典型相关算法,求出最大投影向量,以及最大投影向量对应的相关系数
-calculate canonical correlations, find the largest correlation coefficients
- 2022-04-21 17:37:45下载
- 积分:1
-
汇编语言扩容电路图
可以实现8*8 扩容到8* 16K,电路图简单明了。一看看就会,初学者可以尝试编写自己的程序
- 2022-12-02 16:00:03下载
- 积分:1
-
直接访问文件
为实现使用哈希技术的直接访问文件的程序。碰撞处理采用线性探测和链接没有更换。[散列函数 = (record_id mod 10)]
- 2023-03-29 00:50:04下载
- 积分:1
-
这是一个矩阵求解
this is a matrix solve
- 2022-02-06 12:13:18下载
- 积分:1
-
抛物线法求一维函数的极值
!抛物线法求一维函数的极值,要保证输入的x1
- 2022-03-23 08:41:08下载
- 积分:1
-
Hidden Markov classic algorithms, as well as generic algorithms, linux environme...
隐MARKOV经典算法,也是通用算法,linux环境,可以移植到windows-Hidden Markov classic algorithms, as well as generic algorithms, linux environment, can be transferred to the windows
- 2023-01-16 17:00:04下载
- 积分:1
-
我们的作业 计算方法里面的牛顿切线法求根,(单根情况)。...
我们的作业 计算方法里面的牛顿切线法求根,(单根情况)。-our operations inside the calculation method Newton tangent Root, (single).
- 2022-09-13 08:15:03下载
- 积分:1