联合开发网   搜索   要求与建议
                登陆    注册
排序按匹配   按投票   按下载次数   按上传日期
按分类查找All 数学计算(12) 
按平台查找All C/C++(12) 

[数学计算] 17088 分治法求众数

给定含有n个元素的多重集合S,每个元素在S中出现的次数称为该元素的重数。多重集S中重数最大的元素称为 众数。例如,S={1,2,2,2,3,5}。多重集S的众数是2,其重数为3。 求众数方法很多,现要求你用分治算法来试一试,并分析其效率。 编程任务:对于给定的由n个自然数组成的多重集S,采用分治算法编程计算S的众数及其重数。 输入格式 第1行多重集S中元素个数n;接下来的一行为集合S,有n个自然数。( n < 100000 ) 输出格式 结果输出:输出2个数,第1个数为众数,第2个为其重数。 当有多个同样重数的众数,优先输出数值更小的众数。 输入样例 6 1 2 2 2 3 5 输出样例 2 3
Given a multiple set S containing n elements, the number of occurrences of each element in S is called the multiplicity of that element. The element with the largest number in the multiple set S is called the mode number. For example, S={1, 2, 2, 2, 3, 5}. The multiple set S has a modulus of 2 and a multiplicity of 3. There are many ways to find the mode number. Now you need to try the divide and conquer algorithm and analyze its efficiency. Programming tasks: For a given multiple set S consisting of n natural numbers, divide and conquer algorithm is used to program and calculate the modulus and multiplicity of S. (2019-01-07, C/C++, 7043KB, 下载0次)

http://www.pudn.com/Download/item/id/1546876153588514.html

[数学计算] 17088 分治法求众数(备忘录)

17088 分治法求众数(必做) 时间限制:1000MS 内存限制:65535K 提交次数:0 通过次数:0 题型: 编程题 语言: G++ GCC VC JAVA Description 给定含有n个元素的多重集合S,每个元素在S中出现的次数称为该元素的重数。多重集S中重数最大的元素称为 众数。例如,S={1,2,2,2,3,5}。多重集S的众数是2,其重数为3。 求众数方法很多,现要求你用分治算法来试一试,并分析其效率。 编程任务:对于给定的由n个自然数组成的多重集S,采用分治算法编程计算S的众数及其重数。 输入格式 第1行多重集S中元素个数n;接下来的一行为集合S,有n个自然数。( n < 100000 ) 输出格式 结果输出:输出2个数,第1个数为众数,第2个为其重数。 当有多个同样重数的众数,优先输出数值更小的众数。 输入样例 6 1 2 2 2 3 5 输出样例 2 3
(17088 divide and conquer method the modal number (will do) Time limit: 1000MS Memory Limit: 65535K Submit: 0 Passes: 0 Questions: Programming language title: G++ GCC VC JAVA Description Given n elements containing multiple set S, the number of each element appears in the S called the multiplicity of the element. Multiple sets the maximum number of S in heavy elements called Plural. For example, S = {1,2,2,2,3,5}. Majority of multiple sets of S is 2, its weight is three. Many seek the mode method, you are now required to use the divide and conquer algorithm to try and analyze their efficiency. Programming tasks: for a given by n natural numbers consisting of multiple sets S, using all programmed to calculate the number of divide and conquer algorithm S and multiplicity. Input format The first line multi-set number of elements in S n an act the next set S, there is a natural number n. (N <100000) Output Format Results output: 2 number, the first number ) (2019-01-07, C/C++, 14KB, 下载1次)

http://www.pudn.com/Download/item/id/1546875858709581.html

[数学计算] fk

