-
Numerical_Recipes_in_C
《数值分析方法库
》本书选材内容丰富,包括了当代科学计算过程中涉及的大量内容:求特殊函数值、随机数、排序、最优化、快速傅里叶变换、谱分析、小波变换、统计描述和数据建模、偏微分议程数值解、若乾编码算法和任意精度计算等。本书科学性和实用性统一,不仅对每种算法进行了数学分析和比较,而且根据作者经验对算法给出了评论和建议,并在此基础上提供了用C++语言编写的实用程序。(《Numerical Recipes in C: The Art of Scientific Computing》, The product of a unique collaboration among four leading scientists in academic research and industry, Numerical Recipes is a complete text and reference book on scientific computing. In a self-contained manner it proceeds from mathematical and theoretical considerations to actual practical computer routines. With over 100 new routines bringing the total to well over 300, plus upgraded versions of the original routines, the new edition remains the most practical, comprehensive handbook of scientific computing available today.)
- 2010-05-17 12:44:53下载
- 积分:1
-
sphcone_rcs
计算球体RCS,输入球直接获取球的雷达散射截面(Sphere radar cross section calculation)
- 2021-05-08 15:58:36下载
- 积分:1
-
MDVRP_遗传算法
MDVRP_遗传算法 可以运行 希望对大家有帮助(a solution to MDVRP ,i hope it can help you)
- 2020-11-26 17:49:32下载
- 积分:1
-
Excel_GM
用Excel计算灰色预测模型,每个步骤都有,十分详细。(Calculating Grey Prediction Model with Excel)
- 2020-12-14 15:39:14下载
- 积分:1
-
matlab
己知一些离散的点,使用matlab利用最小二乘法拟合(Had a number of discrete points, with linear least squares fitting)
- 2013-10-14 15:05:47下载
- 积分:1
-
hope
变步长网格,声波方程,有限差分数值模拟程序,二阶(Variable step mesh, acoustic equation, finite difference numerical simulation program, second order)
- 2016-11-04 14:38:13下载
- 积分:1
-
oned_euler_fluxes_v5
一维欧拉方程计算,集合了Lax-Friedrichs,Richtmyer,MacCormack,Steger-Warming,Van Leer,AUSM,Zha-Bilgen,Godunov,Osher,Roe,Rusanov,HLL(HLLE),HLLL,AUFS方法(One dimensional Euler equation, including Lax-Friedrichs, Richtmyer, MacCormack, Steger-Warming, Van Leer, AUSM, Zha-Bilgen, Godunov, Osher, Ro, Rusanov, HLL(HLLE), HLLL, AUFS)
- 2021-01-11 20:08:49下载
- 积分:1
-
gauss-seidel
二维热传导扩散方程的高斯-赛德尔迭代方法。(A two-dimensional thermal diffusion problem using Gauss-Seidel iteration method.)
- 2021-01-18 14:28:44下载
- 积分:1
-
003
a very easy .c file for calculating the products of ints
- 2012-08-14 09:52:45下载
- 积分:1
-
11087 统计逆序对
说明: Description
设a[0…n-1]是一个包含n个数的数组,若在ia[j],则称(i, j)为a数组的一个逆序对(inversion)。
比如 有5个逆序对。请采用类似“合并排序算法”的分治思路以O(nlogn)的效率来实现逆序对的统计。
一个n个元素序列的逆序对个数由三部分构成:
(1)它的左半部分逆序对的个数,(2)加上右半部分逆序对的个数,(3)再加上左半部分元素大于右半部分元素的数量。
其中前两部分(1)和(2)由递归来实现。要保证算法最后效率O(nlogn),第三部分(3)应该如何实现?
此题请勿采用O(n^2)的简单枚举算法来实现。
并思考如下问题:
(1)怎样的数组含有最多的逆序对?最多的又是多少个呢?
(2)插入排序的运行时间和数组中逆序对的个数有关系吗?什么关系?
输入格式
第一行:n,表示接下来要输入n个元素,n不超过10000。
第二行:n个元素序列。
输出格式
逆序对的个数。
输入样例
5
2 3 8 6 1
输出样例
5(Set a[0... N-1] is a n array containing n numbers. If there is a [i] > a [j] i n the case of I < j, then (i, j) is a n inversion pair of a array.
For example, has five reverse pairs. Please use the idea of "merge sorting algorithm" to achieve the statistics of inverse pairs with O (nlogn) efficiency.
The number of inverse pairs of a sequence of n elements consists of three parts:
(1) The number of reverse pairs in the left half, (2) the number of reverse pairs in the right half, (3) the number of elements in the left half is greater than that in the right half.
The first two parts (1) and (2) are implemented by recursion. To ensure the final efficiency of the algorithm O (nlogn), how should the third part (3) be implemented?
Do not use O (n ^ 2) simple enumeration algorithm to solve this problem.)
- 2019-01-07 23:52:06下载
- 积分:1