100% Easy Solution
IntuitionApproachComplexity
Time complexity:

Space complexity:
Code
# Intuition
<!-- Describe your first thoughts on how to solve this problem. -->

# Approach
<!-- Describe your approach to solving the problem. -->

# Complexity
- Time complexity:
<!-- Add your time complexity here, e.g. $$O(n)$$ -->

- Space complexity:
<!-- Add your space complexity here, e.g. $$O(n)$$ -->

# Code
```cpp []
class Solution {
public:
    vector<int> distinctDifferenceArray(vector<int>& nums) {
        vector<int>arr1(51,0);
        vector<int>arr2(51,0);
        vector<int>anchuu(nums.size(),-1);
        for(int i=0;i<nums.size();i++)
        {
            int x=i,y=i+1;
            while(x>=0)
            {
                int index=nums[x];
                arr1[index]=1;
                x--;
            }
            while(y<nums.size())
            {
                int index=nums[y];
                arr2[index]=1;
                y++;
            }
            int ans1=0,ans2=0;
            for(int j=0;j<51;j++)
            {
                if(arr1[j]==1)
                {
                    arr1[j]=0;
                    ans1+=1;
                }
            }
            for(int j=0;j<51;j++)
            {
                if(arr2[j]==1)
                {
                    arr2[j]=0;
                    ans2+=1;
                }
            }
            anchuu[i]=(ans1-ans2);
        }
        return anchuu;
    }
};
```
['C++']