Floyd Walshav
Intuition\n Describe your first thoughts on how to solve this problem. \n\n# Approach\n Describe your approach to solving the problem. \n\n# Complexity\n- Time 
# Intuition\n<!-- Describe your first thoughts on how to solve this problem. -->\n\n# Approach\n<!-- Describe your approach to solving the problem. -->\n\n# Complexity\n- Time complexity:\n<!-- Add your time complexity here, e.g. $$O(n)$$ -->\n\n- Space complexity:\n<!-- Add your space complexity here, e.g. $$O(n)$$ -->\n\n# Code\n```\npublic class Solution {\n    public int[] CountOfPairs(int n, int x, int y) {\n        int [,]map =new int[n,n];\n        for (int i=0; i< n; i++){\n            for (int j=0; j<n;j++){\n                if (j==i+1|| i==j+1)map[i,j]=1;\n                else map[i,j]=200;\n            }\n        }\n        for (int i=0; i<n; i++){\n            map[i,i]=0;\n        }\n        map[x-1,y-1]=1;\n        map[y-1,x-1]=1;\n        for (int k=0; k<n; k++){\n            for (int i=0; i<n; i++){\n                for (int j=0; j<n; j++){\n                    if (map[i,k]!=200&& map[k,j]!=200)map[i,j]=Math.Min(map[i,j], map[i,k]+map[k,j]);\n                }\n            }\n        }\nDictionary<int,int> d= new Dictionary<int,int>();\nfor (int i=1; i<=n; i++){\n    d.Add(i,0);\n}\n    for (int i=0; i<n; i++){\n        for (int j=0; j<n; j++){\n           if (i!=j) d[map[i,j]]++;\n        }\n    }\n\n    int []ans= new int [n];\n    for (int i=1;i<=n; i++){\n        ans[i-1]=d[i];\n    }\n\nreturn ans;\n    }\n}\n```
['C#']