標題: DS-quiz1-2016.pdf [打印本頁] 作者: may 時間: 2023-9-25 18:18 標題: DS-quiz1-2016.pdf
1.Given two matrices Am,p and Bp,n, Write procedure(pseudo code) to perform matrix multiplication A* B
給定兩個矩陣 Am,p 和 Bp,n,編寫程式(偽代碼)執行矩陣乘法 A* B
2 Suppose that an array A[1:4,0:3,2:4] is to be arranged in row-major order, beginning in the memory location 100,and each element of A[i,j] requires 2 units of storage .Identify the first memory location used for each of the following array elements.
(a )A[1,2,2]; (b)A[2,1,3]
假設數組 A[1:4,0:3,2:4] 以行優先順序排列,從內存位置 100 開始,A[i,j] 的每個元素需要 2 個存儲單元. 確定用於以下每個數組元素的第一個記憶體位置。
(a)A[1,2,2]; (b)A[2,1,3]
3.Write a procedure that uses a one-dimensional array A to store the following matrix.
寫一個程序,使用一維數組A來儲存以下矩陣。
a1,1 a1,2 ... a1,n
a2,1 a2,2 ... a2,n
... ... ... ...
am,1 am,2 ... am,n作者: may 時間: 2023-9-26 11:57 標題: 子題1_C++解