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: 1096kB
In contest: 1075

#include<stdio.h>
#include<string.h>
int main(){
	int t;
	int a[28];
	char b[100];
	int m;
	char j;
	int i;
	scanf("%d",&t);
	scanf("%c",&j);
	while(t--){
	for( i = 0;i <27;i++){
		a[i] = 0;
	}	
	 gets(b);
	for(int i = 0;i < strlen(b);i++)
	{
		if(b[i] == ' ')
			continue;
	       m = b[i] - 'a';
		   a[m]++;
	}
	gets(b);
	for(int i = 0;i < strlen(b);i++)
	{
		if(b[i] == ' ')
			continue;
	       m = b[i] - 'a';
		   a[m]--;
	}
	for(i = 0;i <27;i++){
		if(a[i] != 0)
			break;
	}
	if(i == 27)
		printf("Yes\n");
	else
		printf("No\n");
	}
}