參考資訊:
https://www.cnblogs.com/grandyang/p/15201746.html
題目:

解答:
class Solution {
public:
bool uniqueOccurrences(vector<int>& arr) {
unordered_set<int> m1;
unordered_map<int, int> m0;
for (int n : arr) {
m0[n] += 1;
}
for (auto n : m0) {
if (m1.count(n.second) > 0) {
return false;
}
m1.insert(n.second);
}
return true;
}
};