HBC209994CombinationofPhysicsandMaths题解 (roundgodhasanntimes)

爱的那么颓废 算法基础篇 36 0
想要成为编程高手?那就来试试全网最全C++题库,让您在练习中快速成长。
].One day while she's doing her physics homework, she wonders is it possible to define the physical quantity for matrices.To describe it in maths, Roundgod puts forward that the compressive force of a matrix equals the sum of all its entries, while the base area of a matrix equals the sum of the entries in its last row. Then she can calculate the pressure for a matrix with the same formula.A submatrix is obtained by taking nonempty subsets of its rows and columns. Formally, given a nonempty subsequence. begin{bmatrix} a_{S_1, T_1} & a_{S_1, T_2} & cdots & a_{S_1, T_{|T|}} \ a_{S_2, T_1} & a_{S_2, T_2} & cdots & a_{S_2, T_{|T|}} \vdots & vdots & ddots & vdots \ a_{S_{|S|}, T_1} & a_{S_{|S|}, T_2} &cdots & a_{S_{|S|}, T_{|T|}} end{bmatrix}

Roundgod has an n times m n×m matrix A = [a_{i,j}] A=[a i,j ​ ]. One day while she's doing her physics homework, she wonders is it possible to define the physical quantity for matrices. As we all know, the pressure p p satisfies a formula p=frac{F}{S} p= S F ​ , where F F is the compressive force and S S is the base area. To describe it in maths, Roundgod puts forward that the compressive force of a matrix equals the sum of all its entries, while the base area of a matrix equals the sum of the entries in its last row. Then she can calculate the pressure for a matrix with the same formula. Your goal is to find the submatrix of A A with maximum pressure. A submatrix is obtained by taking nonempty subsets of its rows and columns. Formally, given a nonempty subsequence  S S of {1,2, ldots, n} {1,2,…,n} and a nonempty subsequence T T of {1, 2, ldots, m} {1,2,…,m}, then begin{bmatrix} a_{S_1, T_1} & a_{S_1, T_2} & cdots & a_{S_1, T_{|T|}} \ a_{S_2, T_1} & a_{S_2, T_2} & cdots & a_{S_2, T_{|T|}} \​vdots & vdots & ddots & vdots \ a_{S_{|S|}, T_1}​ & a_{S_{|S|}, T_2}​ &cdots & a_{S_{|S|}, T_{|T|}} end{bmatrix} ⎣ ⎢ ⎢ ⎢ ⎡ ​ a S 1 ​ ,T 1 ​ ​ a S 2 ​ ,T 1 ​ ​ ​⋮ a S ∣S∣ ​ ,T 1 ​ ​ ​ ​ a S 1 ​ ,T 2 ​ ​ a S 2 ​ ,T 2 ​ ​ ⋮ a S ∣S∣ ​ ,T 2 ​ ​ ​ ​ ⋯ ⋯ ⋱ ⋯ ​ a S 1 ​ ,T ∣T∣ ​ ​ a S 2 ​ ,T ∣T∣ ​ ​ ⋮ a S ∣S∣ ​ ,T ∣T∣ ​ ​ ​ ⎦ ⎥ ⎥ ⎥ ⎤ ​ is a submatrix of A A.

HBC209994CombinationofPhysicsandMaths题解
(roundgodhasanntimes)-第1张图片-东莞河马信息技术
(图片来源网络,侵删)
不断挑战自我,才能突破极限!全网最全C++题库,让您在编程道路上越走越远。

标签: HBC209994CombinationofPhysicsandMaths题解