Python O(n^2) faster than 92.6%
The solution is very intuitive, but feel free to aks questions if something is unclear.\n```\n        increasing = [0] * len(rating)\n        decreasing = [0] *
The solution is very intuitive, but feel free to aks questions if something is unclear.\n```\n        increasing = [0] * len(rating)\n        decreasing = [0] * len(rating)\n        teams = 0\n        \n        for i in range(1,len(rating)):\n            for j in range(i):\n                \n                if rating[i] > rating[j]:\n                    increasing[i] += 1 \n                    teams+= increasing[j]\n                else:\n                    decreasing[i] += 1\n                    teams+= decreasing[j]\n        return teams\n\t\t
[]