题目传送门:http://poj.org/problem?id=3154
中文题面:《算法竞赛·入门经典·训练指南》P7
作为一道很有趣的贪心,我居然只会O(n^2)的DP
真是惭愧……..
下面说正经事:
引理一:
一定存在一种最优方案,使得至少有一个最终的雕塑位置与原位置重叠
证明:
考虑每一个原的雕塑位置
设最近的最终雕塑位置在顺时针方向的点集为A
设最近的最终雕塑位置在逆时针方向的点集为A
1)|A|==|B|:显然将距离最终雕塑位置最小的点移动过去不会使答案变劣
2)|A|<|B|:显然逆时针转动尽量小的距离,使得有一个原雕塑与最终雕塑位置重叠会使答案变优
3)|A|>|B|:同理可得:应顺时针转动最小距离
引理二:
不会有两个原雕塑位置离同一个最终雕塑位置最近
证明:
设原雕塑间隔为A,最终的雕塑间隔为B
若两个原雕塑位置离同一个最终雕塑位置最近,则这两个原雕塑间的距离小于B(类比四舍五入)
但由题意得:A < B
矛盾,所以这种情况不可能发生
证明了这两个引理之后,就可以贪心啦!
随便定一个点,然后将每个原雕塑位置移动到最近的最终雕塑位置即可
630739 833437An intriguing discussion will be worth comment. I believe which you can write read a lot more about this topic, could effectively definitely be a taboo subject but normally folks are inadequate to chat on such topics. To a higher. Cheers 543410
596374 164870Youre so cool! I dont suppose Ive learn anything like this before. So good to discover any person with some authentic thoughts on this topic. realy thank you for starting this up. this website is something that is wanted on the internet, someone with just a little bit originality. helpful job for bringing something new towards the web! 239486
595929 150269I like what you guys are up too. Such smart work and reporting! Carry on the superb works guys Ive incorporated you guys to my blogroll. I feel it will improve the value of my site 454466
150479 151174I only wish that I had the ability to convey what I wanted to say in the manner which you have presented this information. Thanks. 468343
806018 435259The specific New york Diet can be an highly affordable and versatile eating much better tool built for time expecting to loose fat along with naturally keep a healthful day-to-day life. la weight loss 170725
932212 857389Hi, if you want to get higher rankings, you must take a look at the plugin I left in my link, it will assist. 359558
903425 929322Hey, are you having issues with your hosting? I required to refresh the page about million times to get the page to load. Just saying 422038
540008 620224I just could not go away your web site before suggesting that I extremely enjoyed the usual info a person supply to your guests? Is going to be back ceaselessly as a way to inspect new posts. 289660
498342 914963hi and thanks for the actual blog post ive recently been searching regarding this specific advice on-line for sum hours these days as a result thanks 99797
171458 214343This is going to be an excellent internet website, will you be involved in performing an interview regarding how you developed it? If so e-mail me! 34176
436777 707799Hello DropshipDragon provides dropping for quality, affordable products direct from China to your customers. Perfect for eBay sellers and website owners alike! 523405
183886 908219Watch the strategies presented continue reading to discover and just listen how to carry out this amazing like you organize your company at the moment. educational 572249
Hmm it looks like your site ate my first comment (it was super long) so I guess I’ll just sum it up what I submitted and say,
I’m thoroughly enjoying your blog. I as well am an aspiring blog blogger but
I’m still new to the whole thing. Do you have any points for inexperienced blog
writers? I’d really appreciate it.
607014 426036I adore foregathering useful info, this post has got me even far more information! . 821685
Its like you learn my mind! You seem to grasp so much approximately this, such as you wrote the
e book in it or something. I feel that you could do with a few
p.c. to force the message house a little bit, but other
than that, that is wonderful blog. A great read.
I’ll definitely be back.
My family members every time say that I am wasting
my time here at net, but I know I am getting know-how everyday
by reading thes nice content.
It’s great that you are getting thoughts from this paragraph as well as from our discussion made
at this place.
Hi, I believe your website could be having browser compatibility problems.
Whenever I look at your site in Safari, it looks fine however, if opening
in Internet Explorer, it has some overlapping issues.
I merely wanted to give you a quick heads up! Apart from that, excellent blog!
Greetings! This is my first comment here so I just wanted to give a quick shout out and
tell you I truly enjoy reading your posts. Can you recommend any other blogs/websites/forums
that cover the same subjects? Thank you!
Great work! This is the kind of information that are supposed to
be shared around the internet. Shame on Google for no longer positioning this put up upper!
Come on over and talk over with my website . Thank you =)
I really like your blog.. very nice colors & theme.
Did you create this website yourself or did you hire someone to do it for you?
Plz answer back as I’m looking to design my
own blog and would like to find out where u got this from.
kudos
What’s up to every one, since I am genuinely eager of reading this blog’s post to
be updated daily. It consists of fastidious information.
Your style is really unique compared to other folks I’ve read stuff from.
I appreciate you for posting when you’ve got the opportunity,
Guess I will just book mark this page.
Thanks for sharing your thoughts. I really appreciate your efforts and I am waiting for your next
post thank you once again.
Hello there! I know this is kind of off topic but I was wondering
if you knew where I could locate a captcha plugin for
my comment form? I’m using the same blog platform as yours and I’m having difficulty finding one?
Thanks a lot!
Hello, you used to write wonderful, but the last few posts have been kinda boring?K I miss your great writings. Past few posts are just a little out of track! come on!
whoah this blog is great i love studying your posts.
Stay up the good work! You understand, a lot of people are hunting around for
this info, you could aid them greatly.
Wow that was odd. I just wrote an really long comment but after I clicked submit
my comment didn’t appear. Grrrr… well I’m not writing all that over again. Anyway,
just wanted to say fantastic blog!
Wonderful article! That is the kind of information that should
be shared across the internet. Shame on Google for no longer positioning this submit higher!
Come on over and visit my site . Thanks =)
I like the helpful info you provide in your articles.
I will bookmark your weblog and check again here regularly.
I am quite certain I will learn many new stuff right here!
Good luck for the next!
It’s truly very difficult in this full of activity life to listen news on TV,
therefore I just use the web for that reason, and take the latest news.
Pretty great post. I just stumbled upon your blog and wanted
to mention that I have really loved surfing around your
weblog posts. In any case I will be subscribing for your rss feed and
I am hoping you write again soon!
I’m not that much of a online reader to be honest but your
blogs really nice, keep it up! I’ll go ahead
and bookmark your website to come back later on. Cheers
I just like the helpful information you supply for your
articles. I’ll bookmark your blog and check again right here frequently.
I am fairly sure I’ll be informed a lot of
new stuff right here! Good luck for the next!
Hello to every one, the contents existing at this web page are really amazing
for people experience, well, keep up the nice work fellows.
Have you ever considered creating an ebook or guest authoring on other websites? I have a blog based on the same information you discuss and would love to have you share some stories/information. I know my readers would appreciate your work. If you are even remotely interested, feel free to shoot me an email.
Looking forward to reading more. Great article post.Much thanks again. Will read on…
I loved your article.Thanks Again. Great.