登录
首页 » Visual C++ » zoj1094

zoj1094

于 2012-06-10 发布 文件大小:1KB
0 158
下载积分: 1 下载次数: 4

代码说明:

  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. )

下载说明:请别用迅雷下载,失败请重下,重下不扣分!

发表评论

0 个回复

  • comElves
    基于VC++的串口调试程序可以发送接收数据,非常实用于初学者研究学习(Serial debugger based on VC++ can send and receive data, very useful for beginners learning)
    2013-03-16 22:26:29下载
    积分:1
  • Flow_Test_GetIfTable
    说明:  监控本地网卡网络流量, 如果有多个网卡, 可分别统计每个网卡的进出网络流量, 并统计总的网络流量.(Monitoring the local LAN network traffic, if there are multiple network cards, network cards can access statistics for each network traffic and overall network traffic statistics.)
    2008-10-07 17:03:43下载
    积分:1
  • SerialPortTest
    学习C++,先学串口编程,本程序就是以串口作为编程对象,进行针对串口的数据接收与发送,内含丰富的注释,纯个人理解!(To learn C++ learn first serial programming, the program is as a programming object to the serial port for serial data reception and transmission, contains a wealth of comments, pure personal understanding!)
    2013-04-28 10:18:11下载
    积分:1
  • INNETER-IC
    网络重传选择协议,可以检查传输信息的正确性。通过接受方的校检,通知发送方重新发送。 ( Network retransmission protocol, you can check the correctness of the transmission of information. By accepting the prosecution s school to notify the sender to resend.)
    2015-10-14 09:19:13下载
    积分:1
  • CDictionary
    简单英汉字典程序。功能包括装载单词信息,添加删除单词等。(Simple English-Chinese dictionary program. Features include loading the word information, add and delete words and so on.)
    2014-02-04 20:59:40下载
    积分:1
  • 2014-12-01 窗口切换
    使用MFC实现多个窗口切换,同一个窗口可以同时4、6、9个小窗口同时显示(MFC implementation of multiple window switching)
    2018-07-03 14:33:45下载
    积分:1
  • sportsmeeting
    数据结构——运动会 为帮助同学们尽快进入编程状态特提供此例 1.将SqList.h、Mdefine.h、sport.c放在同一目录下 2.按下述方法编译运行即可,体验一下 编译包含有自定义的.h文件的.c文件 一种方法: ⑴.将.c和.h文件放在某一目录下(例如:datastruct) ⑵.改变用户工作目录(用户文件所在目录) 选择"File/Chaire Dir"打开新目录输入框,输入选择的用户工作目录datastruct,执行Change Dir 改变工作目录。否则对.c文件包含的自定义的.h文件提示No open ⑶.在编辑器中打开.c文件,进行编译,运行即可 另一种方法: 在上一种方法的基础上 ⑴. 打开project菜单,选择open project ,在.c和.h文件的同一目录下创建一个工程文件 ⑵. 打开project/Add Item菜单,输入项目名,然后将.c文件增加到工程文件中。不用将.h文件加入。 ⑶.在工程文件中双击.c文件,打开.c文件,进行编译,运行即可 3. ReadFormFile(SqList &L) 从文件读入运动员成绩信息操作作为示例 (err)
    2008-12-22 20:28:14下载
    积分:1
  • GH0STwin7
    gh0st的源码可以支持win7下使用 (gh0st source supports use under win7)
    2016-09-18 17:56:51下载
    积分:1
  • 4_Disk_IO
    输入输出,I/O设备,操作系统,vc++ 6.0(Input and output, I/O devices, operating system, vc++ 6.0)
    2009-05-24 09:59:54下载
    积分:1
  • vcFtp
    学习网络编程的初学者必看的.(Learning Network Programming Watchable the beginners.)
    2004-12-06 14:00:15下载
    积分:1
  • 696518资源总数
  • 106155会员总数
  • 8今日下载