【BZOJ 4374】Little Elephant and Boxes

相关链接

题目传送门:http://www.lydsy.com/JudgeOnline/problem.php?id=4374
神犇题解:http://www.cnblogs.com/clrs97/p/6371735.html

解题报告

这题如果钱的总数小一点就可以直接DP了
于是我就想到了这个题:BZOJ 2749
于是我们就可以把钱给离散化到900以内啦!
但这样我们没有办法进行转移,然后就不会了 QwQ

不过万能的Claris告诉我们,物品只有30个
于是我们可以折半暴搜,这样的话就不需要转移了
直接枚举左侧的值,右侧搞一个指针跟着动一动就好
时间复杂度: $O(nm{2^{\frac{n}{2}}} + n{m^2})$

19 thoughts to “【BZOJ 4374】Little Elephant and Boxes”

  1. Hello, I think your blog might be having browser compatibility issues.

    When I look at your website in Ie, it looks fine but when opening in Internet Explorer, it has some
    overlapping. I just wanted to give you a quick heads up!

    Other then that, fantastic blog!

  2. Do you mind if I quote a few of your articles as long as I provide credit and sources
    back to your site? My website is in the exact same area of
    interest as yours and my users would truly benefit from a lot of the information you provide here.
    Please let me know if this okay with you. Cheers!

  3. you are actually a good webmaster. The website loading speed is amazing.

    It kind of feels that you are doing any unique trick.

    Furthermore, The contents are masterwork. you’ve done a
    wonderful task on this matter!

  4. Hey There. I found your blog using msn. This is
    an extremely well written article. I will be sure to
    bookmark it and come back to read more of your useful information. Thanks
    for the post. I will certainly return.

  5. The other day, while I was at work, my sister
    stole my iPad and tested to see if it can survive a thirty
    foot drop, just so she can be a youtube sensation. My iPad is now
    destroyed and she has 83 views. I know this is totally off topic
    but I had to share it with someone!

  6. Howdy! This post couldn’t be written any better! Looking through this post
    reminds me of my previous roommate! He continually
    kept preaching about this. I am going to send
    this article to him. Fairly certain he’s going to have a great read.
    Thanks for sharing!

  7. Very nice post. I just stumbled upon your weblog and wished to
    mention that I’ve really loved browsing your weblog posts.
    In any case I will be subscribing for your feed and I hope you write
    once more soon!

  8. Hi superb website! Does running a blog like this require a great deal of work?
    I’ve very little understanding of programming but I was hoping to start my own blog soon. Anyway,
    if you have any recommendations or techniques
    for new blog owners please share. I understand this is off
    topic however I simply wanted to ask. Kudos!

  9. Amazing! This blog looks just like my old one! It’s on a entirely different topic but it has pretty much the same layout and design. Superb choice of colors!

Leave a Reply

Your email address will not be published. Required fields are marked *