-
LU_Matrix_1.c
lu分解矩阵求逆...
===========
紫薯紫薯...(Matrix LU decomposition inversion)
- 2020-06-18 07:40:02下载
- 积分:1
-
ModelC_alloy
说明: 相场法材料计算的modelc-alloy 对应的基础代码,自取基础有用(The basic code corresponding to modelc-alloy for phase field method material calculation, useful for self-extraction)
- 2020-06-25 12:40:02下载
- 积分:1
-
Gauss-Hermite
实现高斯厄米特积分,可以直接更换f函数,得到所求的积分(High the Sie Mitt integral to replace the f function, ask the integral
)
- 2021-03-06 20:49:30下载
- 积分:1
-
split_step_fourier_method
说明: 使用分布傅立叶法计算非线性薛定谔方程。可以得到光纤非线性传输特性。(Fourier method using the distribution of nonlinear Schr枚dinger equation. Can be non-linear optical transmission characteristics.)
- 2008-10-14 09:34:16下载
- 积分: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
-
Cp
说明: 1.5MW风力机叶片功率系数Cp计算程序示例,采用梯形法数值积分计算(1.5MW wind turbine blade power coefficient the Cp calculation program examples, numerical integration using the trapezoidal method)
- 2012-10-22 20:36:32下载
- 积分:1
-
xb
说明: fluent中作液体蒸发相变的udf,非常专业,证明可行(fluent in the evaporation of liquid phase transition for udf, very professional, proved to be feasible)
- 2014-04-07 10:53:26下载
- 积分:1
-
emd
c语言程序编写在经验模态分解,包含三次样条(c language programming in the empirical mode decomposition, contains the cubic spline)
- 2021-02-03 01:10:00下载
- 积分:1
-
VBA简介
微波仿真论坛下载的一位版主的稿子,有图有例子,手把手教你学习关于CST中的高级语言设计(CST-VBA,The CST STUDIO SUITE tools can be controlled from a Visual Basic (VBA) script. The language of the built in BASIC interpreter is almost 100% compatible with the Visual Basic for Application language. This language may be used either for creating own structure libraries or for the automation of common tasks)
- 2017-06-12 08:43:54下载
- 积分:1
-
ABAQUS子程序UMAT里弹塑本构的实现
说明: 非常详细的umat 雅可比矩阵更新算法的讲解(detailed describetion of the jacobian matrix in abaqus umat)
- 2021-04-06 13:19:02下载
- 积分:1