题目链接:http://poj.org/problem?id=2104
题目意思很简单,就是给你一个序列,查询某区间第K大的数;
方法1:时间复杂度O(N*M);不支持更新操作,代码简单;
利用结构体排序,保留原数据的顺序。
#include
#include
#include
#define N 100000
using namespace std;
/*
这个思路很好;时...
分类:
其他好文 时间:
2015-08-10 22:12:27
阅读次数:
145
直方图均衡
#include
#include
#include
/*
有的版本CV_BGR2GRAY宏定义没有,需要加载个legacy文件来获取,但是会与其他调用的宏定义出现冲突,所以
这里单独定义一个彩色图像到灰度图像的case number
*/
#define CV_BGR2GRAY 6
#include
using namespace std;
using nam...
分类:
其他好文 时间:
2015-08-10 22:11:24
阅读次数:
183
CREATE OR REPLACE PROCEDURE GET_SPLIT (V_STRING1 IN VARCHAR2, --输入的字符串V_START IN NUMBER, --开始截取的位置V_LENGTH IN NUMBER, --截取的字符个数V_SPLIT IN VARCHAR2 --分...
分类:
其他好文 时间:
2015-08-10 22:00:32
阅读次数:
133
Number SequenceTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 128332Accepted Submission(s): 31212...
分类:
其他好文 时间:
2015-08-10 21:49:16
阅读次数:
108
题目如下:
Given an integer with no more than 9 digits, you are supposed to read it in the traditional Chinese way. Output "Fu" first if it is negative. For example, -123456789 is read as "Fu yi Yi ...
分类:
其他好文 时间:
2015-08-10 20:10:22
阅读次数:
165
Problem description
Input
The first line has one integer: N, the number of different distances the Golf Bot can shoot. Each of the following N lines has one integer, ki, the di...
分类:
其他好文 时间:
2015-08-10 20:01:23
阅读次数:
123
依旧先来题目:Given an arraySofnintegers, find three integers inSsuch that the sum is closest to a given number, target. Return the sum of the three integers...
分类:
其他好文 时间:
2015-08-10 19:54:29
阅读次数:
104
Candy Sharing Game
Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)
Total Submission(s): 3812 Accepted Submission(s): 2377
Problem Description
A number of stude...
分类:
其他好文 时间:
2015-08-10 18:12:23
阅读次数:
126
Eclipse Plugins: ?(EHEP) Posted on?April 2, 2012?by?Erich Styger And here is number 4 of my ‘best of’ eclipse plugins: the?Eclipse Hex Editor Plugin?orEHEP. It is a great tool to inspect o...
分类:
系统相关 时间:
2015-08-10 12:15:30
阅读次数:
257
The string "PAYPALISHIRING" is written in a zigzag pattern on a given number of rows like
this: (you may want to display this pattern in a fixed font for better legibility)
P A H N
A P L S I ...
分类:
其他好文 时间:
2015-08-10 10:36:46
阅读次数:
184