Language: C++

#include <iostream>
#include <string>
#include <algorithm>
using namespace std;
    string co;
    vector <int> xa,ya;
    bool xt,yt;
    int x,y;
void runx(int sum,int idx)
{
    if(idx==xa.size())
    {
        if(sum==x)
            xt=true;
        return;
    }
    if(xt)
        return;
    runx(sum+xa[idx],idx+1);
    runx(sum-xa[idx],idx+1);
    return;
}
void runy(int sum,int idx)
{//cout<<sum<<endl;
    if(idx==ya.size())
    {
        if(sum==y)
            yt=true;
        return;
    }
    if(yt)
        return;
    runy(sum+ya[idx],idx+1);
    runy(sum-ya[idx],idx+1);
    return;
}
int main(void)
{
    cin>>co;
    cin>>x>>y;
    bool flag=true;
    int i;
    int cnt=0;
    for(i=0;i<co.size();i++)
    {
        if(co[i]=='F')
        {
            cnt++;
        }
        else
        {
            if(flag&&cnt)
                xa.push_back(cnt);
            else if((!flag)&&cnt)
                ya.push_back(cnt);
            cnt=0;
            flag=!flag;
        }
    }
    if(cnt)
    {
        if(flag)
            xa.push_back(cnt);
        else
            ya.push_back(cnt);
    }
    //for(auto i:xa)cout<<i<<" ";cout<<endl;
    //for(auto i:ya)cout<<i<<" ";cout<<endl;
    runx(0,0);
    runy(0,0);
    if(xa.size()==0&&x==0)
        xt=true;
    if(ya.size()==0&&y==0)
        yt=true;
    if(xt&&yt)
        cout<<"Yes"<<endl;
    else
        cout<<"No"<<endl;
    return 0;
}


Compiler output:
a.cc:6:5: error: 'vector' does not name a type
    6 |     vector <int> xa,ya;
      |     ^~~~~~
a.cc: In function 'void runx(int, int)':
a.cc:11:13: error: 'xa' was not declared in this scope; did you mean 'xt'?
   11 |     if(idx==xa.size())
      |             ^~
      |             xt
a.cc:19:14: error: 'xa' was not declared in this scope; did you mean 'xt'?
   19 |     runx(sum+xa[idx],idx+1);
      |              ^~
      |              xt
a.cc: In function 'void runy(int, int)':
a.cc:25:13: error: 'ya' was not declared in this scope; did you mean 'yt'?
   25 |     if(idx==ya.size())
      |             ^~
      |             yt
a.cc:33:14: error: 'ya' was not declared in this scope; did you mean 'yt'?
   33 |     runy(sum+ya[idx],idx+1);
      |              ^~
      |              yt
a.cc: In function 'int main()':
a.cc:53:17: error: 'xa' was not declared in this scope; did you mean 'xt'?
   53 |                 xa.push_back(cnt);
      |                 ^~
      |                 xt
a.cc:55:17: error: 'ya' was not declared in this scope; did you mean 'yt'?
   55 |                 ya.push_back(cnt);
      |                 ^~
      |                 yt
a.cc:63:13: error: 'xa' was not declared in this scope; did you mean 'xt'?
   63 |             xa.push_back(cnt);
      |             ^~
      |             xt
a.cc:65:13: error: 'ya' was not declared in this scope; did you mean 'yt'?
   65 |             ya.push_back(cnt);
      |             ^~
      |             yt
a.cc:71:8: error: 'xa' was not declared in this scope; did you mean 'xt'?
   71 |     if(xa.size()==0&&x==0)
      |        ^~
      |        xt
a.cc:73:8: error: 'ya' was not declared in this scope; did you mean 'yt'?
   73 |     if(ya.size()==0&&y==0)
      |        ^~
      |        yt