/* 自定義代碼塊樣式 */
Herr Deng桑的教學blog
這是Herr Deng桑的教學blog,主要處理作業與班導事務,另外還有數位小品。
網頁
首頁
密碼學
程式設計Programming
APP
計算機概論
herrDeng網內搜尋
自訂搜尋
Ads
2025年2月19日 星期三
C++py3排列組合與binary表達解Leetcode 1415 The k th Lexicographical String of Al...
C++py3排列組合與binary表達解Leetcode 1415 The k th Lexicographical String of All Happy Strings of Length n
總共有3*2^(n-1)個happy strings要求第k個。先算(k-1)除以2^(n-1)的商q與餘數r,s[0]由q決定,s[1:n]由r決定,化r為二進位,然後簡單處理一下就得解
[Py3解請進]
按我讀文 »
2025年2月18日 星期二
C++ Py3 reverse 2pointer解Leetcode 2375 Construct Smallest Number From D...
C++ Py3 reverse 2pointer解Leetcode 2375 Construct Smallest Number From DI String
[codes on Leetcode]
https://leetcode.com/problems/construct-smallest-number-from-di-string/solutions/6435240/suffix-sum-for-successive-ds-c-py3-beats-100/
較新的文章
較舊的文章
首頁
查看行動版
訂閱:
文章 (Atom)
熱門文章
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 () 是個危險的函式!
無線網路中WEP安全嗎?
Ex1 撰寫C++程式與Dev C++設定
計算你的BMI
計算你的BMI
Ex3 C++作業「13個星座」
NASA認為現在的天宮圖與3000年前不同,現在的地球軸心位置改變,星座也發生移位,所以他們決定加入「蛇夫座」。 輸入月、日,輸出所屬的13個星座。
array
array ex 1, 2,3,7,8
簡易程式2(平方和)
請用C/C++ 程式計算 S=1*1+2*2+3*3+4*4+.....+20*20=?
replace
replace(str1, str2,i) 程式碼
GCD
GCD(123456789,345634567)=?