Easy C++ Solution | Brute Force | Beats 100%
\n\n# Complexity\n- Time complexity: O(n*n)\n Add your time complexity here, e.g. O(n) \n\n- Space complexity: O(n)\n Add your space complexity here, e.g. O(n) 
\n\n# Complexity\n- Time complexity: O(n*n)\n<!-- Add your time complexity here, e.g. $$O(n)$$ -->\n\n- Space complexity: O(n)\n<!-- Add your space complexity here, e.g. $$O(n)$$ -->\n\n# Code\n```\nclass Solution {\npublic:\n    vector<int> countOfPairs(int n, int x, int y) {\n        vector<int>a(n+1,0);\n        for(int i = 0 ; i < n ; i++){\n            for(int j = 0 ; j < n ; j++){\n                int xy = 0;\n                if(abs(i+1-y) >= abs(i+1-x)){\n                    xy = abs(i+1-x) + 1 + abs(j+1-y);\n                }\n                else{\n                    xy = abs(i+1-y) + 1 + abs(j+1-x);\n                }\n                int dis = min(abs(j-i) , xy);\n                a[dis] += 1;\n            }\n        }\n        return vector<int>(a.begin()+1,a.end());\n    }\n};\n```
['C++']