Herr Deng桑的教學blog
這是Herr Deng桑的教學blog,主要處理作業與班導事務,另外還有數位小品。
網頁
首頁
密碼學
程式設計Programming
APP
計算機概論
herrDeng網內搜尋
自訂搜尋
Ads
2024年5月26日 星期日
python C++ DP動態規劃速解難題Leetcode 552 Student Attendance Record II
python CPP DP動態規劃速解難題Leetcode 552 Student Attendance Record II
Leetcode 552. Student Attendance Record II為什麼是難題?原來@cache這招會導致MLE。先用動態規劃解,因為參數只有一個,當然還有更快的Matrix power解法
-------
按我讀文 »
較新的文章
較舊的文章
首頁
訂閱:
文章 (Atom)
熱門文章
C 的continue & break
C 的continue & break [影片]介紹C++程式for迴圈中加上continue與break的差異之簡例 Java迴圈中的的continue & break
「全民資安素養自我評量」
教育部為提昇全民資安素養與電腦防護能力,本部於101年9月5日至11月5日舉辦「全民資安素養自我評量」活動,請在活動期間內踴躍上網檢測資訊安全素養認知程度,並有機會參與抽獎,詳情請參閱活動網站(網址: https://isafe.moe.edu.tw/event
你會用C的算子sizeof?
你會用C的算子sizeof?
python C++ DP動態規劃速解難題Leetcode 552 Student Attendance Record II
python CPP DP動態規劃速解難題Leetcode 552 Student Attendance Record II Leetcode 552. Student Attendance Record II為什麼是難題?原來@cache這招會導致MLE。先用動態規劃解...
Python C++ prefix sum mod k陣列和公式解Leetcode 974 Subarray Sums Divisible...
Python C++ prefix sum mod k陣列和公式解Leetcode 974 Subarray Sums Divisible by K 昨天的問題523. Continuous Subarray Sum會解,今日Leetcode 974. Subarray...
C++/reroot DP動態規劃解Leetcode難題834 Sum of Distances in Tree
C++/reroot DP動態規劃解Leetcode難題834 Sum of Distances in Tree 關鍵字:reroot DP。 你會發現很多關於它的討論。 對於作為根的每個節點,進行 DFS,將獲得 O(n^2) 的解決方案,但可能 TLE。 使用一次遞迴 DF...
Python C++使用prefix sum mod k + hash map解Leetcode523 Continuous Subarray...
Python C++使用prefix sum mod k + hash map解Leetcode523 Continuous Subarray Sum。模k,前綴和 (mod k) 總共有 k 個可能,為 0,1,...k-1。 對於這個條件 1 less eq nums...
[置頂]ECDSA
什麼是ECDSA?
python教學Colab開發與pytube下載youtube影片
RSA演算 Euler定理搞定LeetCode 372 Super Pow--C,C++,Python實作
RSA 演算 Euler 定理搞定#LeetCode 372 Super Pow--C,C++,Python實作。玩過數論、RSA演算的,解這個問題剛好,C++解答打敗94%,還沒有特別優化。