随笔分类 -  字符串

摘要:DescriptionCould you imaging a monkey writing computer programs? Surely monkeys are smart among animals. But their limited intelligence is no match for our human beings. However, there is a theorem about monkeys, and it states that monkeys can write everything if given enough time. The theorem is ca 阅读全文
posted @ 2013-09-06 22:33 Oyking 阅读(446) 评论(0) 推荐(0)
摘要:DescriptionAliens on planet Pandora also write computer programs like us. Their programs only consist of capital letters (‘A’ to ‘Z’) which they learned from the Earth. On planet Pandora, hackers make computer virus, so they also have anti-virus software. Of course they learned virus scanning algori 阅读全文
posted @ 2013-09-05 17:11 Oyking 阅读(810) 评论(0) 推荐(0)
摘要:DescriptionIn whiteblack on blackwhite is written the utterance that has been censored by the Ministry of Truth. Its author has already disappeared along with his whole history, and now, while Big Brother is watching somebody else, you, as an ordinary official of the Minitrue, have to delete some le 阅读全文
posted @ 2013-08-29 19:55 Oyking 阅读(415) 评论(0) 推荐(0)
摘要:一、代码: 1、求逆元(原理貌似就是拓展欧几里得,要求MOD是素数): 2、底层优化(正确性未验证): 3、扩栈,这玩意儿在OJ上用能防爆? 4、神速读入fread 二、神牛blog matrix67 ZKW watashi 三、专题 动态规划系列: 数位dp模板 字符串系列: 【专辑】AC自动机 阅读全文
posted @ 2013-08-14 23:48 Oyking 阅读(1317) 评论(0) 推荐(0)
摘要:DescriptionGiven two strings, you have to tell the length of the Longest Common Substring of them.For example:str1 = bananastr2 = cianaicSo the Longes... 阅读全文
posted @ 2013-08-02 16:08 Oyking 阅读(1668) 评论(0) 推荐(0)
摘要:ProblemDescriptionBandBandRockisquitesensitivewithnumbers(anumberisdefinedasasequenceformedby‘0’-‘9’).Hethinksthislistofluckynumberscanbringhimluck(forexamplehisluckylistcouldbe9,13)andhelovesthesenumbersverymuch!Oneday,BandBandRockischoosingapasswordforhisbankaccount(apasswordisasequenceformedby‘0’ 阅读全文
posted @ 2013-06-04 10:45 Oyking 阅读(1166) 评论(0) 推荐(0)