-
FMECmd
说明: 基于FME和C#,实现在C#中调用本地FME模板(Based on FME and C#, the local FME template can be invoked in C#.)
- 2019-03-12 21:49:05下载
- 积分:1
-
ReadBMP_3
读取一张BMP彩色图像,显示其相关信息,并将彩色图片改成8bit灰度图片以后另外存盘!(Read a BMP color image display its related information and changed the color pictures 8bit grayscale image after another save!)
- 2012-08-22 11:04:05下载
- 积分: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
-
MySky
一个用VC++和OPENGL编写的模拟天空盒效果的三维仿真程序(A used VC++ And OPENGL prepared simulated three-dimensional effect of the sky box simulation program)
- 2020-07-02 05:20:02下载
- 积分:1
-
DsoFramer_V2.3.0.2
DSOFramer.ocx 2.3版本。读写word控件(c# word component operation)
- 2014-02-10 15:18:57下载
- 积分:1
-
HaarFaceDetect
说明: 人脸检测领域经典的Haar人脸检测。使用OpenCV.(Face Detection classic Haar face detection. Use OpenCV.)
- 2006-04-07 15:53:37下载
- 积分:1
-
zoumigong
用VC++设计的一个走迷宫的小游戏,界面显示,用键盘控制人物走动(Designed with a maze of VC Games,Interface display, using the keyboard to control the characters move)
- 2011-12-06 16:47:55下载
- 积分:1
-
sql_task
c语言实现对数据库sqlite3的增删改查(C Language Implements Addition, Deletion and Amendment of Database SQLite3)
- 2019-05-21 17:23:15下载
- 积分:1
-
m16l
the very good man is you for anyone who descriminate this
- 2019-05-31 11:50:17下载
- 积分:1
-
在VS2015中用OpenCV249实现多张图片拼接
该程序应用VSC++ 2015 结合 OpenCV2.4.9,实现了多张图片拼接的功能,先加载图版,然后进行特征提取,在此基础上,对相邻两张图片进行特征匹配,根据匹配结果生成新的图片。
- 2022-07-18 16:59:21下载
- 积分:1