题目: 给定两个正整数n和k。 整数n的因数定义为整数i,其中n%i == 0。 考虑按升序排列的所有n个因子的列表,返回此列表中的第k个因子;如果n小于k个因子,则返回-1。 Example 1: Input: n = 12, k = 3 Output: 3 Explanation: Factor ...
分类:
其他好文 时间:
2020-07-06 10:53:09
阅读次数:
52
Alg https://leetcode-cn.com/problems/largest-1-bordered-square/submissions/ 很简单, 0-1 背包的变形(所有的 DP 都是 01 背包变形...) DP 都挺简单,难点就是 : 找递减公式 找十级结果非递减情形时候的方案。 ...
分类:
其他好文 时间:
2020-07-05 20:57:24
阅读次数:
79
Description Given an array of integers cost and an integer target. Return the maximum integer you can paint under the following rules: The cost of pai ...
分类:
其他好文 时间:
2020-07-04 16:59:34
阅读次数:
73
问题: 给定一个数组,对所有元素进行,按大小排名rank,同样大小排名相同。 Example 1: Input: arr = [40,10,20,30] Output: [4,1,2,3] Explanation: 40 is the largest element. 10 is the small ...
分类:
其他好文 时间:
2020-07-04 15:11:29
阅读次数:
58
1 典型的错误信息如下: 消息 * 错误 0xc02020a1: 数据流任务: 数据转换失败。列“列 2”的数据转换返回状态值 4 和状态文本“文本被截断,或者一个或多个字符在目标代码页中没有匹配项。”。 (SQL Server 导入和导出向导) * 错误 0xc020902a: 数据流任务: “输 ...
分类:
数据库 时间:
2020-07-03 17:36:01
阅读次数:
73
Maximum Subarray (E) 题目 Given an integer array nums, find the contiguous subarray (containing at least one number) which has the largest sum and retur ...
分类:
其他好文 时间:
2020-07-03 09:14:00
阅读次数:
76
给定一个 n x n 矩阵,其中每行和每列元素均按升序排序,找到矩阵中第 k 小的元素。 请注意,它是排序后的第 k 小元素,而不是第 k 个不同的元素。 示例: matrix = [ [ 1, 5, 9], [10, 11, 13], [12, 13, 15] ], k = 8, 返回 13。 来 ...
分类:
其他好文 时间:
2020-07-02 23:18:13
阅读次数:
76
378. 有序矩阵中第K小的元素 题目来源:力扣(LeetCode)https://leetcode-cn.com/problems/kth-smallest-element-in-a-sorted-matrix 题目 给定一个 n x n 矩阵,其中每行和每列元素均按升序排序,找到矩阵中第 k 小 ...
分类:
编程语言 时间:
2020-07-02 21:29:52
阅读次数:
54
给定一个 n x n 矩阵,其中每行和每列元素均按升序排序,找到矩阵中第 k 小的元素。请注意,它是排序后的第 k 小元素,而不是第 k 个不同的元素。 示例: matrix = [ [ 1, 5, 9], [10, 11, 13], [12, 13, 15]],k = 8, 返回 13。 来源:力 ...
分类:
其他好文 时间:
2020-07-02 21:21:59
阅读次数:
47
Given an integer n. Each number from 1 to n is grouped according to the sum of its digits. Return how many groups have the largest size. 对1-n的数分组,分组规则 ...
分类:
其他好文 时间:
2020-06-29 20:18:12
阅读次数:
73