搜索资源列表
2.2
- 2.2 有n个整数,使其前面各数顺序向后移m个位置,最后m个数变成最前面m个数。写一函数实现以上功能,在主函数中输入n个整数,并输出调整后n个数。-2.2 n integers, make it the previous number of the order of backward m position last m the number into the top of m number. Write a function to ac
RPermutatione
- 用递归方法求n个数的无重复全排列!!感觉还可以吧,所以拿拿出来大家一起分享了!一起努力学习!,已通过测试。 -Recursive method of n number of repeat full array!! Can also feel it, so get out to share with everyone! Work together to learn! , Has been tested.
code
- 从n个数中取出m个数的所有排列组合,从n个数中取出m个数的所有排列组合-The number of take out from the n the number of m all the permutation and combination
MonkeyKing
- 一堆猴子都有编号,编号是1,2,3,……m,这群猴子(m个)按照1-m的顺序围坐一圈,从第1开始数,每数到第N个,该猴子就要离开此圈,这样依次下来,直到圈中只剩下最后一只猴子,则该猴子为大王。 基本要求: 输入数据:输入m,n, m,n为整数。 输出形式:中文提示按照m个猴子,数n个数的方法,输出为大王的猴子是几号,建立一个函数来实现此功能。 -Monkey king
Magic-square
- 魔方阵 (1).设n是奇数,请编写程序构造n*n阶魔方阵,即行、列、两对角线上n个数之和相等的方阵。 (2).构造3*3素数魔方阵,即找出9个不大于500的素数并排成魔方阵。 -Magic square (1) n is an odd number, please write a program to construct n* n-order magic square that line, column the two di
prog
- 最大间隙问题:给定n 个实数x , x , , xn 1 2 ,求这n 个数在实轴上相邻2 个数之间的最 大差值。假设对任何实数的下取整函数耗时O(1),设计解最大间隙问题的线性时间算法。-The maximum gap problem: given n real numbers x, x, xn 1 2 , seeking the n numbers adjacent to the maximum
mp
- /*冒泡排序-----从大到小 *前一个和后一个两两比较,若小于则交换,直到最后一个元素,即小的冒泡,大的下沉 *每一循环都会从待排序的数中找出一个最小值,排到这组数据的最末端或首段,即冒泡 *对于n个数冒泡排序的最大趟数是n - 1,每一趟排序都会在这组待排序的数中产生一个最小值, */-/* Bubble sort----- from largest to smallest* before and after a t
1
- 猴子选大王 任务:一堆猴子都有编号,编号是1,2,3 ...m ,这群猴子(m个)按照1--m的顺序围坐一圈,从第1开始数,每数到第N个,该猴子就要离开此圈,这样依次下来,直到圈中只剩下最后一只猴子,则该猴子为大王。 要求: 输入数据:输入m,n。 m,n 为整数,n<m 输出形式:中文提示按照m个猴子,数n 个数的方法,输出为大王的猴子是几号 ,建立一个函数来实现此功能 -The monkey kin
Suffix-array
- arr[]为数据数列,即这个串.如果有n个数,存为arr[0]~arr[n-1],并且保证每个数大于0,小于ASCII。 调用参数前,设置:arr[n]=0,n++ 这样得出的sa[]数列:sa[0]肯定等于n,即排名为0的是第n个打头的后缀串,这个是我们加上去的,是无用的。 sa[1]才表示真正的串中排名为1(即第一)的串在arr[]中的起始位置 rank[i]=j数列:以第i个打头的串排名为j,可知,rank[n]
data19
- 一个在n个数中求m个数的组合问题,题中给出了运行时间-M n numbers and number combinations, the running time is given in the title
Insertion-sort
- c 语言中用于对输入的N个数利用插入法进行排序。-c language
apcluster
- AP聚类算法:Affinity Propagation (AP) 聚类是最近在Science杂志上提出的一种新的聚类算法。-Affinity Propagation (AP) 聚类是最近在Science杂志上提出的一种新的聚类算法。它根据N个数据点之间的相似度进行聚类,这些相似度可以是对称的,即两个数据点互相之间的相似度一样(如欧氏距离) 也可以是不对称的,即两个数据点互相之间的相似度不等。这些相似度组成N×N的相似度矩阵S(其中N为有
linear-regression
- 对n个数据点(xi,yi),i=0,1,...,n-1用直线y=ax+ b做回归分析~ -The number of n stronghold (xi, yi), I = 0, 1,... , n- 1 in a straight line y = ax+ b do regression analysis ~
TheMaxfourNumbers
- n个数的 连续m个数的最大字段和,简单易用的c++程序
poly
- 标题: 多边形游戏 时 限: 1000 ms 内存限制: 10000 K 总时限: 3000 ms 描述: 多边形游戏是一个单人玩的游戏,开始时有一个由n个顶点构成的多边形。每个顶点被赋予一个整数值,每条边被赋予一个运算符“+”或“*”。所有边依次用整数从1到n编号。 游戏第1步,将一条边删除。 随后n-1步按以下方式操作: (1)选择一条边E以及由E连接着的
13-Subset-and-Number
- 问题陈述:给定N个数,和一个数T,判定是否可以从N个数中取出若干个数,使它们的和等于T。输出:YES或者NO。把N个数看成一个集合,问题就是从这个集合中选出一个子集,使这个子集满足和是T-Problem Statement: a given number N, and a number of T, and determines whether or not can be removed from the number N of a ce
InsertNum
- 本程序实现向两个数之间平均插入n个数, 做音视频转换采样率的朋友用得到-The program to an average insert between the two numbers n number of friends to do the sampling rate of audio and video converter with a get
11
- 有N个数已按由小到大的顺序排好,要求输入一个数,把它插入到原有序列中,而且仍然保持有序。-N number has been lined up from small to large order and asked to enter a number, it is inserted into the original sequence, and remains orderly.
13
- 输入N个数到数组中,输出所有大于N个数平均值的数-Input N numbers into an array, the output of all the number is greater than the average of N numbers
pointer
- 有n个数,使前面个数顺序向后移m个位置,最后m个数变成最前面m个数。-There are n Numbers, make the front number order back ward m position, finally m m number number into the front