- 博客(179)
- 收藏
- 关注
原创 力扣周赛 - 498
模拟遍历会超时,思路转化为数位 dp,计算 [0…n] 有多少整数满足条件,答案就是 count® - count(l-1);数位 dp 的核心思想就是 dfs,假设统计数字从 pos 位往后填写,有多少种填法,数字长度 16。路径位置的数字必须非递减,用 last_value 来传递。引入上边界的判断,即数字不超过 n。记忆化搜索,存储路径。
2026-04-19 14:13:49
358
原创 LeetCode 1582. Special Positions in a Binary Matrix
【代码】LeetCode 1582. Special Positions in a Binary Matrix。
2026-03-04 17:54:48
43
原创 LeetCode 1536. Minimum Swaps to Arrange a Binary Grid
【代码】LeetCode 1536. Minimum Swaps to Arrange a Binary Grid。
2026-03-04 17:50:28
37
原创 LeetCode 1545. Find Kth Bit in Nth Binary String
【代码】LeetCode 1545. Find Kth Bit in Nth Binary String。
2026-03-03 15:31:43
39
原创 LeetCode 1356. Sort Integers by The Number of 1 Bits
【代码】LeetCode 1356. Sort Integers by The Number of 1 Bits。
2026-02-25 11:53:44
53
原创 LeetCode 1022. Sum of Root To Leaf Binary Numbers
【代码】LeetCode 1022. Sum of Root To Leaf Binary Numbers。
2026-02-24 14:30:15
160
原创 LeetCode 1461. Check If a String Contains All Binary Codes of Size K
【代码】LeetCode 1461. Check If a String Contains All Binary Codes of Size K。
2026-02-24 14:29:02
191
原创 力扣周赛 - 479
🔗 https://leetcode.cn/problems/sort-integers-by-binary-reflection/description/🔗 https://leetcode.cn/problems/largest-prime-from-consecutive-prime-sum/description/🔗 https://leetcode.cn/problems/total-score-of-dungeon-runs/description/🔗 https://leetcode.
2025-12-08 22:01:22
807
原创 LeetCode 594. Longest Harmonious Subsequence
【代码】LeetCode 594. Longest Harmonious Subsequence。
2025-06-30 18:26:55
529
原创 LeetCode 3423. Maximum Difference Between Adjacent Elements in a Circular Array
【代码】LeetCode 3423. Maximum Difference Between Adjacent Elements in a Circular Array。
2025-06-12 23:20:45
489
原创 LeetCode 2375. Construct Smallest Number From DI String
【代码】LeetCode 2375. Construct Smallest Number From DI String。
2025-02-21 15:01:47
501
原创 LeetCode 1079. Letter Tile Possibilities
【代码】LeetCode 1079. Letter Tile Possibilities。
2025-02-17 15:16:57
258
原创 LeetCode 1352. Product of the Last K Numbers
【代码】LeetCode 1352. Product of the Last K Numbers。
2025-02-14 17:51:16
347
原创 LeetCode 1726. Tuple with Same Product
【代码】LeetCode 1726. Tuple with Same Product。
2025-02-07 00:02:34
254
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人
RSS订阅