1.分别写出下列函数的递归算法和迭代算法,并求出n=10时的函数值。  Fib(n)= n 当n=0或n=1 Fib(n-2)+Fib(n-1) 当n³ 2 2. 假设以带头结点的循环链表表示队列,并且只设一个指针指向队尾元素结点而不设头指针,试编写相应的队列初始化、入队列、出队列和判断队列状态的算法。  利用上述算法完成下面的各操作,并在每一操作后输出队列状态。  1)下列元素逐一入队:5,7,3,8,55 状态:5个元素  2)3个元素出队    状态:2个元素 3)再2个元素出队  状态:队空  4)再1个元素出队  状态:队空(指示下溢)
1, respectively, to write the following function recursive algorithms and iterative algorithms and function values ​ ​ obtained when n = 10. Fib (n) = n when n = 0 or n = 1 fib (n-2)+Fib (n-1) when n2 2. Assumed to take the lead in the circular list of the node that queue, and set a pointer to a team only tail element nodes without head pointer, try to write the queue initialization into the queue, a queue and to determine queue status algorithm. Using the algorithm described above to complete the following operations, after each operation, the output queue status. 1) each of the following elements into the team: 5,7,3,8,55 status: 2) three elements of the five elements dequeue state: 3) two elements dequeue state of two elements: team empty 4) and then 1 elements dequeue status: Team empty (indicating underflow) (2012-11-05, C/C++, 50KB, 下载6次)

http://www.pudn.com/Download/item/id/2037586.html

[数学计算] fuhaopipei

假设一个算术表达式中可包含如下符号:“()”、“[]”、“{}”、 “/* */”可按任务次序嵌套使用,试利用栈的运算编写判别表达式中符号是否正确配对出现的算法
Assume that an arithmetic expression can contain the following symbols: () " " [] " ," {} " ," /**/" task order can be nested test prepared by the operator of the stack to distinguish expression symbols correctly paired appear algorithm (2012-08-05, C/C++, 986KB, 下载4次)

http://www.pudn.com/Download/item/id/1957489.html

[数学计算] NumericalAnalysisReport

