字符串
狠人王
怀着一颗热情的心,追随自己的梦想!
展开
-
CodeForce 224D Problem B - Two Strings(字符串应用)
很奇怪,总是在第四组样例卡主,去cf上查了样例试了试,第四组后面的几乎都能过,就是卡在第四组。我一开始对这道题目的理解是找一串字符串比如,aabb,在这串字符串里查找ab,可以找到,就是yes,连不连续都一样。但是不过???见代码#include<iostream>#include<set>using namespace std;typedef long long ...原创 2019-07-25 10:58:47 · 142 阅读 · 0 评论 -
【牛客比赛】小Q喜欢撸串(字符串)
链接:https://ac.nowcoder.com/acm/problem/23905来源:牛客网小Q挺喜欢撸串的,没错,字符串!你给小Q送上了n个字符串对于一个字符串s,如果在小Q撸掉(删除)任意个字符之后,"NowCoder"是其子串,则这个字符串s是可撸的。小Q最近切题切到手软,想撸串散散心。如果你给他呈现的字符串是可撸的,他会很开心,否则他会很桑心。输入描述:一个整数n,表示...原创 2019-08-05 21:56:23 · 278 阅读 · 0 评论 -
【字符串函数】substr
在网上看了substr()函数的介绍后,觉得不能立刻理解,也就是不直观.因此,这里重做一层解释substr分以下几种情况(以下$str='abcdefghijklmn'):substr($str,start) :从start位开始,取$str之后的字符串exp:substr($str,10)结果:'klmn'substr($str,正数a,正数...转载 2019-08-14 09:57:38 · 310 阅读 · 0 评论 -
【codeforce】D1. Remove the Substring (easy version)
he only difference between easy and hard versions is the length of the string.You are given a stringssand a stringtt, both consisting only of lowercase Latin letters. It is guaranteed thatttcan...原创 2019-08-14 10:21:36 · 178 阅读 · 0 评论 -
【AtCoder】C - Green Bin(简单字符串)(STL)
Problem StatementWe will call a string obtained by arranging the characters contained in a string ain some order, an anagram of aFor example, greenbin is an anagram of beginner. As seen here, when ...原创 2019-08-11 15:51:35 · 628 阅读 · 0 评论 -
【codeforce】A. BowWow and the Timetable(数学,二进制)
In the city of Saint Petersburg, a day lasts for21002100minutes. From the main station of Saint Petersburg, a train departs after11minute,44minutes,1616minutes, and so on; in other words, the t...原创 2019-08-21 10:00:35 · 174 阅读 · 0 评论 -
【CodeForces】-260B(字符串)
A recently found Ancient Prophesy is believed to contain the exact Apocalypse date. The prophesy is a string that only consists of digits and characters "-".We'll say that some date is mentioned in ...原创 2019-08-21 16:46:18 · 260 阅读 · 0 评论 -
字符数组统计
#include<bits/stdc++.h>using namespace std;const int N=1e5+2;char s[N];int mp[100];int main(){ while(~scanf("%[^\n] ",s)) { memset(mp,0,sizeof mp); for(int i=0;s[i...原创 2019-09-12 22:07:19 · 234 阅读 · 0 评论