Easy C++ Brute force O(N*N) solution
\n\n# Code\n\nclass Solution {\npublic:\n    vector<int> countOfPairs(int n, int x, int y) {\n        vector<int> ans(n,0);\n        for(int i=1;i<=n;i++)\n    
\n\n# Code\n```\nclass Solution {\npublic:\n    vector<int> countOfPairs(int n, int x, int y) {\n        vector<int> ans(n,0);\n        for(int i=1;i<=n;i++)\n        {\n            for(int j=i+1;j<=n;j++)\n            {\n                int k=abs(i-j);\n                k=min(k,abs(i-x)+1+abs(j-y));\n                k=min(k,abs(i-y)+1+abs(j-x));\n                ans[k-1]+=2;\n            }\n        }\n        return ans;\n    }\n};\n```
['C++']