一道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 展开
 我来答
iandjava
2012-05-09 · TA获得超过281个赞
知道小有建树答主
回答量:398
采纳率:100%
帮助的人:292万
展开全部
DescriptionYou已经发明了一种新的加密技术,编码信息及其特征之间插入随机生成的字符串在一个聪明的办法。因为等待专利问题我们不会详细讨论如何产生串并插入原始信息。来验证你的办法,但是,它是必要的编写一个程序,检查是否有消息确实编码在最后的字符串。给出两个字符串s和t,你必须决定是否年代是一个后继的t,即如果你可以删除字符从t,剩下的连接。InputThe输入字符年代包含一些测试。每一个都是两个字符串中指定s,t字母的ASCII字符空格隔开。长度的年代和t将不超过100000。每个测试用例OutputFor输出“是的”,如果年代是一个后继的t,否则输出“不”。Inputsequence subsequenceperson compressionVERDI vivaVittorioEmanueleReDiItaliacaseDoesMatter样品CaseDoesMatterSample OutputYesNoYesNo
已赞过 已踩过<
你对这个回答的评价是?
评论 收起
aaa205208
2012-05-09
知道答主
回答量:21
采纳率:0%
帮助的人:5.5万
展开全部
同学,具体问题百度hi我~~我帮你在线解决,就是字符串匹配,字符串s和t,检查是否t是否包含s中所有字符。就是从t中删除部分字符,就会变成s。
已赞过 已踩过<
你对这个回答的评价是?
评论 收起
百度网友f243895
2012-05-16 · 超过11用户采纳过TA的回答
知道答主
回答量:128
采纳率:0%
帮助的人:37.9万
展开全部
你贴代码出来我帮你看看啊
已赞过 已踩过<
你对这个回答的评价是?
评论 收起
收起 更多回答(1)
推荐律师服务: 若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询

为你推荐:

下载百度知道APP,抢鲜体验
使用百度知道APP,立即抢鲜体验。你的手机镜头里或许有别人想知道的答案。
扫描二维码下载
×

类别

我们会通过消息、邮箱等方式尽快将举报结果通知您。

说明

0/200

提交
取消

辅 助

模 式