2008年7月24日星期四

ZJU/ZOJ 1108 FatMouse's Speed 解题报告

题目大意是给出n组包含2个关键字的元素,求同时满足第一个关键字递增和第二个关键字递减的序列的最长长度以及输出其中一个满足条件的序列。

对于要求两个关键字同时分别满足不降/不升,我们可以先对一个关键字进行排序,则实际上只需对另一个关键字进行DP即可求解。由于n<=1000所以用O(n^2)的DP就可以AC了。不过实际上用O(nlogn)的DP也是可以做的,只是因为存在相同数字的情况不能直接顺推,需要对序列求反(即对排序关键字的条件取反),利用一个数组记录下更新序列过程中更新的每一个元素在序列中的前一个元素,最后倒推出整个合法的序列。

3002145 2008-07-24 15:07:51 Accepted 1108 FPC 00:00.00 412K IwfWcf@LZOI

5 条评论:

  1. oakley sunglasses wholesale, http://www.oakleysunglasses-wholesale.us.com/
    ugg boots, http://www.uggbootscheap.eu.com/
    ralph lauren uk, http://www.ralphlaurenoutletuk.org.uk/
    thomas sabo uk, http://www.thomassabos.co.uk/
    michael kors factory outlet, http://www.michaelkorsfactoryoutletonline.com/
    michael kors factory outlet, http://www.michaelkorsfactoryoutlets.in.net/
    michael kors handbags, http://www.michaelkorshandbagsoutletstore.us.com/
    oakley sunglasses, http://www.oakleysunglasseswholesale.in.net/
    oakley, http://www.occhialioakleyoutlets.it/
    oakley sunglasses wholesale, http://www.oakleysunglasseswholesale.us.com/
    tory burch shoes, http://www.toryburchshoesoutlet.com/
    pandora jewelry, http://www.pandorajewelryoutlet.us.com/
    hollister uk, http://www.hollistershirts.co.uk/
    cheap nba jerseys, http://www.nbajerseys.net/
    fitflop, http://www.fitflop.in.net/
    louis vuitton, http://www.borselouisvuittonoutlet.it/
    juicy couture outlet, http://www.juicycoutureoutlet.net/
    coach outlet, http://www.coachoutletus.us/
    oakley sunglasses, http://www.oakley.in.net/
    rolex watches uk, http://www.rolexwatches-uk.co.uk/
    longchamp outlet, http://www.longchampoutlet.name/
    michael kors bags, http://www.michaelkorsbags.uk/
    michael kors outlet, http://www.michaelkors-outlets.us.com/
    ugg boots, http://www.uggbootsclearance.in.net/
    nike air max shoes, http://www.nikeairmaxshoess.co.uk/
    links of london, http://www.linksoflondons.co.uk/
    michael kors outlet, http://www.michaelkorsoutletusa.net/
    designer handbags, http://www.designerhandbags.us.com/
    ray ban sunglasses, http://www.raybansunglass.co.uk/
    1003maoqiuyun

    回复删除
  2. visit 9a replica bags learn the facts here now replica bags joy More Bonuses replica bags in dubai

    回复删除

相关文章

 
Creative Commons License
除非另有声明,本网站采用知识共享署名-非商业性使用-相同方式共享 3.0 许可协议授权。