Result: Accepted
Time: 5ms
Memory: 1096kB
#include<stdio.h>
#include<stdlib.h>
#include<time.h>
#define ARRAY_SIZE 26
void main()
{
int i,m,t;
char c;
srand(time(NULL));
scanf("%d",&t);
getchar();
for(m=0;m<t;m++)
{
int count1[ARRAY_SIZE+1]={0};
int count2[ARRAY_SIZE+1]={0};
for(i=0;i<100;i++)
{
scanf("%c",&c);
if(c!='\n'&&c!=' ')
++count1[c-97];
else if(c=='\n')
break;
}
for(i=0;i<100;i++)
{
scanf("%c",&c);
if(c!='\n'&&c!=' ')
++count2[c-97];
else if(c=='\n')
break;
}
int k,o;
for(k=0;k<27;k++)
{
if(count1[k]==count2[k])
o=1;
else
{
o=0;
printf("No\n");
break;
}
}
if(o==1)
printf("Yes\n");
}
}