Untitled
user_5668965
c_cpp
a year ago
508 B
12
Indexable
#include <stdio.h>
#include <string.h>
#include <ctype.h>
int main() {
int i, l, yes;
static char s[202];
static int cnt[64];
fgets(s, 202, stdin);
l = strlen(s);
for (i = 0; i < l; i++)
if (!isspace(s[i]))
cnt[s[i] - 'A']++;
fgets(s, 202, stdin);
l = strlen(s);
for (i = 0; i < l; i++)
if (!isspace(s[i]))
cnt[s[i] - 'A']--;
yes = 1;
for (i = 0; i < 64; i++)
if (cnt[i] < 0) {
yes = 0;
break;
}
printf("%s\n", yes ? "YES" : "NO");
return 0;
}
Editor is loading...
Leave a Comment