Re: 即時戰況

看板ACMCLUB作者 (DE)時間21年前 (2004/11/08 08:14), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串15/30 (看更多)
※ 引述《pangfeng (Ikari Gendou)》之銘言: : ※ 引述《CorruptAngel (微笑面具)》之銘言: : : pe DVD problem(也許是greedy 不確定) (a.k.a paging problem) : : There r k DVD readers, more than k DVDs, and a request list. : : To minimize the value of insertion. : OS 的恐龍書有提到greedy就是optimal. : 作法我記得是將現存page中'最後才會被使用'的移除. : 很多隊都知道要這樣作,但都WA. : 我剛才想到,是不是沒考慮到'以後都不出現'的page? : 這種page事實上要先移除,因為它也算'最後才會被使用'. I create a 1-D array to record when is the next time the DVD will be requested,and if it won't appear again,give it a value 110 (because the max length is 100),and got WA....><.. We though that greedy was an incorrect algorithm,so didn't debug....... (chinese typing crashed...XD) -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 140.112.30.82
文章代碼(AID): #11Zhg2XU (ACMCLUB)
討論串 (同標題文章)
文章代碼(AID): #11Zhg2XU (ACMCLUB)