Luogu 🟢 P2627 [USACO11OPEN] Mowing the Lawn G
本題是單調佇列優化 DP 的經典題。要求在一排奶牛中選擇若干隻,使得沒有連續超過 K 隻奶牛被選擇,且總效率最大。可透過前綴和與單調佇列在 O(N) 時間內求解。
Luogu 🟢 P2627 [USACO11OPEN] Mowing the Lawn G
本題是單調佇列優化 DP 的經典題。要求在一排奶牛中選擇若干隻,使得沒有連續超過 K 隻奶牛被選擇,且總效率最大。可透過前綴和與單調佇列在 O(N) 時間內求解。
Codeforces 🟡 CF1791F. Range Update Point Query
Problem solving record for Codeforces 1791F. Range Update Point Query.
Codeforces 🟡 CF2074C. XOR and Triangle
Problem solving record for Codeforces 2074C. XOR and Triangle.
Codeforces 🔵 CF83B. Doctor
Problem solving record for Codeforces 83B. Doctor.
LeetCode 🟡 368. Largest Divisible Subset
Problem solving record for LeetCode 368. Largest Divisible Subset.
LeetCode 🟡 2874. Maximum Value of an Ordered Triplet II
Problem solving record for LeetCode 2874. Maximum Value of an Ordered Triplet II.
LeetCode 2025/04 每日一題 (April LeetCoding Challenge) 目錄
A collection of LeetCode 2025/04 daily challenge.
LeetCode 🔴 2127. Maximum Employees to Be Invited to a Meeting
Problem solving record for LeetCode 2127. Maximum Employees to Be Invited to a Meeting.
AtCoder Beginner Contest 389 解題紀錄 (A - F)
Problem solving record for AtCoder Beginner Contest 389.
LeetCode 🟡 1286. Iterator for Combination
Problem solving record for LeetCode 1286. Iterator for Combination.
LeetCode 🔴 295. Find Median from Data Stream (Old)
Problem solving record for LeetCode 295. Find Median from Data Stream.
LeetCode 🔴 295. Find Median from Data Stream
設計支援動態插入與查詢中位數的資料結構。用對頂堆把資料流切成較小與較大兩半,使插入為 O(log n),查詢中位數為 O(1)。
LeetCode 🟡 53. Maximum Subarray
Problem solving record for LeetCode 53. Maximum Subarray.
LeetCode 🟡 31. Next Permutation
Problem solving record for LeetCode 31. Next Permutation.

![Luogu 🟢 P2627 [USACO11OPEN] Mowing the Lawn G](https://i.gdst.dev/works/846172612737479668.webp)















![Luogu 🟣 P3195 [HNOI2008] 玩具装箱](https://i.gdst.dev/cover/P3195.webp)
