Start: Dec, 04, 2016 12:00:00
杭州师范大学第十届程序设计竞赛—正式
End: Dec, 04, 2016 17:00:00
Time elapsed:
Time remaining:

Problem_ID: F
Result: Accepted
Time: 1ms
Memory: 1700kB
In contest: 1075

#include<iostream>
#include<algorithm>
#include<string>
#include<stdio.h>
#include<string.h>
using namespace std;
int main()
{
	int t;
	cin>>t;
	char s1[105],s2[105];
	getchar();
	while(t--)
	{
		int a[205]={0};
		gets(s1);
		//getchar();
		//printf("%s\n",s1);
		gets(s2);
		//getchar();
		//printf("%s\n",s2);
		for(int i=0;i<strlen(s1);i++)
		{
			if(s1[i]!=' ')
			a[(int)s1[i]]++;
		}
		for(int i=0;i<strlen(s2);i++)
		{
			if(s2[i]!=' ')
			a[(int)s2[i]]--;
		}
		int i;
		for(i=0;i<200;i++)
		{
			if(a[i]!=0)break;
		}
		if(i==200)cout<<"Yes\n";
		else cout<<"No\n";

	}
}