字符串
忆昔,仰优
Accepted
展开
-
Odd Palindrome
SDUT 2019 Autumn Team Contest 20th A题意:一个串的回文子串如果是奇数长度则称为Odd.解体关键:如果一个串的回文子串为偶数长度,则其必有两个相邻的字母相同。考的不是知识点,是IQ代码如下:#include<bits/stdc++.h>using namespace std;int main(){ string ...原创 2019-10-28 20:34:44 · 327 阅读 · 0 评论 -
Go Latin(字符串连接)
题目链接:https://vjudge.net/contest/335987#problem/D代码:第一次写的:一直WA1,原因是'ne'弄错了,n、e都应该去掉。#include<bits/stdc++.h>using namespace std;void connect(char s[],char c[],int len,int lan){ ...原创 2019-10-24 20:11:18 · 218 阅读 · 0 评论 -
水果
夏天来了好开心啊,呵呵,好多好多水果Joe经营着一个不大的水果店.他认为生存之道就是经营最受顾客欢迎的水果.现在他想要一份水果销售情况的明细表,这样Joe就可以很容易掌握所有水果的销售情况了.Input第一行正整数N(0<N<=10)表示有N组测试数据.每组测试数据的第一行是一个整数M(0<M<=100),表示工有M次成功的交易.其后有M行数据,每行表示一次交易,由...原创 2019-08-22 20:34:05 · 80 阅读 · 0 评论 -
Good Words
Zaid has two words, a of length between 4 and 1000 and b of length 4 exactly. The word a is ‘good’ if it has a substring which is equal to b. However, a is ‘almost good’ if by inserting a single lette...原创 2019-08-17 21:10:02 · 166 阅读 · 0 评论 -
Cutie Pie
Consider a NxM small-letters grid. SVU asked you to check whether this grid is a Cutie Pie or not A grid is a cutie pie if you can find the word “pie” in any direction (vertical, horizontal, and radia...原创 2019-08-17 20:56:01 · 228 阅读 · 0 评论 -
Playing With Strings
Dani and Mike are two kids ,They are playing games all day and when they don’t find a game to play they invent a game . There is about an hour to arrive to school, because they love playing with strin...原创 2019-08-17 20:12:41 · 226 阅读 · 0 评论 -
cyk追楠神系列一
Problem Description众所周知,cyk 是个奇特的人,有一天,他终于又做出了一个惊 (zheng) 人 (chang) 的决定,他决定追楠神了!于是 cyk 就写了一封信向楠神表白。但是楠神作为 acm 的大佬,怎么能轻易答应 cyk,他决定对信做一个考察,为此他特意定义了“爱的证据”,“爱的证据”即如果在信里的一个长度等于 k 的字符子串里包含“love”,那么这就是一个“爱的...原创 2019-08-12 09:42:47 · 192 阅读 · 0 评论 -
MaratonIME bot
As you probably already know, all members of MaratonIME use Telegram to communicate, for its amazing web and desktop apps, its bots and, of course, its stickers.As time goes by, members eventually gr...原创 2019-08-06 20:05:39 · 269 阅读 · 0 评论 -
单词数
lily的好朋友xiaoou333最近很空,他想了一件没有什么意义的事情,就是统计一篇文章里不同单词的总数。下面你的任务是帮助xiaoou333解决这个问题。Input有多组数据,每组一行,每组就是一篇小文章。每篇小文章都是由小写字母和空格组成,没有标点符号,遇到#时表示输入结束。Output每组只输出一个整数,其单独成行,该整数代表一篇文章里不同单词的总数。Sample Inputy...原创 2019-08-06 10:32:39 · 231 阅读 · 0 评论 -
字符串扩展
Problem DescriptionTom有些时候为了记录的方便,常常将一些连续的字符用扩展符’-‘简单表示。比如abcdefg可以简写为a-g,即用起始的字符和终止字符中间加上一个扩展符’-‘来表示这个字符串。但是为了处理的方便,Tom又必须将这些我们简单记法扩展成原来的字符串。很明显要是人工来做的话必定很麻烦,Tom知道计算机可以帮助他完成这个任务,但是他却不会编程,这的确让他很上火。他知...原创 2019-08-06 09:54:36 · 72 阅读 · 0 评论