作者denehs (DE)
看板ACMCLUB
标题Re: 即时战况
时间Mon Nov 8 08:18:57 2004
※ 引述《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