-
CALC
以前用VB6编写的一个计算器,支持常用的数学函数,支持弧度、角度转换,支持简单的函数作图。(A calculator writen by VB6, supports common mathematical functions, support radian, angle conversion, support simple function mapping.)
- 2013-11-01 17:33:11下载
- 积分:1
-
p4vasp_for_windows_install
这个windows下可视化晶体结构的软件,可用于构造晶体,界面,表面...对于做第一性原理初始模型的构建以及结果的可视化分析特别有用处.(Under the windows crystal structure visualization software can be used for the crystal structure, interface, surface ... do first principles for the construction of the initial model and the results of visual analysis is particularly useful.)
- 2010-11-05 01:35:00下载
- 积分:1
-
sod ausm
sod problem solved by ausm format
- 2018-11-12 23:13:50下载
- 积分:1
-
e1
说明: 16点基4—FFT算法编程。输入16点的序列,采用基4-fft方法计算其快速傅里叶变换。(16 points-based 4-FFT algorithm for programming. Enter the 16-point sequence, with the base 4-fft method for calculating the fast Fourier transform.)
- 2010-11-19 18:21:25下载
- 积分: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
-
MK
说明: 基于matlab程序的m-k检验方法计算,只要成matlab导入需计算的数据能方便完成m-k检验(Into matlab import the calculated data can facilitate the completion of the test methods based on the the matlab program' s mk mk inspection)
- 2013-03-11 09:28:45下载
- 积分:1
-
curl
利用风速u,v计算海表风应力以及风应力旋度。(Calculation of sea surface wind stress and wind stress curl.)
- 2021-01-06 12:48:53下载
- 积分:1
-
Detection-of-Planetary-Gearboxes
考虑了静态传递误差,齿轮几何偏心的影响建立3平行轴齿轮啮合动力学模型(Consider the impact of static geometry eccentric transmission error, the establishment of three parallel shaft gear gear dynamics model)
- 2016-01-07 09:18:35下载
- 积分:1
-
Test for KNN
说明: 基于欧拉距离的KNN分类器,可自行调节map和预测点的位置。运行时首先显示分布散点图,之后输出预测值(Here is a KNN classifier based on Euler distance with self-adjusting map and prediction point positions. The distribution scatter will plot displayed map at first, then show the predicted value.)
- 2020-05-29 09:29:12下载
- 积分:1
-
Gauss
数值分析中用C 语言验证验证Gauss列主元消去法。(Numerical analysis using the C language to verify verify the Gauss column principal component elimination.)
- 2013-03-25 21:11:32下载
- 积分:1