堆排序做的,没有全部排序,找到第k个就结束 ...
分类:
编程语言 时间:
2017-09-21 22:24:07
阅读次数:
195
Billboard Problem Description At the entrance to the university, there is a huge rectangular billboard of size h*w (h is its height and w is its width ...
分类:
其他好文 时间:
2017-09-21 20:55:49
阅读次数:
188
#week2# #from leetcode# Description Find the contiguous subarray within an array (containing at least one number) which has the largest sum. For examp ...
分类:
其他好文 时间:
2017-09-18 00:18:48
阅读次数:
259
A histogram is a polygon composed of a sequence of rectangles aligned at a common base line. The rectangles have equal widths but may have different h ...
分类:
其他好文 时间:
2017-09-15 20:59:45
阅读次数:
203
题文:https://vjudge.net/problem/UVA-11324 题解: 这个题目首先可以发现,只要是一个强连通分量,要么都选,要么都不选,将点权看成强连通分量的点数,所以这个题目就转化成了DAG上的最大路。 稍微dp一下就好了。 代码: ...
分类:
其他好文 时间:
2017-09-12 23:20:14
阅读次数:
547
找出多个数组中的最大数 右边大数组中包含了4个小数组,分别找到每个小数组中的最大值,然后把它们串联起来,形成一个新数组。 提示:你可以用for循环来迭代数组,并通过arr[i]的方式来访问数组的每个元素。 当你完成不了挑战的时候,记得开大招'Read-Search-Ask'。 找出多个数组中的最大数 ...
分类:
其他好文 时间:
2017-09-09 11:53:12
阅读次数:
147
首先要鸣谢一下教了我半天的同学: 看不明白我写的,可以看一下他的 http://www.cnblogs.com/orion7/p/7469236.html Flip game is played on a rectangular 4x4 field with two-sided pieces pla ...
分类:
其他好文 时间:
2017-09-06 12:46:32
阅读次数:
200
The GeoSurvComp geologic survey company is responsible for detecting underground oil deposits. GeoSurvComp works with one large rectangular region of ...
分类:
其他好文 时间:
2017-09-05 23:12:27
阅读次数:
183
Given n non-negative integers representing the histogram's bar height where the width of each bar is 1, find the area of largest rectangle in the hist ...
分类:
其他好文 时间:
2017-09-05 13:25:33
阅读次数:
239
Flip game is played on a rectangular 4x4 field with two-sided pieces placed on each of its 16 squares. One side of each piece is white and the other o ...
分类:
其他好文 时间:
2017-09-03 13:14:41
阅读次数:
161