登录
首页 » Visual C++ » zoj1094

zoj1094

于 2012-06-10 发布 文件大小:1KB
0 132
下载积分: 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 个回复

  • CHUAWEI
    华为C++中级培训教材,包含一个word文件和一个ppt文件。(Huawei C++ Intermediate training materials, contains a word file and a ppt file.)
    2010-12-31 19:12:50下载
    积分:1
  • Thinking_in_CPP
    C++编程思想英文版,很好的一本C++编程书籍。(thinking in C++)
    2012-09-23 04:43:15下载
    积分:1
  • Sokkia-Total-Station-Control-Command
    索佳、拓普康全站仪串口通信控制指令,通过软件控制仪器实现联机通信与自动测量。(Total Station Control Command)
    2021-03-10 10:39:27下载
    积分:1
  • internal-staffs-learning-materials
    华为内部员工学习资料,对于想进华为的朋友会有很大帮助。(The internal staff s learning materials in huawei is more helpfull for someone who want to go huawei.)
    2012-02-17 11:43:08下载
    积分:1
  • Visual-CPP--self-study-manual17
    Visual C++ 完全自学手册第十七章。很好的资料。(The Visual C++ completely self-Manual Chapter XVII. Very good information.)
    2012-08-26 19:47:15下载
    积分:1
  • DynamicButtonNavigation
    说明:  发一个具有动态按钮的C#窗体界面实例源程序,看似专业的界面,实际上都是些比较基础的知识技巧的运用,在大家以后的编程中,这也是很常见的,做出一个专业的软件界面,这就是基矗(Made a dynamic button instance of C# source code form interface, professional-looking interface, in fact, some basis of comparison is the use of knowledge skills, in all future programming, this is very common to make a professional software interface, which is based Jinchu)
    2010-04-02 19:42:56下载
    积分:1
  • prime
    判断数字是否是质数,很好用的,对于小学生来说!(Determine whether the number is a prime number, the good, is for students!)
    2010-12-02 23:02:53下载
    积分:1
  • PL0-The-compiler
    一、完成的实验内容及说明 基本内容 (1)扩充赋值运算:+ 和 - (2)扩充语句 REPEAT <语句序列> DOWHILE <条件> 其中,<条件>是循环条件,即条件成立时,重复执行循环体的< 语句序列> 选做内容 (1)增加运算:++ 和 。 (2)增加类型:① 字符类型; ② 实数类型。 (3)扩充函数:① 有返回值和返回语句;② 有参数函数。 (4)增加一维数组类型 (A, the experiment content and complete The basic content Operation: (1) expand the assignment+ and (2) REPEAT expansion statements < > statement sequence Conditions of DOWHILE < > Among them, the conditions of < > is loop condition, namely conditions founded, repeat the loop body < > statement sequence Choose to do content (1) operation:++ and . (2) types: (1) character types (2) real types. (3) the expansion of function: (1) has a return value and return statement (2) a parameter function. (4) increase a one-dimensional array type)
    2020-07-16 22:38:54下载
    积分:1
  • 资源查看
    类似于“资源管理器”的程序,可以查看,系统的所有资源(similar to the "resource management for" process, can view, the system of all resources)
    2005-04-23 10:14:15下载
    积分:1
  • Windows563108816
    windows程序设计权威版书籍,详尽,全面,用起来很好(authoritative version of windows programming books, detailed, comprehensive, and use them well)
    2012-11-07 20:46:46下载
    积分:1
  • 696518资源总数
  • 105547会员总数
  • 4今日下载