数值分析的实验报告,很完整的,希望对大家有用~ 课题一: 线性方程组的迭代法 一、实验内容 二、实验要求 1、体会迭代法求解线性方程组,并能与消去法做以比较; 2、分别对不同精度要求,如 由迭代次数体会该迭代法的收敛快慢; 3、对方程组2,3使用SOR方法时,选取松弛因子 =0.8,0.9,1,1.1,1.2等,试看对算法收敛性的影响,并能找出你所选用的松弛因子的最佳者; 4、给出各种算法的设计程序和计算结果。 课题二:数值积分 一、实验内容 (4) I = 二、实验要求 1、 编制数值积分算法的程序; 2、 分别用两种算法计算同一个积分,并比较其结果; 3、 分别取不同步长 ,试比较计算结果(如n = 10, 20等); 4、 给定精度要求 ,试用变步长算法,确定最佳步长。 三、目的和意义
One issue: the iteration of linear equations First, the experimental contents Second, the requirement of experiment 1, realize iterative method for solving linear equations, and can do to compare with the elimination 2, respectively, for different precision requirements, such as experience by the number of iterations the speed of the iterative methods 3, 2,3 use of the equations SOR method, the selection of the relaxation factor = 0.8,0.9,1,1.1,1.2, etc. Just look at the convergence of the algorithm Of impact, and can find you the best relaxation factor chosen were 4, given the design of algorithms and calculation procedures. Issue 2: Numerical Integration First, the experimental contents (4) I = Second, the requirement of experiment 1, the procedures for the preparation of numerical integration algorithm 2, two algorithms were used to calculate the same points, and to compare their results 3, were taken out of sync length, compare the results (eg, n = (2010-09-01, C/C++, 308KB, 下载27次)

http://www.pudn.com/Download/item/id/1285901.html

[数学计算] firepoint

交 汇 的 火 力 小姜正在玩CS,喜欢思考的他看到无数子弹从他眼前飞过时想到了一个奇怪的问题:这么多子弹在空中飞来飞去,难道它们不会相撞吗?当然这是可能的。小姜把两颗子弹轨迹相交的地方叫做“火力汇点”,显然如果让敌人站在火力汇点上那么他将受到更严重的伤害。小姜想知道平面上的所有火力汇点以便对敌人造成更重的打击,但是小姜数学很差,所以他找到了你,请你帮他计算出平面上所有火力汇点的坐标。小姜用直线来描述子弹的轨迹,这种子弹很特别,它发射后会迸裂成两颗并沿相反方向飞行(汗!!那不是打自己),小姜数学很差(已知),只会用直线的一般形式表示每条直线y=kx+b。
firepoint (2010-07-25, C/C++, 1KB, 下载1次)

http://www.pudn.com/Download/item/id/1250784.html

[数学计算] hash

已知某哈希表的装载因子小于1,哈希函数 H(key)为关键字(标识符)的第一个字母在字母表中 的序号,处理冲突的方法为线性探测开放定址法。 试编写一个按第一个字母的顺序输出哈希表中所有 关键字的算法。
Known load factor of a hash table is less than 1, the hash function H (key) for the keywords (identifiers) of the first letter of the alphabet in the serial number, dealing with the conflict detection for the linear open addressing method . Try to write a letter by the first order of output of the hash table algorithm for all keywords. (2010-05-28, C/C++, 1KB, 下载22次)

http://www.pudn.com/Download/item/id/1192246.html

[数学计算] 1..35

给某个玩家100元的资本,让他不停押注直到输光,计算需要赌博多少次? 如果把次数放在数组ruinLength[]中,进行1000次实验后,看看破产的最大次数、 最小次数和平均次数分别是多少?
100 to a player' s capital, so that he kept until the bet输光to calculate how many times the need for gambling? If the number on the array ruinLength [] in experiments carried out after 1000 to see the largest number of bankruptcy, the minimum number and the average number of how many were? (2009-04-17, C/C++, 1KB, 下载4次)

http://www.pudn.com/Download/item/id/719276.html

[数学计算] Jacobi2

本程序是 用 Jacobi 迭代法解方程组矩阵应 ,短小精干,可以一试
This procedure is the Jacobi iteration matrix solution of equations should be, short and lean, you can try (2008-12-25, C/C++, 2KB, 下载5次)

http://www.pudn.com/Download/item/id/615515.html

[数学计算] dongtaiguihua

设平面上有一个m´ n的网格,将左下角的网格点标记为(0,0)而右上角的网格点标记为(m,n)。某人想从(0,0)出发沿网格线行进到达(m,n),但是在网格点(i,j)处他只能向上行进或者向右行进,向上行进的代价为aij(amj =+¥ ),向右行进的代价是bij(bin =+¥ )。试设计一个动态规划算法,在这个网格中为该旅行者寻找一条代价最小的旅行路线。用高级程序设计语言编写程序求解动态规划模型。
Set up a plane m n of the grid, will be the lower-left corner of the grid points marked as (0,0) and the upper right corner of the grid point marked as (m, n). A person from (0,0) along the starting grid to reach the road (m, n), but the grid point (i, j) Department only him right up the road or the road, up the road price for the aij ( amj = ¥), the road to the right price is bij (bin = ¥). Try to design a dynamic programming algorithm, in this grid for travelers to find a minimum cost of travel routes. Advanced programming language used to write programs to solve dynamic programming model. (2008-04-14, C/C++, 1KB, 下载57次)

http://www.pudn.com/Download/item/id/437361.html

[数学计算] 50842032C

这主要是针对试院的学生们设计的软件,我想对他们应该有很大的帮助.
This is mainly hospital test against the students design software, I think they should be very helpful. (2005-09-17, C/C++, 118KB, 下载3次)

http://www.pudn.com/Download/item/id/113621.html

[数学计算] 顺序表的就地逆置

试写一算法,实现顺序表的就地逆置,即利用原表的存储空间将线性表(a1,a2,...,an)逆置为(an,an-1,...,a1).
try to write an algorithm to achieve the order form in situ reverse home, namely the use of the original table of linear storage space (a1, a2 ,..., an) inverse home (an, an-1 ,..., a1). (2005-06-24, C/C++, 1KB, 下载17次)

http://www.pudn.com/Download/item/id/1119592105653551.html
总计:12