-
WindTurbine
1.5MW风力机的载荷计算:摆振力矩、挥舞力矩、俯仰力矩等(The load calculations of the 1.5MW wind turbine: Flapwise moment, edgewise moment, tilt moment.)
- 2020-11-28 22:19:30下载
- 积分:1
-
INORDER_PRE_POST_TRAVERSE
PRE IN POST OREDER TRAVERSAL C++ CODE VISUAL
- 2016-05-11 20:58:00下载
- 积分:1
-
标准方腔流动
用来计算流体力学中非常典型的不可压缩方腔流动。包含MATLAB程序绘制流函数图。(It is used to calculate the incompressible flow of a typical square cavity in fluid mechanics. Contains MATLAB programs to draw stream function diagrams.)
- 2017-09-10 18:32:53下载
- 积分:1
-
3
说明: 数值分析 显示算法 非线弹性 滞回曲线(Numerical analysis showed that the algorithm the linear elastic hysteresis curve)
- 2012-01-09 16:26:03下载
- 积分:1
-
11087 统计逆序对
Description
设a[0…n-1]是一个包含n个数的数组,若在i<j的情况下,有a[i]>a[j],则称(i, j)为a数组的一个逆序对(inversion)。
比如 <2,3,8,6,1> 有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, <2,3,8,6,1> 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
-
程序
说明: 模拟电场中的等势线,利用计算机数学软件MATLAB模拟仿真真空中自由电荷,电偶极子,带电细棒,尖端导体等附近静电场电场线及等势线分布图型(Equipotential line in simulated electric field)
- 2018-12-25 10:55:02下载
- 积分:1
-
shenliu
有限元计算基本程序,为毕业论文时编写的局部渗流计算程序。(Finite element method the basic procedures for the thesis prepared by local seepage calculation procedures.)
- 2007-08-20 14:00:54下载
- 积分:1
-
NPE
可以方便求解非线性偏振旋转锁模光纤激光器的脉冲传输(You can easily solve the nonlinear polarization rotation mode-locked fiber laser pulse transmission)
- 2021-04-05 12:19:03下载
- 积分:1
-
Main0326_CZT
雷诺方程的有限差分求解 织构化表面的模型数值求解(Finite difference numerical model for solving Reynolds equation solving textured surface)
- 2014-04-19 13:15:44下载
- 积分:1
-
PISO-algorithm-source
CFD数值模拟,经典PISO算法程序源程序代码。(CFD numerical simulation, classic PISO algorithm source code.)
- 2013-05-15 08:24:02下载
- 积分:1