// Example3.cpp : 定义控制台应用程序的入口点. //以特定单词为分界,求取字符串的左右子串 #include "StdAfx.h" #include <string> #include <iostream> using namespace std; int main(void) { string str,str1,str2; int index; str="cjc is a good boy"; cout<<&q
题目: You are given an input string. For each symbol in the string if it's the first character occurence, replace it with a '1', else replace it with the amount of times you've already seen it... But will your code be performant enough? Examples: input