-
mom-Fortran-Programs
矩量法的fortran程序,忘了那本书的源码了(Method of Moments fortran program, forgot the source of the book)
- 2021-02-02 21:29:59下载
- 积分:1
-
kaobou_v14
音频信号通过LM386放大,计算两个矩阵之间的欧氏距离,电力系统暂态稳定程序,可以进行暂态稳定计算。( LM386 audio signal amplification, Calculation of the Euclidean distance between the two matrices, Power System Transient Stability Program, can be transient stability.)
- 2016-11-24 21:50:36下载
- 积分:1
-
1D-FDTD
用C语言编写的1D-FDTD程序,含一阶mur边界,附结果matlab画图程序(Using C language 1D-FDTD procedures, including an order Mur boundary, with results of MATLAB drawing program)
- 2013-07-30 13:13:30下载
- 积分:1
-
《啊哈!算法》
用简单易懂的图文方式阐释算法的奥秘,快速了解每个算法的使用场景、原理(Explain the mysteries of the algorithm with simple and understandable graphics and text, and quickly understand the scene and principle of each algorithm)
- 2017-10-26 19:20:16下载
- 积分:1
-
非线性振动
非线性振动.pdf 刘延柱编写
恢复力与位移不成正比或阻尼力不与速度一次方成正比的系统的振动。尽管线性振动理论早已相当完善,在工程上也已取得广泛和卓有成效的应用,但在实际问题中,总有一些用线性理论无法解释的现象。一般说,线性模型只适用于小运动范围,起出这一范围,按线性问题处理就不仅在量上会引起较大误差,而且有时还会出现质上的差异,这就促使人们研究非线性振动。(Nonlinear Vibration. Compilation of PDF Liu Yanzhu)
- 2020-11-23 20:09:34下载
- 积分: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
-
SHORTPATHmatlab
说明: Dijkstra算法与Floyd算法的matlab实现,以求解最短路问题(Dijkstra algorithm and Floyd algorithm matlab realize in order to solve the shortest path problem)
- 2008-10-02 16:05:59下载
- 积分:1
-
PWE-solid--water-or-solid-air-
计算声子晶体固-液和固-气体系,和实验测试吻合,很适应(Suitable for computing phononic crystal solid-liquid and solid and gas, and experimental agreement
)
- 2021-04-20 10:28:50下载
- 积分:1
-
Adcalc
一个表达式计算库,支持算术,逻辑运算,位运算,支持多层级的if/then/else,功能强大。(Calculation of an expression library, support for arithmetic, logic operations, bit computing, multi-level support if/then/else, powerful.)
- 2007-10-17 17:58:08下载
- 积分:1
-
微电网优化
说明: 微电网能量平衡的基本任务是指在一定的控制策略下,使微电网中的各分布式电源及储能装置的输出功率满足微电网的负荷需求,保证微电网的安全稳定,实现微电网的经济优化运行。(The basic task of micro grid energy balance is to make the output power of each distributed power source and energy storage device in micro grid meet the load demand of micro grid under certain control strategy, ensure the safety and stability of micro grid, and realize the economic and optimal operation of micro grid.)
- 2020-03-26 23:51:13下载
- 积分:1