大整數(shù)乘法例子代碼 /* 遞歸邊界,如果是1位二進(jìn)制數(shù)與1位二進(jìn)制數(shù)相乘,則可以直接計(jì)算 */ /*累計(jì)做1位二進(jìn)制乘法運(yùn)算的次數(shù)*/ /* return (X*Y) */ /* 計(jì)算n的值 */ /* 把X和Y拆分開(kāi)來(lái),令X=A*2^(n/2)+B, 左移位運(yùn)算,mod = 1<<(n/2) */ /* 計(jì)算XY=AC*2^n+(AD+CB)*2^(n/2)+BD */ /* 計(jì)算A*C,再向左移n位 */ /* 遞歸計(jì)算A*D */ /* 遞歸計(jì)算C*B */ /* 計(jì)算a21+a22,再向左移n/2位 */ /* 遞歸計(jì)算B*D */ /* XY=a1+a2+a3 */
上傳時(shí)間: 2015-05-19
上傳用戶(hù):gyq
The government of a small but important country has decided that the alphabet needs to be streamlined and reordered. Uppercase letters will be eliminated. They will issue a royal decree in the form of a String of B and A characters. The first character in the decree specifies whether a must come ( B )Before b in the new alphabet or ( A )After b . The second character determines the relative placement of b and c , etc. So, for example, "BAA" means that a must come Before b , b must come After c , and c must come After d . Any letters beyond these requirements are to be excluded, so if the decree specifies k comparisons then the new alphabet will contain the first k+1 lowercase letters of the current alphabet. Create a class Alphabet that contains the method choices that takes the decree as input and returns the number of possible new alphabets that conform to the decree. If more than 1,000,000,000 are possible, return -1. Definition
標(biāo)簽: government streamline important alphabet
上傳時(shí)間: 2015-06-09
上傳用戶(hù):weixiao99
* 高斯列主元素消去法求解矩陣方程AX=B,其中A是N*N的矩陣,B是N*M矩陣 * 輸入: n----方陣A的行數(shù) * a----矩陣A * m----矩陣B的列數(shù) * b----矩陣B * 輸出: det----矩陣A的行列式值 * a----A消元后的上三角矩陣 * b----矩陣方程的解X
上傳時(shí)間: 2015-07-26
上傳用戶(hù):xauthu
數(shù)據(jù)結(jié)構(gòu) 1、算法思路: 哈夫曼樹(shù)算法:a)根據(jù)給定的n個(gè)權(quán)值{W1,W2… ,Wn }構(gòu)成 n棵二叉樹(shù)的集合F={T1,T2…,T n },其中每棵二叉樹(shù)T中只有一個(gè)帶權(quán)為W i的根結(jié)點(diǎn),其左右子樹(shù)均空;b)在F中選取兩棵根結(jié)點(diǎn)的權(quán)值最小的樹(shù)作為左右子樹(shù)構(gòu)造一棵新的二叉樹(shù),且置新的二叉樹(shù)的根結(jié)點(diǎn)的權(quán)值為其左、右子樹(shù)上結(jié)點(diǎn)的權(quán)值之和;c)F中刪除這兩棵樹(shù),同時(shí)將新得到的二叉樹(shù)加入F中; d)重復(fù)b)和c),直到F只含一棵樹(shù)為止。
標(biāo)簽: 算法 W1 數(shù)據(jù)結(jié)構(gòu) 樹(shù)
上傳時(shí)間: 2016-03-05
上傳用戶(hù):lacsx
(1) 、用下述兩條具體規(guī)則和規(guī)則形式實(shí)現(xiàn).設(shè)大寫(xiě)字母表示魔王語(yǔ)言的詞匯 小寫(xiě)字母表示人的語(yǔ)言詞匯 希臘字母表示可以用大寫(xiě)字母或小寫(xiě)字母代換的變量.魔王語(yǔ)言可含人的詞匯. (2) 、B→tAdA A→sae (3) 、將魔王語(yǔ)言B(ehnxgz)B解釋成人的語(yǔ)言.每個(gè)字母對(duì)應(yīng)下列的語(yǔ)言.
上傳時(shí)間: 2013-12-30
上傳用戶(hù):ayfeixiao
2. 進(jìn)入程序后,即會(huì)顯示提示用戶(hù)是否需要?jiǎng)?chuàng)建魔王詞匯,選擇y則用戶(hù)自己創(chuàng)建魔王詞匯,選擇n則使用默認(rèn)的魔王詞匯為:默認(rèn)的魔王詞匯(只有A=sae,B=tAdA,C=sce,D=sde)之后會(huì)有相關(guān)的作者信息。下面就提示用戶(hù)輸入魔王語(yǔ)句,輸入完后就會(huì)輸出翻譯后的魔王語(yǔ)句。
標(biāo)簽: 程序
上傳時(shí)間: 2016-08-17
上傳用戶(hù):hoperingcong
利用偉福 Lab2000P單片機(jī)實(shí)驗(yàn)儀上提供的顯示電路和鍵盤(pán)電路,做一個(gè)簡(jiǎn)單的計(jì)算器。用十六進(jìn)制A鍵 =‘+’、B鍵 =‘-’、C鍵 = ‘x’、D鍵 = ‘/’、E鍵 = ‘=’、F鍵 = ‘C’。
標(biāo)簽: 2000P 2000 Lab 單片機(jī)
上傳時(shí)間: 2016-08-22
上傳用戶(hù):ukuk
flash 鍵盤(pán)音效取自win2000系統(tǒng)ding.wav,經(jīng)過(guò)CoolEdit處理成音階,在Flash中導(dǎo)入在相應(yīng)按鈕上。 沒(méi)有難度,就是耐心一點(diǎn),成績(jī)不錯(cuò)哦! 對(duì)應(yīng)表: 低音G-a #G-w A-s #A-e B-d 中音C-f #C-t D-g #D-y E-h F-j #F-i G-k #G-o A-l #A-p B- 高音C-1 D-2 E-3 F-4 G-5 A-6 B-7 C(high)-8 #C-c #D-v #F-b #G-n #A-m
上傳時(shí)間: 2014-02-06
上傳用戶(hù):ljmwh2000
made by: kangkai data:2008.11.23 this one is used to test arm7 str71x. use a led to test GPIO. a---------P0.0 b---------P0.1 c---------P0.2 d---------P0.3 e---------P0.4 f---------P0.5 g---------P0.6 just run it and you will see the led to show 0-9 all the time.
標(biāo)簽: test kangkai made 2008
上傳時(shí)間: 2016-12-16
上傳用戶(hù):moerwang
簡(jiǎn)單的無(wú)線遙控音樂(lè)制作 采用HC2272,HC2262接收, 對(duì)應(yīng)管腳連接: 1、無(wú)線遙控部分 D0----P1^0 D1----P1^1 D2----P1^2 D3----P1^3 VT----P3^2 2、顯示部分: 74LS48驅(qū)動(dòng)共陰數(shù)碼管 A-----P3^0 B-----P3^1 C-----P3^2 D-----P3^3 3、蜂鳴器(或喇叭) P3^4
上傳時(shí)間: 2014-12-01
上傳用戶(hù):txfyddz
蟲(chóng)蟲(chóng)下載站版權(quán)所有 京ICP備2021023401號(hào)-1