#include <iostream>
#include<string>
#include<vector>
#include<unordered_map>
#include <algorithm>
using namespace std;
class Solution {
public:
bool canConstruct(string ransomNote, string magazine) {
unordered_map<char, int> num_map;
for (auto i : magazine)
{
num_map[i]++;
}
for (auto i : ransomNote)
{
num_map[i]--;
if ( num_map[i]==-1)
return false;
}
return true;
}
};
int main() {
Solution a;
string ransomNote = "a";
string magazine = "b";
cout<<a.canConstruct( ransomNote, magazine);
return 0;
}