问题描述 设有n种不同面值的硬币,各硬币的面值存于数组T[1:n]中。现要用这些面值的硬币来找钱,可以实用的各种面值的硬币个数不限。当只用硬币面值T[1],T[2],…,T[i]时,可找出钱数j的最少硬币个数记为C(i,j)。若只用这些硬币面值,找不出钱数j时,记C(i,j)=∞。 编程任务 设计一个动态规划算法,对1≤j≤L,计算出所有的C( n,j )。算法中只允许实用一个长度为L的数组。用L和n作为变量来表示算法的计算时间复杂性 数据输入 由文件input.txt提供输入数据。文件的第1行中有1个正整数n(n<=13),表示有n种硬币可选。接下来的一行是每种硬币的面值。由用户输入待找钱数j。 结果输出 程序运行结束时,将计算出的所需最少硬币个数输出到文件output.txt中。
标签:
上传时间: 2016-07-28
上传用户:yangbo69
crc_table.c is for reset seed( 0000 ) crc_table_1.c is for reset seed( ffff) CRC16_D8_m.v is a verilog module of byte paralle crc. CRC16_D8_m_tb.v is the testbench file of above module.
上传时间: 2014-01-09
上传用户:181992417
This is the source for a C compiler that generates 386 or m68K code. Code generation is fairly good although the optimizer is a little naive... the code itself should be highly portable although there are some issues involved with porting from MSDOS that have to be resolved for example the size of LONG on unix machines is so big some of the code generated gets messed up. Code generation requires TASM to assemble the compiler output you can use the borland TLINK to produce executables, or the Watcom WLINK can also be used. PMODE systems written by TRAN are used for the DPMI interface.
标签: generation generates compiler fairly
上传时间: 2016-08-01
上传用户:sxdtlqqjl
① 使用自动机技术实现一个词法分析程序; ② 使用算符优先分析方法实现其语法分析程序; 需要先在运行目录下建立一个input.txt文件,将需要分析的文法放在该文件中,分析结果,会输出在output.txt文件中。
上传时间: 2013-12-09
上传用户:stampede
Flash中内置了一个状态寄存器(Status Register,SR)来指示Flash的当前工作状态和各种操作是否成功。要读取SR的当前值需要向CUI发送读状态寄存器命令(Read Status Register),命令码为0x70,SR中的内容将在DQ[7:0]上输出。The Read Status Register (0x70)command causes subsequent reads to output data from the SR until another command is issued. The SR bits are output on DQ[7:0].
上传时间: 2016-08-12
上传用户:thesk123
可编程并行接口8255A完成的交通灯实验 用8255A的B端口和C端口控制12个LED的亮和灭(输出为0则亮,输出为1则灭),模拟十字路口的交通灯。 -programmable parallel interface 8255A completed, the traffic lights experimental 8255A port B and C - I control 12 LED bright and methomyl (output of 0-liang, the output of an anti), the simulation of traffic lights at a crossroads.
上传时间: 2016-08-13
上传用户:来茴
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.
标签: functionality provide written employ
上传时间: 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.
标签: supports capture cameras digital
上传时间: 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.
标签: MS-Clustering designed datasets cluster
上传时间: 2013-12-20
上传用户:cursor
winavr code for avr mega8. The program get data from serial port in interrupt function. And then out put the data to 74ls595 (serial to parallel IC) for controlling relay output.
标签: interrupt function program winavr
上传时间: 2013-12-22
上传用户:cjl42111