相关链接
题目传送门:http://www.lydsy.com/JudgeOnline/problem.php?id=3917
神犇题解Ⅰ:http://blog.csdn.net/lcrtest/article/details/51312981
神犇题解Ⅱ:http://blog.csdn.net/neither_nor/article/details/52604754
吐槽
他们说这题是APIO 2016练习赛的题目,为什么我一点印象都没有 QwQ
想了很久都只会$O(\frac{n^2}{64})$的暴力,我也很绝望啊…..
解题报告
我们发现,对于比较高的位数来讲,其一样的数在一起
考虑将一样的数合在一起,并且从低位到高位处理
记录二进制状态$f_{i,j}$表示在第$i$位的时候,第$j$块里需要哪些数
如果当前只需要一个数了,那么就可以直接返回辣!(如果是0需要特判)
否则的话,我们枚举这一位在第一个数中是多少
因为下一层中连续的区间长度大概都比现在这一位连续的区间长10倍
所以我们可以把这一位中的状态每十个合成一块,下一层的话又是一个递归子问题,我们可以递归下去
考虑每一层的总复杂度:第$i$层有$10^i$个分叉,每个分叉内有$\frac{n}{10^i}$个块,于是每一层的复杂度是$O(n)$的
下面我们来总复杂度$T(n)=10 \cdot T(\frac{n}{10}) + n$
根据主定理,这货是$O(n \log{n})$的
Thanks a lot for the post.Much thanks again. Great.
Thanks so much for the blog.Really looking forward to read more. Want more.
Looking forward to reading more. Great blog article.Much thanks again. Much obliged.
Thank you ever so for you article. Really Cool.
Looking forward to reading more. Great blog post.Really looking forward to read more. Great.
Appreciate you sharing, great article post.Really thank you! Awesome.
Great, thanks for sharing this article.Much thanks again. Keep writing.
Thanks for sharing, this is a fantastic article post.Thanks Again. Cool.
Awesome blog article.Really thank you! Really Cool.
Thanks for the blog article. Really Great.
Im thankful for the blog article.Much thanks again.
A round of applause for your blog article.Really looking forward to read more. Want more.
Very good blog article.Thanks Again. Cool.
I really like and appreciate your blog article.Much thanks again. Awesome.
Very neat blog.Really thank you! Keep writing.
Major thanks for the article. Really Cool.
I value the post.Really thank you! Keep writing.
Great blog post.Much thanks again. Really Great.
I truly appreciate this article.Really looking forward to read more. Keep writing.
Thank you ever so for you blog post.Much thanks again. Will read on…
Very informative article.Really looking forward to read more. Awesome.
Thanks so much for the blog. Great.
Im thankful for the blog article.Really looking forward to read more. Cool.
Im thankful for the blog. Really Cool.
Thanks for sharing, this is a fantastic post. Keep writing.
I truly appreciate this article. Great.
I think this is a real great blog article.Really thank you! Awesome.
Major thankies for the post. Will read on…
Major thanks for the article post.Really looking forward to read more. Awesome.
I really enjoy the blog.Really looking forward to read more. Really Cool.
Fantastic blog post.Thanks Again. Fantastic.
Thanks so much for the blog. Will read on…
Enjoyed every bit of your blog. Really Cool.
Thank you ever so for you article.Really thank you! Fantastic.
Very good blog.Really thank you! Fantastic.
wow, awesome post.Much thanks again. Really Cool.
Im grateful for the blog.
Really appreciate you sharing this article post.Really thank you! Great.
Major thanks for the blog.Really looking forward to read more. Really Cool.
I got this web site from my friend who informed me concerning this website and at the moment
this time I am browsing this site and reading very informative articles
or reviews here.
I loved your blog post.Really looking forward to read more. Awesome.
Thanks a lot for the article post.Much thanks again. Keep writing.
Right here is the perfect blog for everyone who wants to find out about this topic.
You know a whole lot its almost hard to argue
with you (not that I actually would want to…HaHa).
You definitely put a fresh spin on a topic which has
been discussed for many years. Wonderful stuff, just excellent!
Thanks so much for the blog.Much thanks again. Fantastic.
Enjoyed every bit of your article.Really thank you! Cool.
I cannot thank you enough for the blog post.Thanks Again. Want more.
I truly appreciate this blog.Really thank you! Want more.
Great, thanks for sharing this blog. Keep writing.
I think this is a real great blog article.Much thanks again.
I truly appreciate this post. I have been looking everywhere for this
Im grateful for the blog.Much thanks again. Really Great.
I really liked your blog.Thanks Again. Really Great.
wow, awesome article.Really looking forward to read more. Great.
I truly appreciate this post. I have been looking everywhere for this
Say, you got a nice post.Thanks Again. Really Great.
I value the post.Really thank you! Fantastic.
Hello! Do you know if they make any plugins to help with SEO?
I’m trying to get my blog to rank for some targeted
keywords but I’m not seeing very good results. If you know of any please share.
Thank you!
Wow, great blog post.Really thank you! Will read on…
Great, thanks for sharing this post.Really thank you! Great.
Major thankies for the article.Really looking forward to read more. Much obliged.
Very neat article.Really thank you! Really Cool.
Very informative article.Really thank you! Cool.
Very informative article post.Really thank you! Want more.
Thanks a lot for the post.Really looking forward to read more. Will read on…
It’s amazing for me to have a web site, which is good in favor of my know-how. thanks admin
Wow, great blog article.Thanks Again. Fantastic.
Greetings! Very useful advice in this particular post! It’s the little changes that make the largest changes.
Many thanks for sharing!
Muchos Gracias for your blog article.Thanks Again. Will read on…
You really make it seem so easy with your presentation but I find this topic to be
actually something which I think I would never understand.
It seems too complicated and extremely broad for me.
I’m looking forward for your next post, I’ll try to get the hang of it!
Really informative blog.Really thank you! Great.
I loved your blog article.Thanks Again. Keep writing.
Wow, great post.Much thanks again. Keep writing.
Really enjoyed this blog.Really thank you! Really Cool.
Say, you got a nice blog post. Keep writing.
Looking forward to reading more. Great post.Thanks Again. Really Cool.
I appreciate you sharing this post. Fantastic.
Hey, thanks for the article post. Much obliged.
I absolutely love your blog and find many of your post’s to be
precisely what I’m looking for. can you offer guest writers to write content for yourself?
I wouldn’t mind publishing a post or elaborating
on a few of the subjects you write related to
here. Again, awesome weblog!
Major thankies for the article.Really looking forward to read more. Want more.
Great blog post.Much thanks again. Fantastic.
I really enjoy the blog article. Much obliged.
Muchos Gracias for your blog.Really looking forward to read more. Awesome.
This is one awesome blog post.Really looking forward to read more. Keep writing.
Thank you for your blog.Thanks Again. Want more.
It’s remarkable to go to see this web site and reading the views of all friends concerning
this article, while I am also zealous of getting knowledge.
I value the blog.Really looking forward to read more. Really Great.
wow, awesome article.Thanks Again. Really Great.
Oh my goodness! Incredible article dude! Many thanks, However I am experiencing troubles with your RSS.
I don’t know the reason why I am unable to subscribe to it.
Is there anyone else having similar RSS problems? Anyone who
knows the answer will you kindly respond? Thanks!!
Thanks for sharing, this is a fantastic blog.Really thank you! Keep writing.
Thanks for the article post.Really thank you! Fantastic.
With havin so much content and articles do you
ever run into any issues of plagorism or copyright violation? My website has a lot of exclusive
content I’ve either written myself or outsourced but it appears a lot of it is
popping it up all over the internet without my agreement.
Do you know any techniques to help stop content from being
ripped off? I’d genuinely appreciate it.
I think this is a real great post.Thanks Again. Awesome.
Thanks for sharing, this is a fantastic blog.Much thanks again. Much obliged.
This piece of writing is genuinely a pleasant
one it assists new internet people, who are wishing for blogging.
Thanks a lot for the article post.Really looking forward to read more. Much obliged.
Say, you got a nice post.Really looking forward to read more. Great.
Hey, thanks for the blog post. Want more.
Helpful information. Fortunate me I discovered your web site by chance,
and I am stunned why this accident didn’t took place earlier!
I bookmarked it.
Thanks so much for the blog.Thanks Again. Keep writing.
of course like your website but you have to check the spelling on several of your posts.
Several of them are rife with spelling issues and I to find it very troublesome to tell the truth nevertheless I will certainly come again again.
I am so grateful for your article post.Much thanks again. Will read on…
Really enjoyed this article post.Really thank you! Really Cool.
Say, you got a nice article. Really Great.
A person necessarily assist to make significantly articles I would state. This is the very first time I frequented your website page and to this point? I amazed with the research you made to make this particular publish extraordinary. Magnificent task!
I cannot thank you enough for the blog article. Fantastic.
I think this is a real great post.Much thanks again. Awesome.
I cannot thank you enough for the article.Much thanks again.
Thanks-a-mundo for the blog post.Thanks Again. Fantastic.
Great article post.Much thanks again.
Wow, great article post.Really looking forward to read more. Will read on…
I value the article post.Really looking forward to read more. Really Great.
Im grateful for the blog post.Much thanks again. Fantastic.
Say, you got a nice blog.Really thank you! Really Cool.
wow, awesome article.Really thank you! Much obliged.
Fantastic blog.Really looking forward to read more. Awesome.
Really appreciate you sharing this blog article.Really thank you! Awesome.
I loved your blog article.Much thanks again. Will read on…
I truly appreciate this blog article.Really thank you! Want more.
Very neat post.Thanks Again. Much obliged.
I value the article post.Thanks Again. Fantastic.
Thank you ever so for you blog post.Really thank you! Fantastic.
Wow, great article.Really looking forward to read more. Keep writing.
Thanks for the blog.Much thanks again.
Im thankful for the blog.
Very neat article.Much thanks again. Great.
Say, you got a nice blog.Really thank you! Want more.
I think this is a real great blog. Cool.
Thank you for your blog article.Thanks Again. Much obliged.
Really informative article.Much thanks again. Want more.
Im obliged for the blog.Really looking forward to read more. Much obliged.
Thanks a lot for the article post.Really thank you! Great.
Im grateful for the blog article. Much obliged.
I have read so many articles or reviews concerning the blogger lovers however this
piece of writing is in fact a pleasant piece of writing, keep it up.
wow, awesome blog.
Im thankful for the blog.Much thanks again. Fantastic.
Thanks for sharing, this is a fantastic blog article.Thanks Again.
I really like and appreciate your post. Much obliged.
Really appreciate you sharing this article post.Much thanks again. Really Great.
Really enjoyed this blog post.Thanks Again. Much obliged.
Very good article.Really looking forward to read more. Great.
Fantastic article.Really looking forward to read more. Great.
Looking forward to reading more. Great post.Much thanks again. Really Great.
A round of applause for your blog post.Really thank you! Fantastic.
Thank you for your article. Cool.
I think this is a real great blog post.Really thank you! Great.
I truly appreciate this post.Really thank you! Cool.
Great, thanks for sharing this article post.Much thanks again. Cool.
Really appreciate you sharing this blog article.Much thanks again. Fantastic.
Awesome blog article.Really looking forward to read more. Will read on…
Great, thanks for sharing this post.Really looking forward to read more. Fantastic.
Very good blog.Really looking forward to read more. Really Great.
I really like and appreciate your post.Much thanks again. Much obliged.
I really like and appreciate your blog.Really looking forward to read more. Really Cool.
Really appreciate you sharing this article post.Thanks Again. Awesome.
Wonderful, what a blog it is! This web site gives helpful facts to
us, keep it up.
Looking forward to reading more. Great article. Awesome.
Really informative post.Really thank you! Really Cool.
Thank you for your post.Really thank you! Cool.
Appreciate you sharing, great post.Really thank you! Awesome.
A round of applause for your post. Great.
Really enjoyed this blog article.Thanks Again. Fantastic.
Thanks for the blog post.Much thanks again. Keep writing.
I appreciate you sharing this blog post.Really thank you! Will read on…
Great blog post. Really Cool.
Im obliged for the post.Much thanks again. Fantastic.
I really enjoy the blog post.Thanks Again.
Say, you got a nice post. Keep writing.
I really like and appreciate your article post.Really looking forward to read more. Great.
Hmm it seems 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 writer but I’m still new to everything.
Do you have any helpful hints for newbie blog
writers? I’d certainly appreciate it.
A round of applause for your article post.Really looking forward to read more. Keep writing.
Im grateful for the post.Thanks Again. Really Cool.
I am so grateful for your article.Much thanks again. Keep writing.
Really enjoyed this article. Want more.
Thanks for the article post. Awesome.
Thanks for sharing, this is a fantastic article post. Want more.
Major thankies for the blog post.Thanks Again. Will read on…
I loved your blog.Really thank you!
Great article post. Will read on…
This is one awesome article post. Will read on…
I think this is a real great blog article.Really thank you! Really Great.
I truly appreciate this blog post.Really looking forward to read more. Cool.
Very informative blog.Much thanks again. Will read on…
Having read this I believed it was extremely informative.
I appreciate you taking the time and effort to put this informative article together.
I once again find myself personally spending a significant amount of time both reading and
posting comments. But so what, it was still worthwhile!
I am so grateful for your blog.Really looking forward to read more. Fantastic.
wow, awesome post. Keep writing.
I am so grateful for your post.Really thank you! Cool.
I think what you published was very logical. However, what about this?
suppose you typed a catchier title? I am not saying your content isn’t solid., but
what if you added a post title that makes people desire more?
I mean 【BZOJ 3917】[Baltic2014] sequence – Qizy's Database is a little vanilla.
You could look at Yahoo’s front page and note how they create news headlines to get people interested.
You might try adding a video or a related picture or two to get readers interested
about what you’ve got to say. Just my opinion, it could make your posts a little
livelier.
Thanks a lot for the article post.Really thank you! Keep writing.
Im grateful for the article.
Muchos Gracias for your post.Thanks Again. Awesome.
I really enjoy the blog post.Really looking forward to read more. Cool.
I loved your post.Really looking forward to read more. Much obliged.
Thanks for the blog.Really looking forward to read more. Want more.
This is one awesome article post.
wow, awesome article post.Thanks Again. Cool.
Thank you for your article post.Thanks Again. Fantastic.
Thanks so much for the blog post.Thanks Again. Really Cool.
I cannot thank you enough for the blog.Much thanks again. Fantastic.
I truly appreciate this blog post.Much thanks again. Great.
I really enjoy the blog.Thanks Again. Really Great.
Im grateful for the blog post.Really looking forward to read more.
I really liked your article post.Much thanks again. Want more.
I value the article.Really thank you! Really Great.
I appreciate you sharing this blog article.Really looking forward to read more. Fantastic.
Im grateful for the blog article. Great.
Really enjoyed this article.Thanks Again. Keep writing.
Thanks so much for the blog.Really thank you!
Amazing blog! Do you have any suggestions for aspiring
writers? I’m hoping to start my own blog soon but I’m a little lost on everything.
Would you suggest starting with a free platform like WordPress or go for a paid option? There are so many options out
there that I’m completely confused .. Any recommendations?
Appreciate it!
Major thankies for the blog article.Really thank you! Much obliged.
I really liked your article post.Really looking forward to read more. Want more.
I am so grateful for your blog post. Fantastic.
Muchos Gracias for your article post.Really looking forward to read more. Really Great.
Appreciate you sharing, great blog post.Really thank you! Cool.
Very neat blog post.Really looking forward to read more. Keep writing.
A fascinating discussion is definitely worth comment.
I think that you ought to write more about
this topic, it may not be a taboo matter but generally folks don’t talk about such issues.
To the next! Many thanks!!
I have been checking out some of your posts and it’s pretty good stuff. I will make sure to bookmark your site.
Thank you for your post. Keep writing.
I am sure this piece of writing has touched all the internet visitors,its really really nice paragraph on building up new website.
The data mentioned in the post are a few of the top readily available
I appreciate you sharing this article. Awesome.
*Some times its a pain in the ass to read what people wrote but this web site is very user friendly ! .
wine and white yeezy for cheapadidas x tango 18.4 tf rosso,nike magista femminile grigio,white air force 1 low jd,nike kyrie 2 men all red green
thank you admin .
Howdy! Do you know if they make any plugins to protect against hackers? I’m kinda paranoid about losing everything I’ve worked hard on. Any recommendations? babdabcfdfea
hello there and thanks on your info – I have definitely picked up anything new from right here. I did then again experience several technical issues the use of this site, as I experienced to reload the site many times prior to I could get it to load correctly. I had been considering in case your hosting is OK? Not that I am complaining, however slow loading circumstances times will often impact your placement in google and could harm your high-quality rating if advertising and ***********|advertising|advertising|advertising and *********** with Adwords. Well I am including this RSS to my email and can glance out for much extra of your respective exciting content. Ensure that you update this again soon..
Major thanks for the blog.Thanks Again. Really Great.
Hello would you mind letting me know which hosting company you’reworking with? I’ve loaded your blog in 3 different browsers and I must say this blog loads a lotfaster then most. Can you suggest a good hosting provider at a honest price?Many thanks, I appreciate it!
Appreciate you sharing, great blog article.Really looking forward to read more.
My spouse and i were absolutely joyous Raymond could conclude his web research from the ideas he was given out of your web page. It is now and again perplexing just to choose to be giving for free points that other folks have been making money from. And now we recognize we now have you to appreciate for that. All the explanations you made, the easy site menu, the friendships you will give support to promote – it is many fabulous, and it’s making our son in addition to us believe that this content is fun, and that is exceedingly important. Thanks for all!
Thank you for your article. Want more.
Thanks again for the article.Really thank you! Fantastic.
Im grateful for the post.Really thank you! Fantastic.
Really enjoyed this blog.Thanks Again. Will read on…
Hi, Neat post. There is a problem along with your site in internet explorer, would check this… IE nonetheless is the market chief and a big component of folks will omit your excellent writing because of this problem.
Awesome blog article.Thanks Again. Cool.
I really like and appreciate your blog post. Awesome.
I cannot thank you enough for the post.Really looking forward to read more. Cool.
I think this is a real great post.Really thank you! Much obliged.
Very good article post.Thanks Again. Really Great.
Major thankies for the blog post.Much thanks again. Want more.
I am so grateful for your post.Much thanks again.
I value the article.Thanks Again. Fantastic.
Sivas nakliyat fiyatları veya hizmet talep eden insanlara yaklaşımı ile birlikte güvenilir bir firmanın nakliye çalışmalarına bakmak lazım. Ücretler ve yan yana konulmuş olan kaliteli hizmetler ile beraber, mevcut performansın avantajları burada insanlar için sağduyulu bir sonuç oluşturmaya devam etmektedir. Son derece detaylı ve karakterli bir duruş sergileyen Sivas nakliyat ile birlikte, problemler çözülüyor ve sorunlar tamamen gideriliyor. Daha sonrasında ise kaliteli firmanın çalışmaları ile beraber sizin için hazırlanmış mükemmel hizmetler gündemde kalmaya devam ediyor. Kendi müşterisi için ürettiği çözümler ile beraber, bildiğiniz ve tercih ettiğiniz firmanın en cazip koşullarına buradan bakabilirsiniz. Yol koşulları zorlu olsa da ya da ambalaj hizmeti biraz daha zorlu bir süreç başlatsa da elemanlar bu konuda hazırlıklıdır.
Hello there. I found your blog by way of Google at the same time as looking for a related topic, your web site got here up. It seems great. I’ve bookmarked it in my google bookmarks to come back then.
I value the blog article.Thanks Again. Cool.
I think this is a real great post.Thanks Again. Cool.
Very neat blog article.Much thanks again. Great.
Major thanks for the blog article.Much thanks again. Will read on…
Hi there, just wanted to tell you, I enjoyed this article. It was funny. Keep on posting!|
Thank you ever so for you blog.Really thank you! Great.
Thanks for the blog article.Really thank you! Want more.
An interesting discussion is definitely worth comment. I do believe that you need to write more on this topic, it may not be a taboo subject but typically people do not talk about such subjects. To the next! Many thanks!!|
I value the blog post. Fantastic.
Thank you for your post.Much thanks again. Want more.
Very energetic blog, I enjoyed that bit. Will there be a part 2?|
Say, you got a nice post.Thanks Again. Really Cool.
I cannot thank you enough for the article post.Really looking forward to read more. Want more.
Fabulous, what a website it is! This weblog presents valuable data to us, keep it up.|
Thanks for sharing, this is a fantastic article post.Really looking forward to read more. Cool.
This is one awesome blog article.Much thanks again. Keep writing.
Great, thanks for sharing this article post.Much thanks again. Much obliged.
Great, thanks for sharing this blog article. Really Cool.
Muchos Gracias for your article. Want more.
I think this is a real great article.Much thanks again. Keep writing.
The other day, while I was at work, my cousin stole my iPad and tested to see if it can survive a forty foot drop, just so she can be a youtube sensation. My apple ipad is now destroyed and she has 83 views. I know this is completely off topic but I had to share it with someone!|
hack dns from google
Hello! I’m at work browsing your blog from my new apple iphone! Just wanted to say I love reading through your blog and look forward to all your posts! Carry on the outstanding work!|
Great blog post.Really looking forward to read more. Fantastic.
I truly appreciate this blog post.Really thank you! Want more.
I appreciate you sharing this blog post.Really thank you! Will read on…
Ridiculous story there. What occurred after? Take care!|
Heya i’m for the first time here. I came across this board and I find It truly useful & it helped me out a lot. I hope to give something back and aid others like you helped me.|
This design is incredible! You obviously know how to keep a reader amused.Between your wit and your videos, I wasalmost moved to start my own blog (well, almost…HaHa!) Great job.I really loved what you had to say, and more than that, howyou presented it. Too cool!
As the admin of this site is working, no question very soon it will be famous, due to its feature contents.|
I think this is a real great blog post.Thanks Again. Awesome.
It’s a pity you don’t have a donate button! I’d definitely donate to this superb blog! I suppose for now i’ll settle for bookmarking and adding your RSS feed to my Google account. I look forward to brand new updates and will talk about this site with my Facebook group. Talk soon!|
Hey, thanks for the article post.Much thanks again. Keep writing.
Hi there! I’m at work surfing around your blog from my new iphone! Just wanted to say I love reading your blog and look forward to all your posts! Carry on the excellent work!|
I really enjoy the article.Really looking forward to read more.
Appreciate you sharing, great blog article.Thanks Again. Really Cool.
It is perfect time to make some plans for the future and it is time to be happy. I’ve read this post and if I could I want to suggest you some interesting things or suggestions. Perhaps you could write next articles referring to this article. I desire to read even more things about it!|
Pretty great post. I just stumbled upon your weblog and wished to mention that I have truly enjoyed browsing your blog posts. After all I will be subscribing for your rss feed and I’m hoping you write once more soon!|
Thanks for the article post.Thanks Again. Want more.
Very good post.Really thank you! Really Cool.
Awesome article.Really thank you! Keep writing.
Major thankies for the blog article.Really thank you! Really Great.
My spouse and I stumbled over here different page and thought I might check things out. I like what I see so now i’m following you. Look forward to finding out about your web page yet again.|
Say, you got a nice article post.Much thanks again. Will read on…
Enjoyed every bit of your blog post. Awesome.
If you are going for best contents like I do, just pay a visit this website everyday for the reason that it gives quality contents, thanks|
This piece of writing offers clear idea designed for the new viewers of blogging, that genuinely how to do blogging.|
It’s really very difficult in this full of activity life to listen news on TV, therefore I just use world wide web for that reason, and take the latest news.|
What’s Happening i’m new to this, I stumbled upon this I’ve found It absolutely helpful and it has helped me out loads. I am hoping to give a contribution & help different customers like its helped me. Great job.|