題目:利用條件運算符的嵌套來完成此題:學習成績>=90分的同學用A表示,60-89分之間的用B表示,60分以下的用C表示。 1.程序分析:(a>b)?a:b這是條件運算符的基本例子。
上傳時間: 2015-01-08
上傳用戶:lifangyuan12
RSA算法 :首先, 找出三個數(shù), p, q, r, 其中 p, q 是兩個相異的質(zhì)數(shù), r 是與 (p-1)(q-1) 互質(zhì)的數(shù)...... p, q, r 這三個數(shù)便是 person_key,接著, 找出 m, 使得 r^m == 1 mod (p-1)(q-1)..... 這個 m 一定存在, 因為 r 與 (p-1)(q-1) 互質(zhì), 用輾轉相除法就可以得到了..... 再來, 計算 n = pq....... m, n 這兩個數(shù)便是 public_key ,編碼過程是, 若資料為 a, 將其看成是一個大整數(shù), 假設 a < n.... 如果 a >= n 的話, 就將 a 表成 s 進位 (s
標簽: person_key RSA 算法
上傳時間: 2013-12-14
上傳用戶:zhuyibin
ucosII2.76在winavr(20050214版本)下的程序包,用pn打開目錄下的工程,運行make all工具即可編譯可用,絕對可用. winavr如用2006版本,需要把文件中包含文件signal.h改為interrupt.h(可能在includes.h中改一處即可)
標簽: winavr 20050214 ucosII 2.76
上傳時間: 2015-05-04
上傳用戶:xinzhch
DES,MD5,ZLIB算法源代碼 文件列表: Adler32.cpp ArithDLL.cpp ArithDLL.def ArithDLL.dll ArithDLL.dsp ArithDLL.dsw ArithDLL.h ArithDLL.lib ArithDLL.ncb ArithDLL.opt ArithDLL.plg Arithzxz.h Arithzxz.h.BAK Compress.cpp CRC.cpp Deflate.cpp Deflate.h Des.cpp Des.h Infblock.cpp Infblock.h Infcodes.cpp Infcodes.h Inffast.cpp Inffast.h Inffixed.h Inflate.cpp Inftrees.cpp Inftrees.h Infutil.cpp Infutil.h md5.cpp md5.h ReadMe.txt StdAfx.cpp StdAfx.h String.cpp Trees.cpp Zlib.h Zutil.cpp Zutil.h
上傳時間: 2014-11-23
上傳用戶:bibirnovis
WinCE環(huán)境下檢測SD卡序列號,編程環(huán)境: eVC4.0 + PPC2003。 文件清單: newres.h ReadMe.txt Resource.h SDTest.aps SDTest.cpp SDTest.h SDTest.rc SDTest.vcc SDTest.vcl SDTest.vcp SDTestDlg.cpp SDTestDlg.h StdAfx.cpp StdAfx.h
上傳時間: 2013-12-21
上傳用戶:爺?shù)臍赓|(zhì)
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
標簽: government streamline important alphabet
上傳時間: 2015-06-09
上傳用戶:weixiao99
電力系統(tǒng)在臺穩(wěn)定計算式電力系統(tǒng)不正常運行方式的一種計算。它的任務是已知電力系統(tǒng)某一正常運行狀態(tài)和受到某種擾動,計算電力系統(tǒng)所有發(fā)電機能否同步運行 1運行說明: 請輸入初始功率S0,形如a+bi 請輸入無限大系統(tǒng)母線電壓V0 請輸入系統(tǒng)等值電抗矩陣B 矩陣B有以下元素組成的行矩陣 1正常運行時的系統(tǒng)直軸等值電抗Xd 2故障運行時的系統(tǒng)直軸等值電抗X d 3故障切除后的系統(tǒng)直軸等值電抗 請輸入慣性時間常數(shù)Tj 請輸入時段數(shù)N 請輸入哪個時段發(fā)生故障Ni 請輸入每時段間隔的時間dt
標簽: 電力系統(tǒng) 正 計算 運行
上傳時間: 2015-06-13
上傳用戶:it男一枚
本驅動程序在linux2.6.17中測試通過。yangxing msn:lelma_yx@hotmail.com 希望對SPI操作的朋友有所幫助。 一、工作方式: 從設備:SPI為MASTER模式 S3C2410:SPI為SLAVE模式+DMA 二、工作流程 1.S3C2410從接收:當從設備發(fā)送數(shù)據(jù)時,S3C2410利用DMA方式收數(shù),收到指定長度的數(shù)據(jù),則進入DMA中斷,將接收的數(shù)據(jù)拷出。 2.S3C2410從發(fā)送:當S3C2410需要發(fā)送,首先由RTS請求發(fā)送,然后等待從設備應答CTS,當從設備應答CTS時,進入外部中斷,啟動DMA發(fā)送,發(fā)送完成,再次進入從接收狀態(tài)。 三、文件位置 spi_dma_slave.c spi_dma_slave.h circular_buf.c circular_buf.h 等文件存放入driver/char/目錄 dma.c存放于arch/arm/mach-s3c2410/目錄 dma.h存放于include/arm-asm/mach-s3c2410/目錄 四、使用環(huán)境 1.arm-linux-gcc-3.4.1
標簽: SPI lelma_yx yangxing hotmail
上傳時間: 2015-08-11
上傳用戶:徐孺
上下文無關文法(Context-Free Grammar, CFG)是一個4元組G=(V, T, S, P),其中,V和T是不相交的有限集,S∈V,P是一組有限的產(chǎn)生式規(guī)則集,形如A→α,其中A∈V,且α∈(V∪T)*。V的元素稱為非終結符,T的元素稱為終結符,S是一個特殊的非終結符,稱為文法開始符。 設G=(V, T, S, P)是一個CFG,則G產(chǎn)生的語言是所有可由G產(chǎn)生的字符串組成的集合,即L(G)={x∈T* | Sx}。一個語言L是上下文無關語言(Context-Free Language, CFL),當且僅當存在一個CFG G,使得L=L(G)。 *⇒ 例如,設文法G:S→AB A→aA|a B→bB|b 則L(G)={a^nb^m | n,m>=1} 其中非終結符都是大寫字母,開始符都是S,終結符都是小寫字母。
標簽: Context-Free Grammar CFG
上傳時間: 2013-12-10
上傳用戶:gaojiao1999
實習題 [問題描述] 1. 設順序表中的數(shù)據(jù)元素遞增有序,將插入到順序表的適當位置上,是該表仍然有序。 [輸入] 初始順序表,插入字符。 [輸出] 插入x后線性表的結果 [存儲結構] 采用順序存儲結構 [算法的基本思想] 建立一個遞增順序表,插入一個數(shù)值并移動元素,使其仍然有序。 程序如下: #include "iostream.h" #include <malloc.h> #define LIST_INTI_SIZE 100//初始空間大小 typedef struct SqList
標簽: 實習 元素 順序表 數(shù)據(jù)
上傳時間: 2014-01-14
上傳用戶:fhzm5658