Language: C++

#include<iostream>
#include<algorithm>
#include<math.h>
#include<cstdio>
#include<ctype.h>
#include<stdio.h>
#include<set>
#include<vector>
#include<map>
#include<functional>
#include<iomanip>
#include<queue>
#include<ciso646>
#include<random>
#include<numeric>
#include<string>
ll dx[] = { 1,1,0,-1,-1,-1,0,1 };
ll dy[] = { 0,1,1,1,0,-1,-1,-1 };
ll prime(ll x) {
	ll i;
	if (x < 2)return 0;
	else if (x == 2) return 1;
	if (x % 2 == 0) return 0;
	for (i = 3; i*i <= x; i += 2) {
		if (x%i == 0) return 0;
	}
	return 1;
}
ll gcd(ll a, ll b) {
	if (a<b) { return gcd(b, a); }
	else if (a%b) { return gcd(b, a%b); }
	else { return b; }
}

ll MOD = 1000000007;
int main() {
	string X;
  	cin>>X;
  	ll x=0,y=0;
  	for(ll i=0; i<X.size(); i++){
      if(X[i]=='S')x++;
      else x--,y++;
    }
  cout<<X.size()-y*2<<endl;
  
  
}

Compiler output:
a.cc:17:1: error: 'll' does not name a type
   17 | ll dx[] = { 1,1,0,-1,-1,-1,0,1 };
      | ^~
a.cc:18:1: error: 'll' does not name a type
   18 | ll dy[] = { 0,1,1,1,0,-1,-1,-1 };
      | ^~
a.cc:19:1: error: 'll' does not name a type
   19 | ll prime(ll x) {
      | ^~
a.cc:29:1: error: 'll' does not name a type
   29 | ll gcd(ll a, ll b) {
      | ^~
a.cc:35:1: error: 'll' does not name a type
   35 | ll MOD = 1000000007;
      | ^~
a.cc: In function 'int main()':
a.cc:37:9: error: 'string' was not declared in this scope
   37 |         string X;
      |         ^~~~~~
a.cc:37:9: note: suggested alternatives:
In file included from /usr/include/c++/14/iosfwd:41,
                 from /usr/include/c++/14/ios:40,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:1:
/usr/include/c++/14/bits/stringfwd.h:77:33: note:   'std::string'
   77 |   typedef basic_string<char>    string;
      |                                 ^~~~~~
In file included from /usr/include/c++/14/bits/locale_classes.h:40,
                 from /usr/include/c++/14/bits/ios_base.h:41,
                 from /usr/include/c++/14/ios:44:
/usr/include/c++/14/string:76:11: note:   'std::pmr::string'
   76 |     using string    = basic_string<char>;
      |           ^~~~~~
a.cc:38:9: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
   38 |         cin>>X;
      |         ^~~
      |         std::cin
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:38:14: error: 'X' was not declared in this scope
   38 |         cin>>X;
      |              ^
a.cc:39:9: error: 'll' was not declared in this scope
   39 |         ll x=0,y=0;
      |         ^~
a.cc:40:15: error: expected ';' before 'i'
   40 |         for(ll i=0; i<X.size(); i++){
      |               ^~
      |               ;
a.cc:40:21: error: 'i' was not declared in this scope
   40 |         for(ll i=0; i<X.size(); i++){
      |                     ^
a.cc:41:20: error: 'x' was not declared in this scope
   41 |       if(X[i]=='S')x++;
      |                    ^
a.cc:42:12: error: 'x' was not declared in this scope
   42 |       else x--,y++;
      |            ^
a.cc:42:16: error: 'y' was not declared in this scope; did you mean 'yn'?
   42 |       else x--,y++;
      |                ^
      |                yn
a.cc:44:3: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   44 |   cout<<X.size()-y*2<<endl;
      |   ^~~~
      |   std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:44:18: error: 'y' was not declared in this scope; did you mean 'yn'?
   44 |   cout<<X.size()-y*2<<endl;
      |                  ^
      |                  yn
a.cc:44:23: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   44 |   cout<<X.size()-y*2<<endl;
      |                       ^~~~
      |                       std::endl
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~