Herr Deng桑的教學blog
這是Herr Deng桑的教學blog,主要處理作業與班導事務,另外還有數位小品。
網頁
(移至...)
首頁
密碼學
程式設計Programming
APP
計算機概論
▼
2026年3月30日 星期一
黑柴犬與碧潭吊橋meta AI動畫
›
2026年3月28日 星期六
C++UnionFind與matrix分析解難題Leetcode 2573 Find the String with LCP
›
解難題Leetcode 2573. Find the String with LCP,其實重點是lcp非常特殊的矩陣,只要搞定lcp各項的關聯,如對稱性,對角線上值-1等特性,應該能解出。會先用Union-Find主要是其解法可針對更為廣義的題目,要快就用貪婪。
2026年3月23日 星期一
3D DP minmax解Leetcode 1594 Maximum Non Negative Product in a Matrix
›
2026年2月28日 星期六
黑柴犬正在操作enigma密碼機
›
Py3 C++位元處理與DP解Leetcode 1680 Concatenation of Consecutive Binary Numbers
›
Py3 C++位元處理與DP解Leetcode 1680 Concatenation of Consecutive Binary Numbers 這當然不是DP的問題,但透過DP的手法卻可以大幅減少計算時間 ---- This is certainly not a probl...
人與黑柴狗奔跑
›
2026年2月21日 星期六
C++ Py3 bitmask速解Leetcode 762 Prime Number of Set Bits in Binary Representation
›
C++ Py3 bitmask速解Leetcode 762 Prime Number of Set Bits in Binary Representation 這段影片示範如何使用計數位元和位元遮罩(bit mask),用幾行程式碼解決這個問題。 ----- this vide...
2026年2月19日 星期四
Py3 C++迴圈與計數解Leetcode 696 Count Binary Substrings
›
Py3 C++迴圈與計數解Leetcode 696 Count Binary Substrings Leetcode 696. Count Binary Substrings雖然標示為easy,也沒那麼trivial,花了一番功夫才解出branchless C++。而一般回圈解...
2026年2月13日 星期五
Py3 C++使用 4 hashmaps解Leetcode 3714 Longest Balanced Substring II
›
不喜歡C++的unordered_map,主要的原因是慢,也不想重新刻一個好的hashmap,不過透過memory_resource中的工具,加快三倍速度,也能寫出簡易的beats 99%C++解答
2026年2月4日 星期三
py3 C++巢狀迴圈解Leetcode難題3640 Trionic Array II
›
py3 CPP巢狀迴圈解Leetcode難題3640 Trionic Array II 使用巢狀迴圈來解決 LeetCode 上的難題,就用類似解決簡單的題目的方法。 Lettcode 3637. Trionic Array I簡單問題解了,困難的類似題3640. Trio...
‹
›
首頁
查看網路版