字符串
字符串
Guuuuuu老师儿
当初的算法竞赛题目博客的留言评论就不回复了,时间太久已经忘干净了,抱歉~
展开
-
string中的find函数和string::npos的使用
转载至http://www.cnblogs.com/web100/archive/2012/12/02/cpp-string-find-npos.html查找字符串a是否包含子串b,不是用strA.find(strB) > 0而是strA.find(strB) != string:nposstring::size_type pos = strA.find(strB);if(po转载 2017-09-22 11:05:40 · 4250 阅读 · 0 评论 -
词频统计(30 point(s))
词频统计(30 point(s))请编写程序,对一段英文文本,统计其中所有不同单词的个数,以及词频最大的前10%的单词。所谓“单词”,是指由不超过80个单词字符组成的连续字符串,但长度超过15的单词将只截取保留前15个单词字符。而合法的“单词字符”为大小写字母、数字和下划线,其它字符均认为是单词分隔符。输入格式:输入给出一段非空文本,最后以符号#结尾。输入保证存在至少10个不同的单词。输出格式:在...原创 2018-02-14 20:26:24 · 1434 阅读 · 0 评论 -
Generate Login
Generate Login The preferred way to generate user login in Polygon is to concatenate a prefix of the user's first name and a prefix of their last name, in that order. Each prefix mu...原创 2018-04-10 16:43:27 · 286 阅读 · 0 评论 -
String Reconstruction CodeForces - 828C(思维)
String Reconstruction CodeForces - 828CIvan had string s consisting of small English letters....原创 2018-04-12 15:49:57 · 228 阅读 · 0 评论 -
Regular Number HDU - 5972(巧妙的字符串匹配+bitset)
Regular Number HDU - 5972 Using regular expression to define a numeric string is a very common thing. Generally, use the shape as follows:(0|9|7) (5|6) (2) (4|5)Above regular expression matches 4 ...原创 2018-07-22 08:59:48 · 371 阅读 · 0 评论