相关链接
题目传送门: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})$
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!
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!
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!
If you would like to increase your knowledge only keep visiting this web site and be updated with the newest information posted here.
Hello, I check your new stuff daily. Your humoristic style is witty, keep up the good work!
Very good info. Lucky me I discovered your site by accident (stumbleupon).
I’ve bookmarked it for later!
Thanks for sharing your thoughts about ps4 games.
Regards
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.
What’s up to all, since I am really keen of reading this webpage’s post
to be updated regularly. It carries fastidious material.
I like reading through an article that will make people think.
Also, thanks for permitting me to comment!
I went over this web site and I think you have a lot of excellent information, saved to fav (:.
Whoa! 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. Excellent choice of colors!
These are truly impressive ideas in about blogging. You have touched some pleasant points here.
Any way keep up wrinting.
Spot on with this write-up, I absolutely think this website needs a great
deal more attention. I’ll probably be returning to read more, thanks for the
information!
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!
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!
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!
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!
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!