搜索资源列表
all-permutation
- 对n个数进行全排列,很实用快捷的算法,可以交流交流-The number n of the whole arrangement, very practical and efficient algorithms that can exchange exchanges
yinzifenjie
- //题目2: 益智游戏 //时间限制 : 20000ms //单点时限 : 1000ms //内存限制 : 256MB //描述 //幽香今天心情不错,正在和花田里的虫子玩一个益智游戏。 //这个游戏是这样的,对于一个数组A,幽香从A中选择一个数a,虫子从A中选择一个数b。a和b可以相同。她们的分数是a*b的因子的个数。 //幽香和虫子当然想要获得尽可能的高的分数,你能告诉她们应该选择哪两个数吗。 //由
random
- c语言实现0至n范围内随机取n个数,并且所区的数不重复,简单方便,亲测有效-c language n the number of randomly selected within the range of 0 to n, and the number of the area will not be repeated, simple, effective pro-test
RoundTableGame
- 输入圆桌边坐的人数M,每数N个数退出一人,可得到最后留下来人的号码。-Round table game,getting the number of the last one
POJ3273
- POJ3273 Monthly Expense题解 题目分析: 给出N个数,要求你合并连续的数,使其合并在满足不差过M个合并后的集合的时候,不超过M个集合的和的最大值最小。-Farmer John is an astounding accounting wizard and has realized he might run out of money to run the farm. He has already calcula
N-Queens
- 优化的N皇后算法,输入皇后的个数N,输出三个解,算法的时间复杂度为O(nlgn)-Optimized N queens algorithm, enter the number of the Queen N, output three solutions, the time complexity of the algorithm is O (nlgn)
2
- 在n*n的棋盘上(1<=n<=10)填入1、2、3、….、n*n,共有n*n个数,使得任意相邻数的和为素数。 输入:n 输出:若有多个解,则需输出第一行、第一列之和均为最小的排列方案;若无解,则输出‘no’。-On board n* n (1 <= n <= 10) filled with 1,2,3, ...., N* n, a total number of n* n, so that any adj
data105
- 将N(1< = N < = 200000)个整数小到大连续编号,相同的数应具有相同的编号。并按这N个数输入时的顺序输出它们的编号序列。例如,设输入数据为 5 3 4 7 3 5 6,则输出数据为3 1 2 5 1 3 4。-The N (1 < = N < = 200000) months consecutive integer number of small to large, the same number shou
Orderedtree
- 输入整数n,输出n个数组成的排列树的组合。-Enter integer n, output n number of trees formed a combination arrangement.
Garisons-mission
- 1.需求分析 本题要求循环数数,数到某一个数之后将其排除并从下一个开始重新开始数数,直到剩下一个人为止,要求剩下的人标号为1。我组有两份代码,第一个程序中,输入n值,并数的数至多为3p(p为前n个数最小公倍数,3p为了能够找到规律,n>=7时由于最小周期过大在下面的表格中不便列举),将每种可能的x,y值分组罗列出来,并试图从中找出规律,一旦规律出现,那么我们可以随意举一个符合规律的其他例子来进行验证(验证代码为另一份,而且验证
sn=nPnn
- 求n个数相加,可定义a的值定义方式为2 3,表示求3次递增2相加-Find the sum of the number n, define the value of a defined way to 23, which means that demand three times the sum of incremental 2
Joseph
- 解决约瑟夫问题:输入N个数,从第n个数开始,每过i个数输出一个数,最后得到N个数的输出顺序-Joseph problems to solve: the number of N input the first number n, every i-th output over a number finally get the output sequence number N
Comb
- 从n个数中取m个数的的排列数和组合数。 取出方式多样,可放回,也可不放回。 -compute the permutation and combination numbers of taking m numbers n numbers.
AP-Clustering-Algorithms
- Affinity Propagation (AP) 聚类是2007年在Science杂志上提出的一种新的聚类算法。它根据N个数据点之间的相似度进行聚类,这些相似度可以是对称的,即两个数据点互相之间的相似度一样(如欧氏距离) 也可以是不对称的,即两个数据点互相之间的相似度不等。-Affinity Propagation (AP) Clustering is a new clustering algorithm in 2007 in Sci
find-n-and-statistics-the-number
- 在一段字符串当中找到字母n,并统计它的个数-Find n in the words,and calculate the number it has occured.
PINGFANGHE
- LABVIEW利用递归调用方法,实现对N个数求平方和的运算-Recursive calls, the number of squares and achieve N
s2
- 设数组A中存放互不相同的n个整数,试编写算法, 输出从这n个数中取出k个数的所有组合(0<k< n)。-A set stored in the array of n integers different each other, try to write the algorithm, the output the number n Remove all combinations of the number k (0 &
quick-topK
- 使用快速排序法处理TOPK问题,就是有N个数,找出前K个,使用快速排序法,可以避免大量排序操作。测试通过。-Processing TOPK problem using quick sort, that is, there are N number, find out before the K, using quick sort, to avoid a large number of sort operations. Test.
Fibonacci-sequence
- 斐波那契数列指的是这样一个数列:1、1、2、3、5、8、13、21、34…… 这个数列从第三项开始,每一项都等于前两项之和。 给出一个正整数n,要求菲波那契数列中第n个数是多少。 - Fibonacci sequence refers to such a series: 1,1,2,3,5,8,13,21,34 ...... This sequence begins with the third term
Monkey-king-election
- 【问题描述】 一堆猴子都有编号,编号是1,2,3 ...m ,这群猴子(m个)按照1 m的顺序围坐一圈,从第1开始数,每数到第N个,该猴子就要离开此圈,这样依次下来,直到圈中只剩下最后一只猴子,则该猴子为大王。 【基本要求】 输入数据:输入m,n。m,n 为整数,n<m; 输出形式:中文提示按照m个猴子,数n个数的方法,输出为大王的猴子是几号,建立一个函数来实现此功能。-[Problem Descr iption]