-
设有n个人围做一圈,现从某个人开始报数,数到m的人出列,接着从出列的下一个人开始重新报数,数到m的人又出列,如此下去,直到所有人都出列为止。运用循环单链表解决约...
设有n个人围做一圈,现从某个人开始报数,数到m的人出列,接着从出列的下一个人开始重新报数,数到m的人又出列,如此下去,直到所有人都出列为止。运用循环单链表解决约瑟夫环问题。- Is equipped with n personally to encircle makes, presently
starts from some person to count off, leaves ranks the number to the m
person, meets from the next person which leaves ranks is starting reto
count off, leaves ranks the number to the m person, continue like
this, all leaves ranks until all people. Using circulates Shan
Lianbiao to solve the Joseph link problem.
- 2022-02-26 00:46:58下载
- 积分:1
-
基于mpi的矩阵相乘的并行算法
使用MPI做并行计算时,根据程序的具体要求,可按任务进行分配或数据进行分配。根据矩阵乘积的特点,这里按数据进行分配,即每个计算机节点计算不同的数据,由于矩阵数据的特点,这里按行进行数据分块。矩阵乘法在于对矩阵进行分块,然后交由各进程执行,最后将计算结果传递给主进程。
假设是M*N,计算前,将矩阵N发送给所有从进程,然后将矩阵M分块,将M中数据按行分给各从进程,在从进程中计算M中部分行数据和N的乘积,最后将结果发送给主进程。这里为了方便,有多少进程,就将M分了多少块,除最后一块外的其他数据块大小都相等,最后一块是剩下的数据,大小大于等于其他数据块大小,因为矩阵行数不一定整除进程数。最后一块数据在主进程中计算,其他的在从进程中计算。
- 2023-03-04 12:35:03下载
- 积分:1
-
Turbo Code simulator
用于仿真的源代码和说明文件。
Turbo Code simulator
用于仿真的源代码和说明文件。-Turbo Code simulator for the simulation of the source code and documentation.
- 2023-04-20 08:25:03下载
- 积分:1
-
数字滤波算法; 中间位置算法 算术平均值算法
数字滤波算法; 中间位置算法 算术平均值算法--middle value algorithm, medimum value algorithm.
- 2022-04-12 20:37:43下载
- 积分:1
-
not extract passwords AHP process
没有解压密码的AHP程序-not extract passwords AHP process
- 2022-11-17 01:15:03下载
- 积分:1
-
Bayesian classifier C source code, using IRIS category for example, easily under...
贝叶斯分类器的C++源码,用IRIS作类例子,通俗易懂,适合作模式识别、图像处理研究开发用!-Bayesian classifier C source code, using IRIS category for example, easily understood and suitable for pattern recognition, Image processing research and development with!
- 2022-01-23 10:59:10下载
- 积分:1
-
一个最基本的二维传热有限元计算程序,适合初学者参考
一个最基本的二维传热有限元计算程序,适合初学者参考-A basic two-dimensional heat transfer finite element program, suitable for beginners reference
- 2022-02-06 10:15:01下载
- 积分:1
-
数值转人民币的程序c代码
数值转人民币的程序c代码-yuan to the numerical procedure code c
- 2022-01-27 14:29:18下载
- 积分:1
-
求解非线性方程组的一个高效算法,用FORTRAN实现.
求解非线性方程组的一个高效算法,用FORTRAN实现.-Solving nonlinear equations of an efficient algorithm, using FORTRAN realize.
- 2022-04-24 00:12:44下载
- 积分:1
-
一个求解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