
一道C++问题!!急
用C++写出来,最好翻译出来DescriptionYouhavedevisedanewencryptiontechniquewhichencodesamessagebyi...
用C++写出来,最好翻译出来DescriptionYou have devised a new encryption technique which encodes a message by inserting between its characters randomly generated strings in a clever way. Because of pending patent issues we will not discuss in detail how the strings are generated and inserted into the original message. To validate your method, however, it is necessary to write a program that checks if the message is really encoded in the final string. Given two strings s and t, you have to decide whether s is a subsequence of t, i.e. if you can remove characters from t such that the concatenation of the remaining characters is s. InputThe input contains several testcases. Each is specified by two strings s, t of alphanumeric ASCII characters separated by whitespace.The length of s and t will no more than 100000.OutputFor each test case output "Yes", if s is a subsequence of t,otherwise output "No".Sample Inputsequence subsequenceperson compressionVERDI vivaVittorioEmanueleReDiItaliacaseDoesMatter CaseDoesMatterSample OutputYesNoYesNo
展开
展开全部
DescriptionYou已经发明了一种新的加密技术,编码信息及其特征之间插入随机生成的字符串在一个聪明的办法。因为等待专利问题我们不会详细讨论如何产生串并插入原始信息。来验证你的办法,但是,它是必要的编写一个程序,检查是否有消息确实编码在最后的字符串。给出两个字符串s和t,你必须决定是否年代是一个后继的t,即如果你可以删除字符从t,剩下的连接。InputThe输入字符年代包含一些测试。每一个都是两个字符串中指定s,t字母的ASCII字符空格隔开。长度的年代和t将不超过100000。每个测试用例OutputFor输出“是的”,如果年代是一个后继的t,否则输出“不”。Inputsequence subsequenceperson compressionVERDI vivaVittorioEmanueleReDiItaliacaseDoesMatter样品CaseDoesMatterSample OutputYesNoYesNo
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
同学,具体问题百度hi我~~我帮你在线解决,就是字符串匹配,字符串s和t,检查是否t是否包含s中所有字符。就是从t中删除部分字符,就会变成s。
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
你贴代码出来我帮你看看啊
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询