Topcoder srm496 div2 1000【最小表示法】
渐渐
posted @ 2011年2月13日 15:03
in 生活
, 4251 阅读
寒假真是悠闲了一个寒假。。。现在写代码什么都不会了 。。。今天开始写写TC
250,500都很水
1000分是一个找子串个数的题:求用小写字母组成的长度为N,并且包含至少K个长度为M的回文串的不同连续子串,的字符串的个数
第一次写1000分的题,想了一阵子,不知道怎么排除重复的字符串。看了别人的报告,学习了大神们的写法
大意是,用搜索找出一种字符串模式,用C个字母表示整个字符串可能的最小表示法:
如:可能有aaa,bbb,ccc,ddd.....zzz那么全可以用aaa表示
dfs(int pos,int C) { if(pos==N)if(check())ans+=calc(C); REP(i,C)Rec[pos]=i,dfs(pos+1,max(C,i+1)); }
dfs的含义是:找出当前位置为pos,之前的出现过的数字最大为C的字符串。
当pos==N时,判断是否合法
若合法,加上该最小表示的字符串所包含的字符串个数,既:26个字符放入C个空的全排列数
2024年5月18日 17:21
An impressive share! I’ve just forwarded this onto a co-worker who had been doing a little research on this. And he in fact ordered me dinner because I discovered it for him… lol. So allow me to reword this…. Thank YOU for the meal!! But yeah, thanx for spending the time to discuss this subject here on your blog. Your style is very unique in comparison to other people I have read stuff from. Thanks for posting when you have the opportunity, Guess I will just book mark this site.
2024年6月16日 13:10
This may be the proper weblog for desires to find out about this topic. You know so much its virtually challenging to argue along (not too I really would want…HaHa). You definitely put a new spin for a topic thats been revealed for some time. Excellent stuff, just great!
2024年6月16日 13:21
Useful information. Fortunate me I discovered your web site by accident, and I am stunned why this accident didn’t came about in advance! I bookmarked it.
2024年6月16日 13:22
I appreciated how flexible the team at amcauto.co was when it came to scheduling appointments and test drives. They were always willing to work around my schedule.
2024年6月16日 13:22
“I have to say, your blog is a breath of fresh air. There are so many generic and uninspired blogs out there, but yours really stands out for its originality and creativity.”
2024年6月16日 13:23
My spouse and I absolutely love your blog and find a lot of your post’s to be exactly what I’m looking for. Do you offer guest writers to write content in your case? I wouldn’t mind writing a post or elaborating on a few of the subjects you write with regards to here. Again, awesome web site!
2024年6月16日 13:23
Awesome article, it was exceptionally helpful! I simply began in this and I'm becoming more acquainted with it better. The post is written in very a good manner and it contains many useful information for me. Thank you very much and will look for more postings from you.
2024年6月16日 13:25
This may be the proper weblog for desires to find out about this topic. You know so much its virtually challenging to argue along (not too I really would want…HaHa). You definitely put a new spin for a topic thats been revealed for some time. Excellent stuff, just great!
2024年6月16日 13:26
Woah I’m just genuinely digging the style/thought of this web site. It’s straightforward, however fantastic. Additional frequently than not it is demanding to acquire the perfect involving exceptional usability along with visual physical appearance. I should say you have carried out a brilliant task. In addition, your web page starts tremendous rapidly personally with Web explorer. Outstanding Internet site
2024年6月16日 13:26
Woah I’m just genuinely digging the style/thought of this web site. It’s straightforward, however fantastic. Additional frequently than not it is demanding to acquire the perfect involving exceptional usability along with visual physical appearance. I should say you have carried out a brilliant task. In addition, your web page starts tremendous rapidly personally with Web explorer. Outstanding Internet site
2024年6月16日 13:27
Woah I’m just genuinely digging the style/thought of this web site. It’s straightforward, however fantastic. Additional frequently than not it is demanding to acquire the perfect involving exceptional usability along with visual physical appearance. I should say you have carried out a brilliant task. In addition, your web page starts tremendous rapidly personally with Web explorer. Outstanding Internet site
2024年6月16日 13:27
Thanks, I have all the files, is there any way that the geometry and mesh can be connected again? Now, I can import to a new .wbpj each file independently, so if I need to remesh my model, I need to change the geometry and start meshing from scratch.
2024年6月16日 13:28
Hi, i feel that i noticed you visited my website so i got here to ?go back the prefer?.I’m trying to to find things to enhance my website!I guess its ok to use some of your ideas!!
2024年6月16日 13:31
“I have to say, your blog is a breath of fresh air. There are so many generic and uninspired blogs out there, but yours really stands out for its originality and creativity.”
2024年6月16日 13:34
Two full thumbs up for this magneficent article of yours. I've truly delighted in perusing this article today and I figure this may be outstanding amongst other article that I've perused yet. If it's not too much trouble keep this work going ahead in a similar quality.
2024年6月16日 13:38
You could definitely see your skills within the paintings you write. The arena hopes for more passionate writers like you who are not afraid to say how they believe. Always follow your heart.
2024年6月16日 13:41
The author is red hot about acquiring wooden furniture on the web and his examination about best wooden furniture has comprehended the plan of this article.
2024年6月16日 13:44
Great work! That is the kind of info that should be shared across the internet. Shame on Google for now not positioning this submit upper! Come on over and visit my web site . Thanks =)
2024年6月16日 13:52
If more people that write articles really concerned themselves with writing great content like you, more readers would be interested in their writings. Thank you for caring about your content.
2024年6月16日 13:54
I?ve recently started a website, the information you offer on this website has helped me tremendously. Thanks for all of your time & work.
2024年6月16日 13:55
Hello, you used to write excellent, but the last few posts have been kinda boring? I miss your tremendous writings. Past several posts are just a little out of track! come on!
2024年6月16日 13:55
Excellent article. Very interesting to read. I really love to read such a nice article. Thanks! keep rocking
2024年6月16日 13:56
Excellent article. Very interesting to read. I really love to read such a nice article. Thanks! keep rocking
2024年6月16日 13:56
I think one of your commercials triggered my web browser to resize, you may well want to put that on your blacklist.
2024年6月16日 13:57
Thanks for sharing this interesting blog with us.My pleasure to being here on your blog..I wanna come beck here for new post from your site
2024年6月16日 13:57
Even nevertheless there are lots of decision methods with the purpose of lookup used for non published numbers, but you would approximating rapid stately results to you possibly will look forward to in, you possibly will necessitate with the purpose of desire particular sort of swap telephone search company.
2024年6月16日 13:59
My partner and I absolutely love your blog and find many of your post’s to be what precisely I’m looking for. Would you offer guest writers to write content to suit your needs? I wouldn’t mind composing a post or elaborating on a number of the subjects you write in relation to here. Again, awesome site!
2024年6月16日 14:05
We’re a group of volunteers and starting a new scheme in our community. Your website provided us with valuable information to work on. You’ve done a formidable job and our entire community will be grateful to you. <a href="https://www.safetytoto.com">안전놀이터</a>
2024年6月16日 14:10
Great work! That is the kind of info that should be shared across the internet. Shame on Google for now not positioning this submit upper! Come on over and visit my web site . Thanks =)
2024年11月09日 14:26
It is a good site post without fail. Not too many people would actually, the way you just did. I am impressed that there is so much information about this subject that has been uncovered and you’ve defeated yourself this time, with so much quality. Good Works! <a href="https://topkit.com/">카지노사이트</a>