Python3 solution
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```\ndef make1(n):\n    return list(range(2*(n-1), -2, -2))\ndef makeround(n):\n    a,b = divmod(n*(n-1), 2*n)\n    return [2*n]*a + [b] + [0]*(n-a-1)\n\ndef get(a, i):\n    return 0 if i>=len(a) else a[i]\n\ndef combine(*args):\n    n = max(len(l) for l in args)\n    return [sum(get(l,i) for l in args) for i in range(n)]\n    \n\ndef make2(a,b):\n    """ a: line, b: round"""\n    if a==0: return []\n    l=[1]\n    b-=1\n    while b:\n        if b==1: \n            l.append(b)\n            break\n        else:\n            l.append(2)\n            b-=2\n    # print(b, l)\n    res=[0]*(len(l) + a-1)\n    s=0\n    for i in range(len(res)):\n        if i<len(l): s+=l[i]\n        if i>=a: s-=l[i-a]\n        res[i] = 2*s\n    return res\n\ndef makeskip(a,b):\n    if a==0 or b==0: return []\n    res,s=[0,0], 0\n    for i in range(a+b-1):\n        if i<b: s+=1\n        if i>=a: s-=1\n        res.append(2*s)\n    return res\n\n    \n\nclass Solution:\n    def countOfPairs(self, n: int, x: int, y: int) -> List[int]:\n        if x>y: x,y = y,x\n        if y-x<=1: return make1(n)\n        if y-x==n-1: return makeround(n)\n        return combine([0]*n, make1(x-1), make1(n-y), makeround(y-x+1), make2(x-1, y-x+1), make2(n-y, y-x+1), makeskip(x-1,n-y))\n\n```
['Python3']