文件名称:JUZHEN
-
所属分类:
- 标签属性:
- 上传时间:2012-11-16
-
文件大小:397.16kb
-
已下载:0次
-
提 供 者:
-
相关连接:无下载说明:别用迅雷下载,失败请重下,重下不扣分!
介绍说明--下载内容来自于网络,使用问题请自行百度
Descr iption
给定一个有N个矩阵的矩阵链A1A2A3...An,矩Ai的维数为pi-1*pi。我们都知道,使用朴素的矩阵乘法去乘两个维数分别为x,y和y,z的矩阵,所需要的乘法次数为x*y*z。矩阵链乘法问题就是如何对矩阵乘积加括号,使得它们的乘法次数达到最少。
Input
输入的第一行为一个正整数N(1<=N<=200)。表示矩阵的个数。
输入的第二行包含N+1个整数,分别表示pi(0<=i<=N),其中每个pi在[1,200]范围内。
Output
输出一个整数表示最少要进行的乘法次数。
-Descr iption Given a matrix N a matrix chain A1A2A3 ... An, moments Ai dimension of pi-1* pi. We all know that the use of simple matrix multiplication to multiply two dimensions, respectively x, y, and y, z matrix, the required number of multiplication x* y* z. Matrix-chain multiplication problem is how to add the product to the matrix in parentheses, allowing them to reach a minimum number of multiplication. Input input first acts of a positive integer N (1 < = N < = 200). Indicated that the number of matrices. Enter the second line contains N+1 integers, respectively, indicated that pi (0 < = i < = N), where each pi in [1,200] range. Output output, said at least one integer number multiplication to be carried out.
给定一个有N个矩阵的矩阵链A1A2A3...An,矩Ai的维数为pi-1*pi。我们都知道,使用朴素的矩阵乘法去乘两个维数分别为x,y和y,z的矩阵,所需要的乘法次数为x*y*z。矩阵链乘法问题就是如何对矩阵乘积加括号,使得它们的乘法次数达到最少。
Input
输入的第一行为一个正整数N(1<=N<=200)。表示矩阵的个数。
输入的第二行包含N+1个整数,分别表示pi(0<=i<=N),其中每个pi在[1,200]范围内。
Output
输出一个整数表示最少要进行的乘法次数。
-Descr iption Given a matrix N a matrix chain A1A2A3 ... An, moments Ai dimension of pi-1* pi. We all know that the use of simple matrix multiplication to multiply two dimensions, respectively x, y, and y, z matrix, the required number of multiplication x* y* z. Matrix-chain multiplication problem is how to add the product to the matrix in parentheses, allowing them to reach a minimum number of multiplication. Input input first acts of a positive integer N (1 < = N < = 200). Indicated that the number of matrices. Enter the second line contains N+1 integers, respectively, indicated that pi (0 < = i < = N), where each pi in [1,200] range. Output output, said at least one integer number multiplication to be carried out.
(系统自动生成,下载前可以参看下载内容)
下载文件列表
JUZHEN.plg
Debug/JUZHEN.obj
Debug/JUZHEN.pch
Debug/vc60.idb
Debug/vc60.pdb
JUZHEN.cpp
JUZHEN.dsp
JUZHEN.dsw
JUZHEN.ncb
JUZHEN.opt
Debug
Debug/JUZHEN.obj
Debug/JUZHEN.pch
Debug/vc60.idb
Debug/vc60.pdb
JUZHEN.cpp
JUZHEN.dsp
JUZHEN.dsw
JUZHEN.ncb
JUZHEN.opt
Debug
本网站为编程资源及源代码搜集、介绍的搜索网站,版权归原作者所有! 粤ICP备11031372号
1999-2046 搜珍网 All Rights Reserved.