一道C++问题!!急
答案:3 悬赏:20 手机版
解决时间 2021-01-30 04:15
- 提问者网友:你给我的爱
- 2021-01-29 14:35
用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
最佳答案
- 五星知识达人网友:撞了怀
- 2021-01-29 14:52
DescriptionYou已经发明了一种新的加密技术,编码信息及其特征之间插入随机生成的字符串在一个聪明的办法。因为等待专利问题我们不会详细讨论如何产生串并插入原始信息。来验证你的办法,但是,它是必要的编写一个程序,检查是否有消息确实编码在最后的字符串。给出两个字符串s和t,你必须决定是否年代是一个后继的t,即如果你可以删除字符从t,剩下的连接。InputThe输入字符年代包含一些测试。每一个都是两个字符串中指定s,t字母的ASCII字符空格隔开。长度的年代和t将不超过100000。每个测试用例OutputFor输出“是的”,如果年代是一个后继的t,否则输出“不”。Inputsequence subsequenceperson compressionVERDI vivaVittorioEmanueleReDiItaliacaseDoesMatter样品CaseDoesMatterSample OutputYesNoYesNo
全部回答
- 1楼网友:枭雄戏美人
- 2021-01-29 15:57
你贴代码出来我帮你看看啊
- 2楼网友:患得患失的劫
- 2021-01-29 15:43
同学,具体问题百度hi我~~我帮你在线解决,就是字符串匹配,字符串s和t,检查是否t是否包含s中所有字符。就是从t中删除部分字符,就会变成s。
我要举报
如以上问答信息为低俗、色情、不良、暴力、侵权、涉及违法等信息,可以点下面链接进行举报!
大家都在看
推荐资讯