摘要: https://leetcode-cn.com/problems/contains-duplicate-iii/ https://leetcode-cn.com/problems/contains-duplicate-iii/solution/cjian-ji-dai-ma-by-orangeman 阅读全文
posted @ 2020-07-28 21:59 aaaaassss 阅读(62) 评论(0) 推荐(0) 编辑
摘要: 利用二分图没有奇环的性质 DFS: class Solution { private: static constexpr int UNCOLORED = 0; static constexpr int RED = 1; static constexpr int GREEN = 2; vector<i 阅读全文
posted @ 2020-07-16 19:13 aaaaassss 阅读(69) 评论(0) 推荐(0) 编辑
摘要: 给定一个用字符数组表示的 CPU 需要执行的任务列表。其中包含使用大写的 A - Z 字母表示的26 种不同种类的任务。任务可以以任意顺序执行,并且每个任务都可以在 1 个单位时间内执行完。CPU 在任何一个单位时间内都可以执行一个任务,或者在待命状态。 然而,两个相同种类的任务之间必须有长度为 n 阅读全文
posted @ 2020-07-15 22:12 aaaaassss 阅读(96) 评论(0) 推荐(0) 编辑
摘要: http://poj.org/problem?id=1321 原贴https://www.cnblogs.com/hfc xx/p/4684152.html 阅读全文
posted @ 2020-04-13 22:55 aaaaassss 阅读(45) 评论(0) 推荐(0) 编辑
摘要: https://leetcode cn.com/problems/sum lists lcci/ 阅读全文
posted @ 2020-04-03 20:59 aaaaassss 阅读(77) 评论(0) 推荐(0) 编辑
摘要: https://leetcode cn.com/problems/minimum number of flips to convert binary matrix to zero matrix/ DFS 阅读全文
posted @ 2020-04-02 22:07 aaaaassss 阅读(183) 评论(0) 推荐(0) 编辑
摘要: https://leetcode cn.com/problems/as far from land as possible/submissions/ 动态规划 dp[i][j]表示前i,j的最小值 BFS 阅读全文
posted @ 2020-03-29 22:11 aaaaassss 阅读(188) 评论(0) 推荐(0) 编辑
摘要: https://leetcode cn.com/problems/symmetric tree/submissions/ 用bfs层次遍历,队列实现 阅读全文
posted @ 2020-03-29 22:09 aaaaassss 阅读(67) 评论(0) 推荐(0) 编辑
摘要: https://leetcode cn.com/problems/short encoding of words/ Trie+哈希 阅读全文
posted @ 2020-03-28 21:50 aaaaassss 阅读(174) 评论(0) 推荐(0) 编辑
摘要: https://leetcode cn.com/problems/x of a kind in a deck of cards/ 阅读全文
posted @ 2020-03-27 22:03 aaaaassss 阅读(119) 评论(0) 推荐(0) 编辑