-
AREPS
电磁传播损耗的计算方法,模拟电磁波在大气中的传播路径(A propagation path of the electromagnetic propagation loss calculation method and the simulation of electromagnetic wave in the atmosphere)
- 2012-08-29 11:01:55下载
- 积分:1
-
FDTD_2D
说明: 二维FDTD程序计算近场模型,包括建模文件以及电磁场递推文件,入射角度为0°。模型时一个介质方柱。(The two-dimensional FDTD program calculates near-field models, including modeling files and electromagnetic field recursion files, with an incident angle of 0. The model is a medium square column.)
- 2020-06-25 11:05:44下载
- 积分:1
-
FLUENT-Y_Plus
关于流体计算软件FLUENT中Y+设置的一些建设性的讨论,值得大家参考。(On computational fluid dynamics software FLUENT some constructive discussions in the Y+ set is worth your consideration.)
- 2016-03-06 12:57:34下载
- 积分:1
-
GOCEPARSER
利用下载的goce原始数据,计算得出含有时间/经纬度/重力梯度格式的程序(Use downloaded goce raw data, calculated with the time/latitude/gravity gradient program formats)
- 2013-08-25 16:44:04下载
- 积分:1
-
Newmark
matlab Newmark法 用于求解二阶常系数微分方程组(matlab Newmark method for solving second-order differential equations with constant coefficients)
- 2013-05-23 10:42:33下载
- 积分:1
-
Newmark
说明: 工程中微分方程数值积分经常需要使用的Newmark法(Differential equations numerical integration project often requires the use of the Newmark method)
- 2008-09-03 22:02:30下载
- 积分:1
-
Electronic-Warfare-Signal-Processing
《电子战信号处理》讲义 ,西电赵国庆老师的经典讲义,学习电子战信号处理的童鞋一定要看看哈(Electronic Warfare Signal Processing)
- 2014-05-04 22:47:45下载
- 积分:1
-
Riemann-problems
求解Riemann 问题精确解的Fortran程序(Exact solution of Riemann problem solving Fortran program)
- 2014-06-10 00:08:48下载
- 积分: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
-
PMFFTaddF
PMF FFT捕获技术捕获性能仿真,并与改进的捕获技术捕获性能比较(FFT PMF capture technology capture performance simulation, and capture performance comparison with the improved capture technology)
- 2015-06-17 14:27:53下载
- 积分:1