c++ 100% beat 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```cpp []\nclass Solution {\npublic:\n    vector<int> numMovesStones(int a, int b, int c) {\n      vector<int>v(2,0);\n      int h=max(c,max(a,b));\n      int mn=min(c,min(a,b));\n      int mid;\n      if(a==h){\n        mid=max(b,c);\n      }else if(b==h){\n        mid=max(a,c);\n      }else{\n        mid=max(a,b);\n      }\n    if(mn+1==mid && mid+1==h)\n    return v;\n    int x=0,y=0;\n    if((h-mid)<=2 || (mid-mn)<=2){\n        x=1;\n        y=(h-mid)+(mid-mn)-2;\n        v[0]=x;\n        v[1]=y;\n    }else{\n        x=2;\n         y=(h-mid)+(mid-mn)-2;\n        v[0]=x;\n        v[1]=y;\n    }\n      return v;  \n    }\n};\n```
['C++']