Language: C++

#include<iostream>
#include<cstring>
#include<map>
#include<algorithm>
#include<queue>
using namespace std;
char s[8005];
int dx[4]={1,0,-1,0};
int dy[4]={0,1,0,-1};
struct point
{
    int x,y;
    int dir,tim;
};
void solve(int l,int x,int y)
{
    //cout<<s+1<<endl;
    point P;
    P.x=0;P.y=0;P.dir=0;P.tim=0;
    queue<point>Q;
    Q.push(P);
    for(int i=1;i<=l;)
    {
        if(s[i]=='F')
        {
            while(!Q.empty())
            {
                point tmp=Q.front();
                if(tmp.tim==i) break;
                Q.pop();
                tmp.x+=dx[tmp.dir];
                tmp.y+=dy[tmp.dir];
                tmp.tim+=1;
                if(tmp.tim!=l) Q.push(tmp);
                else
                {
                    //cout<<tmp.x<<" "<<tmp.y<<endl;
                    if(tmp.x==x&&tmp.y==y)
                    {
                        cout<<"Yes"<<endl;
                        return ;
                    }
                }
            }
            i++;
        }
        else
        {
            if(i+1<=l&&s[i+1]=='T')
            {
                while(!Q.empty())
                {
                    point tmp=Q.front();
                    point Tmp=tmp;
                    if(tmp.tim==i+1) break;
                    Q.pop();
                    tmp.tim+=2;
                    if(tmp.tim!=l)
                    {
                        tmp.dir+=2;
                        tmp.dir%=4;
                        Tmp+=2;
                        Q.push(tmp);
                        Q.push(Tmp);
                    }
                    else
                    {
                        if(tmp.x==x&&tmp.y==y)
                        {
                            cout<<"Yes"<<endl;
                            return ;
                        }
                    }
                }
                i+=2;
            }
            else
            {
                while(!Q.empty())
                {
                    point tmp=Q.front();
                    point Tmp=tmp;
                    if(tmp.tim==i) break;
                    Q.pop();
                    tmp.tim+=1;
                    if(tmp.tim!=l)
                    {
                        tmp.dir+=1;
                        tmp.dir%=4;
                        Q.push(tmp);
                        Tmp.tim+=1;
                        Tmp.dir=(Tmp.dir+3)%4;
                        Q.push(Tmp);
                    }
                    else
                    {
                        if(tmp.x==x&&tmp.y==y)
                        {
                            cout<<"Yes"<<endl;
                            return ;
                        }
                    }
                }
                i=i+1;
            }
        }
    }
    cout<<"No"<<endl;
    return ;
}
int main()
{
    cin>>s+1;
    int l=strlen(s+1);
    int sum=0;
    for(int i=1;i<=l;i++)
    {
        if(s[i]=='F') sum++;
    }
    int x,y;
    scanf("%d%d",&x,&y);
    if(sum<abs(x)+abs(y)) cout<<"No"<<endl;
    else solve(l,x,y);
    return 0;
}


Compiler output:
a.cc: In function 'void solve(int, int, int)':
a.cc:62:28: error: no match for 'operator+=' (operand types are 'point' and 'int')
   62 |                         Tmp+=2;
      |                         ~~~^~~