Re: 即時戰況
We did so too:(
but we still wrote a greedy search and got WA.
※ 引述《denehs (DE)》之銘言:
: ※ 引述《pangfeng (Ikari Gendou)》之銘言:
: : 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
討論串 (同標題文章)