-
zoj1094
zoj094
Matrix multiplication problem is a typical example of dynamical programming.
Suppose you have to evaluate an expression like A*B*C*D*E where A,B,C,D and E are matrices. Since matrix multiplication is associative, the order in which multiplications are performed is arbitrary. However, the number of elementary multiplications needed strongly depends on the evaluation order you choose.
For example, let A be a 50*10 matrix, B a 10*20 matrix and C a 20*5 matrix.
There are two different strategies to compute A*B*C, namely (A*B)*C and A*(B*C).
The first one takes 15000 elementary multiplications, but the second one only 3500.
Your job is to write a program that determines the number of elementary multiplications needed for a given evaluation strategy.
(Matrix multiplication problem is a typical example of dynamical programming.
Suppose you have to evaluate an expression like A*B*C*D*E where A,B,C,D and E are matrices. Since matrix multiplication is associative, the order in which multiplications are performed is arbitrary. However, the number of elementary multiplications needed strongly depends on the evaluation order you choose.
For example, let A be a 50*10 matrix, B a 10*20 matrix and C a 20*5 matrix.
There are two different strategies to compute A*B*C, namely (A*B)*C and A*(B*C).
The first one takes 15000 elementary multiplications, but the second one only 3500.
Your job is to write a program that determines the number of elementary multiplications needed for a given evaluation strategy.
)
- 2012-06-10 10:38:53下载
- 积分:1
-
MFC_dialog_based_calculator_source
基于MFC对话框的计算器源码MFC dialog-based calculator source(Calculator Source dialog based MFC MFC dialog-based calculator source)
- 2010-08-07 10:57:21下载
- 积分:1
-
FTool
说明: 使用MFC技术演示了如何安装和加载驱动,驱动代码在另外一个上传文件中(Using MFC technology to demonstrate how to install and load drivers)
- 2019-03-08 10:46:57下载
- 积分:1
-
DicomDisplay
vtkImageViewer2实现的放大,缩小,window color/window level调整(vtkImageViewer2 achieve zoom in, zoom, window color/window level adjustment)
- 2013-07-13 13:02:54下载
- 积分:1
-
Inject
禁用系统热键实例。接口形式,比较方便,可下载试用。(Disable system hotkeys instance.)
- 2009-12-30 09:36:15下载
- 积分:1
-
t_windows
透明窗体,可一始终悬浮在窗口上,背景可一是视频或图象等,也就是窗口的分层。。。。(trans windows)
- 2009-12-31 15:12:27下载
- 积分:1
-
mat4501vc
能与vc很好结合使用,极大减少编程人员的时间(easy to use with vc
)
- 2010-05-27 20:23:32下载
- 积分:1
-
mp3
The first task at hand is to set up the endpoints appropriately for this example. The following code switches the CPU clock speed
to 48 MHz (since at power-on default it is 12 MHz), and sets up EP2 as a Bulk OUT endpoint, 4x buffered of size 512, and EP6
as a Bulk IN endpoint, also 4x buffered of size 512. This set-up utilizes the maximum allotted 4-KB FIFO space. It also sets up
the FIFOs for manual mode, word-wide operation, and goes through a FIFO reset and arming sequence to ensure that they are
ready for data operations(The first task at hand is to set up the endpoints appropriately for this example. The following code switches the CPU clock speedto 48 MHz (since at power-on default it is 12 MHz), and sets up EP2 as a Bulk OUT endpoint, 4x buffered of size 512, and EP6as a Bulk IN endpoint, also 4x buffered of size 512. This set-up utilizes the maximum allotted 4-KB FIFO space. It also sets upthe FIFOs for manual mode, word-wide operation, and goes through a FIFO reset and arming sequence to ensure that they areready for data operations)
- 2007-12-26 19:22:07下载
- 积分:1
-
simply-calculate
这是我在学VC++时做的一个简单的计算器,类似于windows的(This is my school VC when doing a simple calculator, similar to the windows)
- 2007-06-14 14:59:58下载
- 积分:1
-
Blowfishdaimashixian
说明: 这是Blowfish算法实例
VC++实现的(This is the Blowfish algorithm examples of the VC)
- 2006-05-05 14:21:40下载
- 积分:1