问题 J: Frosting on the Cake 题目描述 Iskander the Baker is decorating a huge cake, covering the rectangular surface of the cake with frosting.For this purp ...
分类:
其他好文 时间:
2018-05-02 02:58:51
阅读次数:
204
https://leetcode.com/problems/largest-number-at-least-twice-of-others/description/ ...
分类:
其他好文 时间:
2018-05-01 14:11:46
阅读次数:
144
Red and Black Time Limit: 1000MS Memory Limit: 30000K Total Submissions: 41222 Accepted: 22338 Description There is a rectangular room, covered with s ...
分类:
其他好文 时间:
2018-04-29 11:58:35
阅读次数:
221
题目描述: For a web developer, it is very important to know how to design a web page's size. So, given a specific rectangular web page’s area, your job by ...
分类:
其他好文 时间:
2018-04-28 19:20:31
阅读次数:
133
该题解决方法是排序,我们只需要对两个数的对比方法进行改写就好了。改写思路为两个字符串 a 和 b, 如果 a + b 小于 b + a, 那么就交换位置。 代码如下: END ...
分类:
其他好文 时间:
2018-04-28 14:35:36
阅读次数:
139
在二叉树的每一行中找到最大的值。示例:输入: 1 / \ 3 2 / \ \ 5 3 9 输出: [1, 3, 9] 详见:https://leetcode.com/problems/find-largest-value-in-each-tree-row/description/ C++: ...
分类:
其他好文 时间:
2018-04-22 17:18:43
阅读次数:
135
[抄题]: In a given integer array nums, there is always exactly one largest element. Find whether the largest element in the array is at least twice as m ...
分类:
其他好文 时间:
2018-04-22 10:48:54
阅读次数:
188
你需要找到由两个 n 位数的乘积组成的最大回文数。由于结果会很大,你只需返回最大回文数 mod 1337得到的结果。示例:输入: 2输出: 987解释: 99 x 91 = 9009, 9009 % 1337 = 987说明:n 的取值范围为 [1,8]。详见:https://leetcode.co ...
分类:
其他好文 时间:
2018-04-21 21:19:06
阅读次数:
800
Description Given an integer array nums, find the contiguous subarray (containing at least one number) which has the largest sum and return its sum. E ...
分类:
其他好文 时间:
2018-04-20 23:42:59
阅读次数:
288
题目如下: 解题思路:leetcode里面有很多这样类似的题目,本题是求能够整除的,还有求依次递增的,一增一减的等等,都是万变不离其宗。对于这一类题目,我都是采用动态规划的算法。这题怎么解呢?首先对nums按升序排序,然后创建一个dp数组,dp[i]表示从nums[0]~nums[i]区间符合题目条 ...
分类:
其他好文 时间:
2018-04-19 00:37:09
阅读次数:
162