[商管] 100中央資結

看板Grad-ProbAsk作者 (Ahan)時間14年前 (2012/02/10 18:19), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串1/2 (看更多)
Suppose the Fibonacci series F(n) is stored sequentially into a two dimention array A[0..p-1][0..q-1], where each element is occupied by two bytes. the address of A[4][2] and A[2][3] are 2980 and 2988 , respectively, (1)Find the address of A[0][0] and A[3][8]? (2)what is the element of A[3][8] in terms of Fibonacci number? 第一題就只是考陣列的address而已 經過計算可以得到 A[0][0]=2948 , A[3][8] = 3050 , 至於row數算出來=6 但第二小題一直感覺很不確定 如果是從第A[0][0]從F(0)開始一一存放, 那答案是 6*(7-0+1) + (3-0+1) = F(52)嗎? ==> 以上的想法是 從第0行放到第7行共8行 , 再加上從第0列放到第3列共4列 6*8 + 4 = 52 還是我誤解題意了呢 懇請眾高手解惑! 先大大感謝各位>< -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 114.33.85.114 ※ 編輯: hanka23 來自: 114.33.85.114 (02/10 18:59)
文章代碼(AID): #1FDEynU6 (Grad-ProbAsk)
文章代碼(AID): #1FDEynU6 (Grad-ProbAsk)