Codeforces 🎨 CF2179H. Blackslex and Plants
利用 lowbit 性質將 x·lowbit(x) 拆解為 log N 個週期性等差數列,結合步長 2^k 的差分陣列進行區間修改,最終以多層前綴和還原答案。
Codeforces 🎨 CF2179G. Blackslex and Penguin Migration
利用 Manhattan Distance 特性,透過三次全圖查詢確定兩個角點與其餘點的距離,進而利用幾何關係解出所有企鵝的座標。
Codeforces 🎨 CF2179F. Blackslex and Another RGB Walking
利用 BFS 依 d % 3 染色,結合二分圖性質,唯一識別父節點方向。
AtCoder 🟣 ABC436G Linear Inequation
結合數位 DP 與背包問題。將變數二進位拆分,逐層進行 0/1 背包,利用層間進位壓縮狀態,解決 M 極大的線性不等式計數。
AtCoder 🟢 ABC436F Starry Landscape Photo
枚舉最大亮度星星,利用 BIT 統計左右側亮度小於等於該值的數量,相乘累加即為答案。
AtCoder 🟢 ABC436E Minimum Swap
利用置換環的性質,計算每個環的大小即可。
AtCoder 🟢 ABC437F Manhattan Christmas Tree 2
利用曼哈頓距離轉切比雪夫距離的性質,透過線段樹維護 X+Y 與 X-Y 的極值來處理動態區間最遠曼哈頓距離查詢。
AtCoder 🟡 ABC437E Sort Arrays
建立 Trie 儲存序列生成過程,利用 DFS 前序遍歷並對子節點邊權排序,即可獲得字典序排列。
AtCoder 🟡 ABC437D Sum of Differences
利用排序與前綴和,將絕對值總和問題轉化為區間和計算,快速求解兩數列間所有元素差值總和。
AtCoder 🟠 ABC437C Reindeer and Sleigh 2
反悔貪心。將條件轉換為全體力量總和需大於等於乘坐者的 (W+P) 總和,轉化為簡單的排序貪心問題。
Codeforces 🟣 CF2173F. Isla's Memory Thresholds
Problem solving record for Codeforces 2173F. Isla's Memory Thresholds.
Codeforces 🔵 CF2173E. Shiro's Mirror Duel
Problem solving record for Codeforces 2173E. Shiro's Mirror Duel.
Codeforces 🟢 CF2173D. Taiga's Carry Chains
Problem solving record for Codeforces 2173E. Shiro's Mirror Duel.
Codeforces 🔵 CF2109C. Hacking Numbers (Easy/Medium/Hard Version)
Problem solving record for Codeforces 2109C. Hacking Numbers.
LeetCode 🟡 3202. Find the Maximum Length of Valid Subsequence II
Problem solving record for LeetCode 3202. Find the Maximum Length of Valid Subsequence II.





















