[Python]Fast and Easy solution.(Runtime:100%,Memory:100%) O(n^2)
\nDirect comparison between taking shortcuts and not taking shortcuts\n\n# Complexity\n- Time complexity: O(n^2)\n Add your time complexity here, e.g. O(n) \n\n
\nDirect comparison between taking shortcuts and not taking shortcuts\n\n# Complexity\n- Time complexity: $$O(n^2)$$\n<!-- Add your time complexity here, e.g. $$O(n)$$ -->\n\n# Code\n```\nclass Solution:\n    def countOfPairs(self, n: int, x: int, y: int) -> List[int]:\n        mi = min(x, y) - 1\n        ma = max(x, y) - 1\n        res = [0]*n\n        for i in range(n - 1):\n            for j in range(i + 1, n):\n                dis = min(j-i,abs(mi-i)+abs(ma-j)+1)\n\n                res[dis-1] += 2\n        return res\n```
['Python3']