字符串
_执念_
这个作者很懒,什么都没留下…
展开
-
Codeforces 989A:A Blend of Springtime
A. A Blend of Springtimetime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputWhen the curtains are opened, a canvas unfolds outside. Kanno marvels at al...原创 2018-06-14 17:03:35 · 254 阅读 · 0 评论 -
HDU2029:Palindromes _easy version
Problem Description “回文串”是一个正读和反读都一样的字符串,比如“level”或者“noon”等等就是回文串。请写一个程序判断读入的字符串是否是“回文”。Input 输入包含多个测试实例,输入数据的第一行是一个正整数n,表示测试实例的个数,后面紧跟着是n个字符串。Output 如果一个字符串是回文串,则输出”yes”,否则输出”no”.Sample Input 4 l原创 2017-12-14 21:46:42 · 223 阅读 · 0 评论 -
HDU2027:统计元音
Problem Description 统计每个元音字母在字符串中出现的次数。Input 输入数据首先包括一个整数n,表示测试实例的个数,然后是n行长度不超过100的字符串。Output 对于每个测试实例输出5行,格式如下: a:num1 e:num2 i:num3 o:num4 u:num5 多个测试实例之间由一个空行隔开。请特别注意:最后一块输出后面没有空行:)Sample I原创 2017-12-14 16:25:40 · 253 阅读 · 0 评论 -
HDU 6345:子串查询(前缀和)
子串查询Time Limit: 3500/3000 MS (Java/Others) Memory Limit: 262144/262144 K (Java/Others)Total Submission(s): 633 Accepted Submission(s): 301Problem Description度度熊的字符串课堂开始了!要以像度度熊一样的天才为目标,努力...原创 2018-08-11 20:31:19 · 188 阅读 · 0 评论 -
Codeforces 1005D:Polycarp and Div 3
题目链接:http://codeforces.com/problemset/problem/1005/D 题意 给出个字符串(全是数字),把这个字符串换分成一些子串,最多能划分多少个能够被3整除的子串(字符串去掉前导零,0能被3整除)AC代码#include <stdio.h>#include <string.h>#include <io...原创 2018-08-11 20:11:39 · 108 阅读 · 0 评论 -
Codeforces 208A:Dubstep(字符串)
题目链接:http://codeforces.com/problemset/problem/208/A题意给出一个字符串,将字符串中的WUB给删去,如果两个字母间有WUB,则这两个字母用空格隔开AC代码#include <stdio.h>#include <string.h>#include <iostream>#include ...原创 2018-07-26 16:57:40 · 292 阅读 · 0 评论 -
HPU 1476: 括号括号
1476: 括号括号时间限制: 3 Sec 内存限制: 128 MB提交: 305 解决: 61 统计题目描述小明今年上大学,在大学里发现有很多同学都女朋友,两人整天都在一起腻歪,小明看到后感觉很孤单,现在,给你一行括号序列,你来判断一下其中的括号是否配对。输入多组输入,每一组第一行输入一个数T(0<<N≤≤100),表示有T组测试数据。后面的T行输入多组输入数据...原创 2018-07-29 21:12:44 · 243 阅读 · 0 评论 -
HDU 3746:Cyclic Nacklace(KMP循环节)
Cyclic NacklaceTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 13790 Accepted Submission(s): 5738 Pro...原创 2018-07-26 15:45:06 · 167 阅读 · 0 评论 -
Codeforces 133A:HQ9+
A. HQ9+time limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputHQ9+ is a joke programming language which has only four one-character instructions:"H" prin...原创 2018-07-14 21:39:10 · 203 阅读 · 0 评论 -
Codeforces Round #224 (Div. 2) A. Ksenia and Pan Scales
A. Ksenia and Pan Scalestime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputKsenia has ordinary pan scales and several weights of an equal mass. Ksenia...原创 2018-04-16 21:34:02 · 127 阅读 · 0 评论 -
辞树的QAQ水题(字符串统计,思维)
思路:统计一串字符有多少个‘A’,并分别统计出每个‘A’前后有多少‘Q’。然后让每个‘A’前后的‘Q’相乘并相加就能得出结果了。注意:数据的类型,卡了int,要用long long。还有就是在pc^2上面用gets()读入字符串会WA?AC代码:#include<bits/stdc++.h>#define ll long long#define ms(a) m...原创 2018-07-24 20:34:46 · 155 阅读 · 0 评论 -
51Nod 1089:最长回文子串 V2(Manacher算法)
1089 最长回文子串 V2(Manacher算法) 基准时间限制:1 秒 空间限制:131072 KB 分值: 0 难度:基础题 收藏 关注回文串是指aba、abba、cccbccc、aaaa这种左右对称的字符串。输入一个字符串Str,输出Str里最长回文子串的长度。Input输入Str(Str的长度 <= 100000)Output输出最长回文子串...原创 2018-06-11 21:42:32 · 176 阅读 · 0 评论 -
51Nod 1088:最长回文子串(暴力)
1088 最长回文子串 基准时间限制:1 秒 空间限制:131072 KB 分值: 0 难度:基础题 收藏 关注回文串是指aba、abba、cccbccc、aaaa这种左右对称的字符串。输入一个字符串Str,输出Str里最长回文子串的长度。Input输入Str(Str的长度 <= 1000)Output输出最长回文子串的长度L。Input示例...原创 2018-06-11 21:37:42 · 153 阅读 · 0 评论 -
Codeforces 1105B:Zuhair and Strings(字符串水题)
time limit per test: 1 secondmemory limit per test: 256 megabytesinput: standard inputoutput: standard outputGiven a string sss of length nnn and integer k (1≤k≤n)k\ (1≤k≤n)k (1≤k≤n). ...原创 2019-01-21 11:28:00 · 636 阅读 · 0 评论