#include <cstdio>
#include <cstdlib>
#include <iostream>
#include <algorithm>
#include <string>
#include <cstring>
using namespace std;
int book[1000]={0};
int main()
{
// freopen("in.txt","r",stdin);
int cou1=0,cou2=0;
char ch;
while( (ch=getchar())!='\n' )
{
cou1++;
int t=ch;
book[t]++;
}
int miss=0;
while( (ch=getchar())!=EOF )
{
if(ch=='\n')
break;//吸收掉最后一个回车
cou2++;
int t=ch;
book[t]--;
if(book[t]<0)
miss++;
}
if(miss==0)
printf("Yes %d",cou1-cou2);
else
printf("No %d",miss);
return 0;
}
1092. To Buy or Not to Buy (20)
最新推荐文章于 2022-12-11 08:45:55 发布