Psst.. new poll here.
Psst.. new forums here.
Microsoft is blocking us again (TY IP Reputation!) so just use oauth login instead. :)
Paste
Pasted as C by registered user ggg40504 ( 5 years ago )
#include <stdio.h>
int main(void)
{
int n,m;
int i,j;
char a[1001],b[1001];
int f=0;
while(scanf("%d %d",&n,&m)&&scanf("%s %s",a,b)!=EOF){
for(i=0;i<n;i++){
for(j=0;j<m;j++){
if(a[i]==b[j]){
f++;
b[j]=0;
a[i]=0;
}
}
}
if(f==n&&n==m){
printf("YES\n");
f=0;
}
else{
printf("NO\n");
f=0;
}
}
return 0;
}
Revise this Paste