Are All Value Frequencies Different?. Count how often each distinct integer appears in arr. Return true exactly when no two different values have the same occurrence count.
### Problem
Count how often each distinct integer appears in arr. Return true exactly when no two different values have the same occurrence count.
```cpp
class Solution {
public:
bool uniqueOccurrences(vector<int>& arr);
};
```
### Examples
**Example 1:**
```text
Input: arr = [4,4,4,2,2,9]
Output: true
Explanation: The occurrence counts are3,2,1, all different.
```
**Example 2:**
```text
Input: arr = [5,5,-1,-1]
Output: false
Explanation: Both distinct values occur twice.
```
### Constraints
- The input contains 1 to 1000 integers.
- Every value lies in `[-1000,1000]`.
### Contract considerations
Negative integers obey the same occurrence-count rule as nonnegative integers.
```hint Read the boundary condition
Are integer values themselves required to be different, or are their occurrence counts being compared?
```
### Boundary reminders
Negative integers obey the same occurrence-count rule as nonnegative integers.
Overview: Are All Value Frequencies Different?. Count how often each distinct integer appears in arr. Return true exactly when no two different values have the same occurrence count.