编写一个程序,找出第 n 个丑数。 丑数就是只包含质因数 2, 3, 5 的正整数。 说明: 1 是丑数。 n 不超过1690。 来源:力扣(LeetCode) 链接:https://leetcode cn.com/problems/ugly number ii 1.暴力(brute force) ...
分类:
其他好文 时间:
2020-02-05 11:50:20
阅读次数:
55
Count on a tree II(luogu) Description 题目描述 给定一个n个节点的树,每个节点表示一个整数,问u到v的路径上有多少个不同的整数。 输入格式 第一行有两个整数n和m(n=40000,m=100000)。 第二行有n个整数。第i个整数表示第i个节点表示的整数。 在接 ...
分类:
其他好文 时间:
2020-02-05 11:45:07
阅读次数:
58
976. Largest Perimeter Triangle(三角形的最大周长) 链接 https://leetcode cn.com/problems/largest perimeter triangle 题目 给定由一些正数(代表长度)组成的数组 A,返回由其中三个长度组成的、面积不为零的三角 ...
分类:
其他好文 时间:
2020-02-05 11:29:30
阅读次数:
56
We are given an array A of N lowercase letter strings, all of the same length. Now, we may choose any set of deletion indices, and for each string, we ...
分类:
其他好文 时间:
2020-02-04 10:24:21
阅读次数:
67
题:https://ac.nowcoder.com/acm/contest/4010/K 题意:用一些模式串凑成一个目标串,每个模式串有消耗,问组合的最小消耗,或不能组成输出-1; 分析:典型的AC自动机处理后在跳fail的过程中进行操作,这里操作就是dp计算最小。用dp[i]表示长串前ii位的最小 ...
分类:
其他好文 时间:
2020-02-04 00:46:26
阅读次数:
65
90. Subsets II Given a collection of integers that might contain duplicates, nums , return all possible subsets (the power set). Note : The solution s ...
分类:
其他好文 时间:
2020-02-04 00:42:05
阅读次数:
78
H - Triangle Mr. Frog has n sticks, whose lengths are 1,2, 3??n respectively. Wallice is a bad man, so he does not want Mr. Frog to form a triangle wi ...
```go func T(){ //ii, err := fmt.Scanf("%d--%s", &age, &Names) //ii, err := fmt.Scanf("%d--%s\n", &age, &Names) //输入格式为: int--str ii, err := fmt.Scanf... ...
分类:
其他好文 时间:
2020-02-03 18:58:53
阅读次数:
64
链接: "LeetCode667" 给定两个整数?n?和?k,你需要实现一个数组,这个数组包含从?1?到?n?的 n?个不同整数,同时满足以下条件: ① 如果这个数组是$[a1, a2, a3, ... , an]$,那么数组$[|a1 a2|, |a2 a3|, |a3 a4|, ... , |a ...
分类:
其他好文 时间:
2020-02-03 12:19:52
阅读次数:
65
1、知乎 Vulkan-高性能渲染 2、Life of a triangle - NVIDIA's logical pipeline 3、Round Robin 算法 4、NVIDIA Developer Vulkan 5、Vulkan SDK Tutorial 6、Vulkan In 30 Min ...
分类:
其他好文 时间:
2020-02-03 10:17:02
阅读次数:
96