/* 自定義代碼塊樣式 */
Herr Deng桑的教學blog
這是Herr Deng桑的教學blog,主要處理作業與班導事務,另外還有數位小品。
網頁
首頁
密碼學
程式設計Programming
APP
計算機概論
herrDeng網內搜尋
自訂搜尋
Ads
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 video shows how to use count bits & bitmask to solve this question in few lines.
[codes on Leetcode]
https://leetcode.com/problems/prime-number-of-set-bits-in-binary-representation/solutions/7595294/c-bits-count-vs-pascal-trianglebeats-100-2r67/
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++。而一般回圈解倒是不難,但須要思考一下
-----
Leetcode 696. Count Binary Substrings, though marked as easy, isn't exactly trivial; it took me some effort to solve it in branchless C++. Solving the general loop problem isn't difficult, but it needs thinking.
[codes on Leetcode]
https://leetcode.com/problems/count-binary-substrings/solutions/7590515/cout-the-successive-1s-0sbeats-100-by-an-7amm/
較新的文章
較舊的文章
首頁
訂閱:
文章 (Atom)
熱門文章
Ex1. The Imitation Game心得
金鑰總數159*10^18 億=10^8 兆=10^12 京=10^16 垓=10^20 秭=10^24 穣=10^28 溝=10^32 澗=10^36 正=10^40 載=10^44 極=10^48 恆河沙=10^52 阿僧祇=10^56 那由...
破解Caesar挪移碼
破解Caesar挪移碼JVMVEKVVE
何謂public-key密碼系統?....
何謂public-key密碼系統? 何謂secret-key密碼系統? 各列舉五種!
Ex2 請問你所使的電腦的規格
請問你所使的電腦,CPU的規格 Cache多大?其他硬體配置...... 另外, "INTEL® XEON PHI™ 處理器 7230F"的大致規格為?
傳輸模式
ECB CBC CFB OFB
Read certificate
1. 什麼是certificate? 2. fopen, fclose, rewind, ftell, fseek?
ex10 使用Blocky技術寫C程式並於linux GCC環境下編譯成組合語言
程式碼中至少要有分支如if, for, while等,需有 C code Assembly Code
作業 3
請輸出如下 * ** *** **** ***** ******
Ex12 openssl aes-128-cbc解密
openssl aes-128-cbc解密 password:123456 密文=U2FsdGVkX19jVyAOwCHurxjfDXkrd1hPTTj4BL8RZD/AW0LdkljxsmIytikI28YD
你會用C的算子sizeof?
你會用C的算子sizeof?