跪求C++编程高手给编个程序~感激不尽 40

Program1:IamLordVoldemortIfyouhaveeverreadHarryPotter,youwouldknowthattheevilandpower... Program 1: I am Lord Voldemort
If you have ever read Harry Potter, you would know that the evil and powerful wizard, Lord Voldemort, create this name by permuting his original name, "Tom Marvolo Riddle", to "I am Lord Voldemort".
Write a program to check whether it is possible to transform a given word to another by permuting its letters.
Input Format: (a1.in)
The first line is an integer T, the number of test cases. Following T lines each contains two words separated by spaces.
Output Format: (a1.out)
For each test case, Output on a line "Yes" if it is possible to do the transformation, otherwise output "No" instead.
Notes
• Permuting a word is to change the order of its letters, but no new letters can be added and no original letters can be deleted. For example, one can transform "aabc" to "abca", but not to "bac", "abc", "aabca", "aacbb".
• Words will contain letters only('a'-'z', 'A'-'Z').
• A word won't contain any white spaces in itself.
• The given two words will not be the same.
• You should ignore case when comparing words, i.e. 'a' is the same as 'A', 'b' is the same as 'B', etc.
Constraints
• The length of any given word is greater than 0 and no larger than 50.
Sample Input:
4
TomMarvoloRiddle IamLordVoldemort
stop pots
abbc bac
InternetAnagramServer IRearrangementServant
Sample Output:
Yes
Yes
No
Yes
多说一下:要用Visual C++编写~~拜托了~
下周就交了~~高手们~帮帮忙吧~题目的大概意思就是输入两个词~看其中的字母是否相同~顺序无所谓~只要是字母相同就输出YES~不同输出NO~~
展开
 我来答
leiting991002
2008-09-04 · TA获得超过628个赞
知道小有建树答主
回答量:810
采纳率:0%
帮助的人:935万
展开全部
你先把他翻译成中文不行吗
其实高手是不会来这里的,高手也怕麻烦的
gogd9999
2008-09-04 · TA获得超过383个赞
知道小有建树答主
回答量:547
采纳率:0%
帮助的人:200万
展开全部
很想帮你发现忘记太多了
已赞过 已踩过<
你对这个回答的评价是?
评论 收起
闪浪维新
2008-09-04
知道答主
回答量:16
采纳率:0%
帮助的人:0
展开全部
学习中
已赞过 已踩过<
你对这个回答的评价是?
评论 收起
好办呢好办
2008-09-04
知道答主
回答量:21
采纳率:0%
帮助的人:0
展开全部
学习中
已赞过 已踩过<
你对这个回答的评价是?
评论 收起
收起 更多回答(2)
推荐律师服务: 若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询

为你推荐:

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

类别

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

说明

0/200

提交
取消

辅 助

模 式