問題描述 設(shè)有n種不同面值的硬幣,各硬幣的面值存于數(shù)組T[1:n]中。現(xiàn)要用這些面值的硬幣來(lái)找錢,可以實(shí)用的各種面值的硬幣個(gè)數(shù)不限。當(dāng)只用硬幣面值T[1],T[2],…,T[i]時(shí),可找出錢數(shù)j的最少硬幣個(gè)數(shù)記為C(i,j)。若只用這些硬幣面值,找不出錢數(shù)j時(shí),記C(i,j)=∞。 編程任務(wù) 設(shè)計(jì)一個(gè)動(dòng)態(tài)規(guī)劃算法,對(duì)1≤j≤L,計(jì)算出所有的C( n,j )。算法中只允許實(shí)用一個(gè)長(zhǎng)度為L(zhǎng)的數(shù)組。用L和n作為變量來(lái)表示算法的計(jì)算時(shí)間復(fù)雜性 數(shù)據(jù)輸入 由文件input.txt提供輸入數(shù)據(jù)。文件的第1行中有1個(gè)正整數(shù)n(n<=13),表示有n種硬幣可選。接下來(lái)的一行是每種硬幣的面值。由用戶輸入待找錢數(shù)j。 結(jié)果輸出 程序運(yùn)行結(jié)束時(shí),將計(jì)算出的所需最少硬幣個(gè)數(shù)輸出到文件output.txt中。
標(biāo)簽:
上傳時(shí)間: 2016-07-28
上傳用戶:yangbo69
AES在AVR單片機(jī)上的實(shí)現(xiàn) 資源要求 Program: 4492 bytes (6.9% Full) (.text + .data + .bootloader) Data: 745 bytes (9.1% Full) (.data + .bss + .noinit) 可以在AVR Studio中模擬運(yùn)行 AES加密和解密 在AVR Studio 中模擬運(yùn)行 Ctrl+F7 后,模擬執(zhí)行到main入口處 按F5后, 知道到加密完成 可以看出加密的結(jié)果 再按F10,執(zhí)行解密, 可以看出input數(shù)組恢復(fù)了 原來(lái)的結(jié)果
標(biāo)簽: bootloader Program bytes 4492
上傳時(shí)間: 2016-07-30
上傳用戶:363186
對(duì)任意給定的文法G 構(gòu)造LR(1) 項(xiàng)目集規(guī)范族,其中要實(shí)現(xiàn)CLOSURE(I)、GO(I,X)、FIRST 集合等。在此基礎(chǔ)上, 構(gòu)造了LR(1)分析表。然后對(duì)輸入的句子進(jìn)行語(yǔ)法分析,給出接受或出錯(cuò)報(bào)告。 程序采用文件輸入輸出方式。其中包括兩個(gè)輸入文件:文法grammar.txt,以及 輸入串input.txt;兩個(gè)輸出文件:項(xiàng)目集items.txt 和文法的LR(1)分析表 action_table.txt。由于語(yǔ)法分析的結(jié)果只給出接受或錯(cuò)誤報(bào)告,比較簡(jiǎn)
上傳時(shí)間: 2016-07-30
上傳用戶:來(lái)茴
基于S3C2440的四線電阻式觸摸屏驅(qū)動(dòng)程序,linux2.6.22內(nèi)核。把touchscreen.c放在driver/input/touchscreen/下。修改arch/arm/mach-s3c2440/mach-smdk2440.c以及相應(yīng)的Makefile加上驅(qū)動(dòng)即可。
標(biāo)簽: S3C2440 四線電阻式 觸摸屏 驅(qū)動(dòng)程序
上傳時(shí)間: 2014-01-14
上傳用戶:zmy123
-- DESCRIPTION : Shift register -- Type : univ -- Width : 4 -- Shift direction: right/left (right active high) -- -- CLK active : high -- CLR active : high -- CLR type : synchronous -- SET active : high -- SET type : synchronous -- LOAD active : high -- CE active : high -- SERIAL input : SI
標(biāo)簽: Shift right DESCRIPTION direction
上傳時(shí)間: 2013-12-02
上傳用戶:gxrui1991
This article introduces how to construct a Hospital Ward Information System with three-tiered technology. The System applies to UML, BDE, MIDAS, distributed compute theory and a special architecture to make such functions: patients check in and check out, prescription input, drug-delivery at center pharmacy and information of patient manage with computer networking.
標(biāo)簽: three-tiered Information introduces construct
上傳時(shí)間: 2016-08-16
上傳用戶:hn891122
RS232.C was written to provide all of the basic functionality needed to employ serial I/O in any application written with Borland C language compilers. Some features are: 1. Ease of use. No assembly language or library files are used and a simple "#include" statement is all that is required to access all of the functions provided. 2. Both input and output are buffered and interrupt driven for efficiency. 3. Serial ports 1 - 4 are supported on PC, AT and PS/2 compatibles.Chained interrupts used on port 3 and 4 are allowed for so as not to interfere with devices such as a mouse or printer. Transmission speeds of 110 to 115200 baud are available. 4. Detection and utilization of hardware buffered UARTs (NS16550AF etc.) found in some machines is automatic. 5. Interrupt driven hardware and XON/XOFF flow control is provided for. 6. All source code is included. RS232.C can be used with all memory models.
標(biāo)簽: functionality provide written employ
上傳時(shí)間: 2016-08-24
上傳用戶:小眼睛LSL
a sample WDM stream class video capture driver that supports two IEEE 1394 digital cameras. The same driver may be able to support other digital cameras that conform to 1394-based Digital Camera Specification from 1394 Trade Association. Digital camera supported by dcam.sys is a data source that produces digital image data without any other input connection. It manifests itself in a DirectShow graph as a WDM Streaming Capture Device and as a capture filter that has output capture stream supporting image sizes of 320x240 with a UYVY color space. Its de-compressor, Msyuv.dll, is part of the OS delivery, and it can convert image data format from UYVY to RGB16, RGB8, or to a Direct Draw surface if the video card supports UYVY format.
標(biāo)簽: supports capture cameras digital
上傳時(shí)間: 2014-01-13
上傳用戶:yph853211
MS-Clustering is designed to rapidly cluster large MS/MS datasets. The program merges similar spectra (having similar m/z values ?within a given tolerance), and creates a single consensus spectrum as a representative. The input formats accepted are: dta, mgf, mzXML. The output format is mgf.
標(biāo)簽: MS-Clustering designed datasets cluster
上傳時(shí)間: 2013-12-20
上傳用戶:cursor
國(guó)際化、多國(guó)語(yǔ)言的處理,Internationalization and Multiple Language Support
上傳時(shí)間: 2016-08-29
上傳用戶:bjgaofei
蟲蟲下載站版權(quán)所有 京ICP備2021023401號(hào)-1