链接:https://www.nowcoder.com/acm/contest/141/E来源:牛客网 Eddy likes to play with string which is a sequence of characters. One day, Eddy has played with a string S for a long time and wonders how could make it more enjoyable. Eddy comes up with following
字符串替换 时间限制:3000 ms | 内存限制:65535 KB 难度:2 描述 编写一个程序实现将字符串中的所有"you"替换成"we" 输入 输入包含多行数据 每行数据是一个字符串,长度不超过1000 数据以EOF结束 输出 对于输入的每一行,输出替换后的字符串 样例输入 you are what you do 样例输出 we are what we do #include <iostream> #include <string
Weird Cryptography Time Limit:2000MS Memory Limit:65536KB 64bit IO Format:%I64d & %I64u Gym 100935B Description standard input/output Khaled was sitting in the garden under an apple tree, suddenly! , well... you should guess what happened, a
描述 编写一个程序实现将字符串中的所有"you"替换成"we" 输入 输入包含多行数据 每行数据是一个字符串,长度不超过1000 数据以EOF结束 输出 对于输入的每一行,输出替换后的字符串 样例输入 you are what you do 样例输出 we are what we do STL string 练手题: 熟悉 find 函数,以及 replace 函数 //Asimple #include <iostream> #include <s
SUBSTRING 时间限制: 1 Sec 内存限制: 128 MB 提交: 17 解决: 5 [提交][状态][讨论版] 题目描述 You are given a string input. You are to find the longest substring of input such that the reversal of the substring is also a substring of input. In case of a tie, return the strin
//第一题是猜数字的游戏.//题目:随即产生一个3位的正整数,让你进行猜数字,//如果猜小了,输出:"猜小了,请继续".//如果猜大了,输出:"猜大了,请继续".//如果猜对了.输出:"恭喜你,猜对了".//不过最多只能猜10次,如果猜了10次还没有猜对,就退出程序,输出:"Bye Bye". /*总结:此题最主要的地方就是产生随机数的方法:rand() % N + A, A为起始位,N为数字的总数.例如:随机生成0~10的数