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<stdio.h>
#include<iostream>
#include<string>
#include<vector>
#include<algorithm>
#include<map>
#include<string.h>
#include<math.h>
using namespace std;

int main(){
	int t;
	cin>>t;
	getchar();
	while(t--){
		int num1[30]={0},num2[30]={0};
		int flag=1;
		char a[110],b[110];
		gets(a);
		gets(b);
		int i;
		for(i=0;i<strlen(a);i++) if(a[i]!=32) num1[a[i]-'a']++;
		for(i=0;i<strlen(b);i++) if(b[i]!=32) num2[b[i]-'a']++;
		for(i=0;i<26;i++) if(num1[i]!=num2[i])flag=0;
		if(flag)cout<<"Yes"<<endl;
		else cout<<"No"<<endl;
	}
}