Given n non-negative integers a1, a2, ..., an, where each represents a point at coordinate (i, ai). n vertical lines are drawn such that the two endpo...
分类:
其他好文 时间:
2015-04-30 19:47:00
阅读次数:
100
点击打开杭电1503
Problem Description
The company "21st Century Fruits" has specialized in creating new sorts of fruits by transferring genes from one fruit into the genome of another one. Most times thi...
分类:
其他好文 时间:
2015-04-30 16:20:23
阅读次数:
159
问题分析
这道题目解题思路可以参考leetcode011:Container With Most Water 的分析,leetcode011是求围住的最大面积,这里有所区别,统计“装水”面积,还是从两边向中间扫描,时间复杂度O(n)。 这里设置一个水平面h,表示当前围住的高度,如果后续扫面到的比h低,说明可以装水,统计;如果比h高,更新h即可。...
分类:
移动开发 时间:
2015-04-30 16:14:21
阅读次数:
129
Givennnon-negative integersa1,a2, ...,an, where each represents a point at coordinate (i,ai).nvertical lines are drawn such that the two endpoints of ...
分类:
其他好文 时间:
2015-04-30 07:33:13
阅读次数:
114
Given a 2d grid map of'1's (land) and'0's (water), count the number of islands. An island is surrounded by water and is formed by connecting adjacent ...
分类:
其他好文 时间:
2015-04-29 11:30:48
阅读次数:
132
Given n non-negative integers a1, a2, ..., an, where each represents a point at coordinate (i, ai). n vertical lines are drawn such that the two endpo...
分类:
编程语言 时间:
2015-04-28 22:28:27
阅读次数:
202
今天用mysql workbench在更新数据的时候,出现了下面错误:15:52:39 update wp_posts set post_content = replace(post_content, '/water', '') Error Code: 1175. You are using saf...
分类:
数据库 时间:
2015-04-28 17:50:28
阅读次数:
197
Problem Description
In the mysterious forest, there is a group of Magi. Most of them like to eat human beings, so they are called “The Ogre Magi”, but there is an special one whose favorite food is ha...
分类:
其他好文 时间:
2015-04-28 14:08:31
阅读次数:
129
Wednesday, 9 February 201102:03 AMIf you look at the ASP.NET Web Pages (aka Razor) tutorials on the ASP.NET web site, there's achapterdevoted to addin...
分类:
Web程序 时间:
2015-04-27 21:22:47
阅读次数:
197
Time Limit: 5000MS
Memory Limit: 131072K
Total Submissions: 11303
Accepted: 3520
Case Time Limit: 2000MS
Description
N children are sitting in a circle to play a game.
T...
分类:
其他好文 时间:
2015-04-27 15:23:10
阅读次数:
123