Language: C++

      if(i+1<n && s[i+1]=='r')
                            i+=2;
                        if(i!=n && s[i]=='a')
                            i-=2;
                    }
                }
                else
                    {
                        return "NO";
                    }
            }
        return "YES";
}

int main()
{
    #ifndef ONLINE_JUDGE
    freopen("input.txt", "r", stdin);
    freopen("output.txt", "w", stdout);
    #endif
    ios_base::sync_with_stdio(0); ///cant use scanf, printf
    cin.tie(0);cout.tie(0); /// no longer auto flush cout before each cin, remove for interactive
    //cout << fixed << setprecision(11); /// no scientific output
    ll test=1;
    cin>>test;
    while(test--)
    {
            cout<<vfun()<<endl;

//         if(vfun())
//            cout<<"YES\n";
//         else
//            cout<<"NO\n";
    }
}
///before sub
/// check for value of zero and single input in array
///loop vars,1LL in mult, equal, one, bounds, int v ll, endl, finish taking inputs
/// check whether test cases are given or not





Compiler output:
a.cc:1:7: error: expected unqualified-id before 'if'
    1 |       if(i+1<n && s[i+1]=='r')
      |       ^~
a.cc:3:25: error: expected unqualified-id before 'if'
    3 |                         if(i!=n && s[i]=='a')
      |                         ^~
a.cc:5:21: error: expected declaration before '}' token
    5 |                     }
      |                     ^
a.cc:6:17: error: expected declaration before '}' token
    6 |                 }
      |                 ^
a.cc:7:17: error: expected unqualified-id before 'else'
    7 |                 else
      |                 ^~~~
a.cc:11:13: error: expected declaration before '}' token
   11 |             }
      |             ^
a.cc:12:9: error: expected unqualified-id before 'return'
   12 |         return "YES";
      |         ^~~~~~
a.cc:13:1: error: expected declaration before '}' token
   13 | }
      | ^
a.cc: In function 'int main()':
a.cc:18:31: error: 'stdin' was not declared in this scope
   18 |     freopen("input.txt", "r", stdin);
      |                               ^~~~~
a.cc:1:1: note: 'stdin' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
  +++ |+#include <cstdio>
    1 |       if(i+1<n && s[i+1]=='r')
a.cc:18:5: error: 'freopen' was not declared in this scope
   18 |     freopen("input.txt", "r", stdin);
      |     ^~~~~~~
a.cc:19:32: error: 'stdout' was not declared in this scope
   19 |     freopen("output.txt", "w", stdout);
      |                                ^~~~~~
a.cc:19:32: note: 'stdout' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
a.cc:21:5: error: 'ios_base' has not been declared
   21 |     ios_base::sync_with_stdio(0); ///cant use scanf, printf
      |     ^~~~~~~~
a.cc:22:5: error: 'cin' was not declared in this scope
   22 |     cin.tie(0);cout.tie(0); /// no longer auto flush cout before each cin, remove for interactive
      |     ^~~
a.cc:22:16: error: 'cout' was not declared in this scope
   22 |     cin.tie(0);cout.tie(0); /// no longer auto flush cout before each cin, remove for interactive
      |                ^~~~
a.cc:24:5: error: 'll' was not declared in this scope
   24 |     ll test=1;
      |     ^~
a.cc:25:10: error: 'test' was not declared in this scope
   25 |     cin>>test;
      |          ^~~~
a.cc:28:19: error: 'vfun' was not declared in this scope
   28 |             cout<<vfun()<<endl;
      |                   ^~~~
a.cc:28:27: error: 'endl' was not declared in this scope
   28 |             cout<<vfun()<<endl;
      |                           ^~~~