/* 自定義代碼塊樣式 */
Herr Deng桑的教學blog
這是Herr Deng桑的教學blog,主要處理作業與班導事務,另外還有數位小品。
網頁
首頁
密碼學
程式設計Programming
APP
計算機概論
herrDeng網內搜尋
自訂搜尋
Ads
2025年12月10日 星期三
py3 C C++階乘模運算速解Leetcode 3577 Count the Number of Computer Unlocking Pe...
py3 C C++階乘模運算速解Leetcode 3577 Count the Number of Computer Unlocking Permutations
[1-liner Py3請進]
按我讀文 »
2025年12月8日 星期一
Py3 C++利用Euclid公式達O(n)解Leetcode1925 Count Square Sum Triples
Py3 C++利用Euclid公式達O(n)解Leetcode 1925 Count Square Sum Triples
用數論方法解畢氏定理三角整數解個數,這應該算是Diophantine Equation中最簡單的例題
[Py3解請進]
按我讀文 »
2025年12月2日 星期二
Py3 C++ hashmap多項次公式解梯形問題Leetcode 3623 Count Number of Trapezoids I
Py3 CPP多項次公式解梯形問題Leetcode 3623 Count Number of Trapezoids I
數有幾個不同水平梯形,先用hash map數有相同y座標的點,再用多項次公式解題
[Py3解請進]
按我讀文 »
2025年11月27日 星期四
Py3 C C++ prefix sum解Leetcode 3381 Maximum Subarray Sum With Length Div...
Py3 C C++ prefix sum解Leetcode 3381 Maximum Subarray Sum With Length Divisible by K
Very similar to Kadane's algorithm
[Py3 code請進]
按我讀文 »
2025年11月25日 星期二
Py3 C++找出pattern迭代變化解出Leetcode 1015 Smallest Integer Divisible by K
所謂的數論問題,也不一定是是像費馬定理那樣的大問題,能找出數字間的pattern也都是值得玩味的
執行直到 r=(10*r+1)%k==0(其中 k 與 2 和 5 互質),否則返回 -1
[Py3 code請進]
按我讀文 »
2025年11月21日 星期五
AI人工智慧Keras實作神經網路模型之mnist手寫數字辨識
iPython code請進
按我讀文 »
2025年11月16日 星期日
C++用 -1 mask法達到branchless解Leetcode1513 Number of Substrings With Only 1...
C++用 -1 mask法達到branchless解Leetcode1513 Number of Substrings With Only 1s|Py3 1-liner
其實很容易,想練功,試試一行解,或是把if分岔拿掉
[C++無分岔解請進]
按我讀文 »
2025年11月14日 星期五
Py3 C++ 2D sweep解Leetcode 2536 Increment Submatrices by One
Py3 C++ 2D sweep解Leetcode 2536 Increment Submatrices by One
使用2D掃描,方法為line sweep的2D推廣,方便好用。
[Py3解請進]
按我讀文 »
2025年11月9日 星期日
C++ Py3 Euclidean Algorithm解Leetcode 2169 Count Operations to Obtain Zero
C++ Py3 Euclidean Algorithm解Leetcode 2169 Count Operations to Obtain Zero
[Py3一行解請進]
按我讀文 »
2025年11月8日 星期六
Py3 C++導出遞迴公式解難題Leetcode1611 Minimum One Bit Operations to Make Integer...
Py3 C++導出遞迴公式解難題Leetcode1611 Minimum One Bit Operations to Make Integers Zero從導出公式到寫出code,一次完成解Leetcode難題
[C++一行解請進]
按我讀文 »
較新的文章
較舊的文章
首頁
訂閱:
文章 (Atom)
熱門文章
test
test請留言! 到第十前,都沒說對!提示一下: 形態轉換int->float int sum=596; average=(double)sum/10; average=sum/10; 有何不同?
簡易程式2(平方和)
請用C/C++ 程式計算 S=1*1+2*2+3*3+4*4+.....+20*20=?
Vigenere加密
明文=I'm student key=(2,15,8) 密文=?
C字串練習
C字串練習 字串 char word[]="You win!"; 輸出為: You win! You win You wi You w You You Yo Y 給進階使用者: gets () 是個危險的函式!
何謂public-key密碼系統?....
何謂public-key密碼系統? 何謂secret-key密碼系統? 各列舉五種!
請問這張卡?
請問這張卡所用的資訊技術與資安功能?
ex9 請問何謂非對稱性密碼?
請問何謂非對稱性密碼? 並列舉五種以上非對稱密碼的演算法名稱。
Ex2 請破譯以下enigma密文
ECTJGJMUGEFVHZYLQFMQKKXFYIOSNLOJVSAFYSJLWIYUFJSDER FIDTCKSDFSITUMGOWJLZJZPBKLCIVVDYVICGRBFBYSXMRAOBHZ GQXQXCQAFPSXCGYJTJSHUINWPPLIJISZNNQCBV...
寫一個double-for迴圈
寫一個double-for迴圈,輸入n,其時間計算複雜度為O(nlog n)。 提示: C副程式時間複雜度O(n*log^2(n))
ex2
請將執行結果貼出>