Majo1

所属分类:数值算法/人工智能
开发工具:Visual C++
文件大小:1KB
下载次数:1
上传日期:2013-09-07 17:24:36
上 传 者mfkghdqmyy
说明:  给定含有n 个元素的多重集合S = { a1,a2 ,……,an} ,1≤ai≤n,1≤i≤n。 每个元素在S中出现的次数称为该元素的重数 多重集S中重数大于n/2 的元素称为主元素 设计一个O(n)时间算法,计算S 的主元素
(Given the multiple of n elements containing the set S = {a1, a2, ......, an}, 1 ≤ ai ≤ n, 1 ≤ i ≤ n. Each element in S is called the number of occurrences of the element multiplicity of heavy multi-set S is greater than n/2 elements is called the primary element design an O (n) time algorithm to calculate the main elements of S)

文件列表:
Majo1.cpp (956, 2006-10-13)

近期下载者

相关文件


收藏者