#include
using namespace std;
int main() {
// 包含全部需要珠子 剩余 或缺少
// 跟旧键盘的思路类似 一个预定的输入 一实际输出
map store, red;
string s, r;
// 读取摊主和小红的字符串
getline(cin, s);
getline(cin, r);
// 用map统计每个字符的个数
for(int i = 0; i < s.size(); i++)
store[s[i]]++;
for(int i = 0; i < r.size(); i++)
red[r[i]]++;
// 统计多出或少于的(字符)数
int more = 0, lose = 0;
for(auto s: store){
// 区分情况
// 遍历每一个字符 供给多于需求 (等于 算不算都一样 都是0
if(s.second > red[s.first])
more += s.second - red[s.first];
// 找得到 但少于需求
else
lose += red[s.first] - s.second;
// 擦除遍历过的需求的字符
red.erase(s.first);
}
// 遍历剩余字符 这部分必然是缺少的字符
for(auto r: red)
lose += r.second;
if(lose > 0)
cout |