c++ 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```\nclass Solution {\npublic:\n    bool find(string &s,string &t,int mid)\n    {\n        int n=s.size();\n        int m=t.size();\n        vector<int>left(m,n),right(m,-1);\n        for(int i=0,j=0;j<m&&i<n;i++)\n        {\n            if(s[i]==t[j])\n            {\n                left[j]=i;\n                j++;\n            }\n        }\n        for(int i=n-1,j=m-1;j>=0&&i>=0;i--)\n        {\n            if(s[i]==t[j])\n            {\n                right[j]=i;\n                j--;\n            }\n        }\n        if(left[m-1]!=n)\n        {\n            return true;\n        }\n        if(right[mid]!=-1||left[m-mid-1]!=n)\n        {\n            return true;\n        }\n        for(int i=1;i+mid<m;i++)\n        {\n            if(left[i-1]<right[i+mid])\n            {\n                return true;\n            }\n        }\n        return false;\n    }\n    int minimumScore(string s, string t) {\n        int l=0;\n        int r=t.size()-1;\n        int ans=t.size();\n        while(l<=r)\n        {\n            int mid=(l+r)/2;\n            if(find(s,t,mid))\n            {\n                ans=mid;\n                r=mid-1;\n            }\n            else\n            {\n                l=mid+1;\n            }\n        }\n        return ans;\n    }\n};\n```
['C++']