字符串
小耿要努力变强!
neuqacmer
展开
-
按照字典序大小遍历字符串的方法
输出a b c d e f g h i j k l m n o p q r s t u v w x y z aa ab ac ad ae af ag ah ai aj ak al am an ao ap aq ar as at au av aw ax ay az ba bb bc bd be bf bg bh bi bj bk bl bm bn bo bp bq br bs bt bu bv bw bx by bz ca cb cc cd ce cf cg ch ci cj ck cl cm cn co原创 2021-06-07 20:27:53 · 133 阅读 · 0 评论 -
Codeforces Round #724 (Div. 2) B. Prinzessin der Verurteilung(字符串模拟)
题目I, Fischl, Prinzessin der Verurteilung, descend upon this land by thecall of fate an — Oh, you are also a traveler from another world? Verywell, I grant you permission to travel with me.It is no surprise Fischl speaks with a strange choice of words.原创 2021-06-07 20:25:12 · 269 阅读 · 0 评论 -
7-8 估值一亿的AI核心代码 (20 分)(字符串大模拟题)
以上图片来自新浪微博。本题要求你实现一个稍微更值钱一点的 AI 英文问答程序,规则是:无论用户说什么,首先把对方说的话在一行中原样打印出来;消除原文中多余空格:把相邻单词间的多个空格换成 1 个空格,把行首尾的空格全部删掉,把标点符号前面的空格删掉;把原文中所有大写英文字母变成小写,除了 I;把原文中所有独立的 can you、could you 对应地换成 I can、I could—— 这里“独立”是指被空格或标点符号分隔开的单词;把原文中所有独立的 I 和 me 换成 you;把原文中所原创 2021-04-23 13:26:58 · 184 阅读 · 0 评论 -
字符串总结
string s;isalnum()//判断是否是字母tolower()//转换为小写toupper()//转换成大写s.insert(0,"hello");getchar()//吸收换行原创 2021-04-23 13:24:52 · 43 阅读 · 0 评论 -
Page Numbers(字符串)
«Bersoft» company is working on a new version of its most popular text editor — Bord 2010. Bord, like many other text editors, should beable to print out multipage documents. A user keys a sequence of thedocument page numbers that he wants to print out.原创 2021-03-03 10:56:32 · 263 阅读 · 0 评论 -
单词数(字符串)
lily的好朋友xiaoou333最近很空,他想了一件没有什么意义的事情,就是统计一篇文章里不同单词的总数。下面你的任务是帮助xiaoou333解决这个问题。Input有多组数据,每组一行,每组就是一篇小文章。每篇小文章都是由小写字母和空格组成,没有标点符号,遇到#时表示输入结束。 Output每组只输出一个整数,其单独成行,该整数代表一篇文章里不同单词的总数。 Sample Inputyou are my friend#Sample Output4#include<ios..原创 2021-03-03 09:01:40 · 136 阅读 · 4 评论