Language: C++

#include<iostream>
#include<string.h>

int main(){
  string s[3]; 
  int count =0;
  for(int i=0;i<3;i++){
  cin >> s[i];
  }
    if(s[0]=="R"&&s[1]=="R"&&s[2]="R"){
      count=3;
    }if(s[0]=="R"&&s[1]=="R"&&s[2]="S"){
      count=2;
    }if(s[0]=="R"&&s[1]=="S"){
      count =1;
    }if(s[0]=="S"&&s[1]=="R"&&s[2]="S"){
      count = 1;
    }if(s[0]=="S"&&s[1]=="R"&&s[2]="R"){
      count =2;
    }
    if(s[0]=="S"&&s[1]=="S"&&s[2]="R"){
      count =1;
    }if(s[0]=="S"&&s[1]=="S"&&s[2]="S"){
      count =0;
    }
    cout << count <<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:3: error: 'string' was not declared in this scope
    5 |   string s[3];
      |   ^~~~~~
a.cc:5:3: 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:8:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    8 |   cin >> s[i];
      |   ^~~
      |   std::cin
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:8:10: error: 's' was not declared in this scope
    8 |   cin >> s[i];
      |          ^
a.cc:10:8: error: 's' was not declared in this scope
   10 |     if(s[0]=="R"&&s[1]=="R"&&s[2]="R"){
      |        ^
a.cc:12:9: error: 's' was not declared in this scope
   12 |     }if(s[0]=="R"&&s[1]=="R"&&s[2]="S"){
      |         ^
a.cc:14:9: error: 's' was not declared in this scope
   14 |     }if(s[0]=="R"&&s[1]=="S"){
      |         ^
a.cc:16:9: error: 's' was not declared in this scope
   16 |     }if(s[0]=="S"&&s[1]=="R"&&s[2]="S"){
      |         ^
a.cc:18:9: error: 's' was not declared in this scope
   18 |     }if(s[0]=="S"&&s[1]=="R"&&s[2]="R"){
      |         ^
a.cc:21:8: error: 's' was not declared in this scope
   21 |     if(s[0]=="S"&&s[1]=="S"&&s[2]="R"){
      |        ^
a.cc:23:9: error: 's' was not declared in this scope
   23 |     }if(s[0]=="S"&&s[1]=="S"&&s[2]="S"){
      |         ^
a.cc:26:5: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   26 |     cout << count <<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:26:21: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   26 |     cout << count <<endl;
      |                     ^~~~
      |                     std::endl
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~