Language: C++

#include<iostream>
#include<string.h>
using namespace std
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:3:20: error: expected ';' before 'int'
    3 | using namespace std
      |                    ^
      |                    ;
    4 | int main(){
      | ~~~                 
a.cc: In function 'int main()':
a.cc:10:28: error: no match for 'operator&&' (operand types are 'bool' and 'std::string' {aka 'std::__cxx11::basic_string<char>'})
   10 |     if(s[0]=="R"&&s[1]=="R"&&s[2]="R"){
      |        ~~~~~~~~~~~~~~~~~~~~^~~~~~
      |                 |               |
      |                 bool            std::string {aka std::__cxx11::basic_string<char>}
a.cc:10:28: note: candidate: 'operator&&(bool, bool)' (built-in)
   10 |     if(s[0]=="R"&&s[1]=="R"&&s[2]="R"){
      |        ~~~~~~~~~~~~~~~~~~~~^~~~~~
a.cc:10:28: note:   no known conversion for argument 2 from 'std::string' {aka 'std::__cxx11::basic_string<char>'} to 'bool'
a.cc:12:29: error: no match for 'operator&&' (operand types are 'bool' and 'std::string' {aka 'std::__cxx11::basic_string<char>'})
   12 |     }if(s[0]=="R"&&s[1]=="R"&&s[2]="S"){
      |         ~~~~~~~~~~~~~~~~~~~~^~~~~~
      |                  |               |
      |                  bool            std::string {aka std::__cxx11::basic_string<char>}
a.cc:12:29: note: candidate: 'operator&&(bool, bool)' (built-in)
   12 |     }if(s[0]=="R"&&s[1]=="R"&&s[2]="S"){
      |         ~~~~~~~~~~~~~~~~~~~~^~~~~~
a.cc:12:29: note:   no known conversion for argument 2 from 'std::string' {aka 'std::__cxx11::basic_string<char>'} to 'bool'
a.cc:16:29: error: no match for 'operator&&' (operand types are 'bool' and 'std::string' {aka 'std::__cxx11::basic_string<char>'})
   16 |     }if(s[0]=="S"&&s[1]=="R"&&s[2]="S"){
      |         ~~~~~~~~~~~~~~~~~~~~^~~~~~
      |                  |               |
      |                  bool            std::string {aka std::__cxx11::basic_string<char>}
a.cc:16:29: note: candidate: 'operator&&(bool, bool)' (built-in)
   16 |     }if(s[0]=="S"&&s[1]=="R"&&s[2]="S"){
      |         ~~~~~~~~~~~~~~~~~~~~^~~~~~
a.cc:16:29: note:   no known conversion for argument 2 from 'std::string' {aka 'std::__cxx11::basic_string<char>'} to 'bool'
a.cc:18:29: error: no match for 'operator&&' (operand types are 'bool' and 'std::string' {aka 'std::__cxx11::basic_string<char>'})
   18 |     }if(s[0]=="S"&&s[1]=="R"&&s[2]="R"){
      |         ~~~~~~~~~~~~~~~~~~~~^~~~~~
      |                  |               |
      |                  bool            std::string {aka std::__cxx11::basic_string<char>}
a.cc:18:29: note: candidate: 'operator&&(bool, bool)' (built-in)
   18 |     }if(s[0]=="S"&&s[1]=="R"&&s[2]="R"){
      |         ~~~~~~~~~~~~~~~~~~~~^~~~~~
a.cc:18:29: note:   no known conversion for argument 2 from 'std::string' {aka 'std::__cxx11::basic_string<char>'} to 'bool'
a.cc:21:28: error: no match for 'operator&&' (operand types are 'bool' and 'std::string' {aka 'std::__cxx11::basic_string<char>'})
   21 |     if(s[0]=="S"&&s[1]=="S"&&s[2]="R"){
      |        ~~~~~~~~~~~~~~~~~~~~^~~~~~
      |                 |               |
      |                 bool            std::string {aka std::__cxx11::basic_string<char>}
a.cc:21:28: note: candidate: 'operator&&(bool, bool)' (built-in)
   21 |     if(s[0]=="S"&&s[1]=="S"&&s[2]="R"){
      |        ~~~~~~~~~~~~~~~~~~~~^~~~~~
a.cc:21:28: note:   no known conversion for argument 2 from 'std::string' {aka 'std::__cxx11::basic_string<char>'} to 'bool'
a.cc:23:29: error: no match for 'operator&&' (operand types are 'bool' and 'std::string' {aka 'std::__cxx11::basic_string<char>'})
   23 |     }if(s[0]=="S"&&s[1]=="S"&&s[2]="S"){
      |         ~~~~~~~~~~~~~~~~~~~~^~~~~~
      |                  |               |
      |                  bool            std::string {aka std::__cxx11::basic_string<char>}
a.cc:23:29: note: candidate: 'operator&&(bool, bool)' (built-in)
   23 |     }if(s[0]=="S"&&s[1]=="S"&&s[2]="S"){
      |         ~~~~~~~~~~~~~~~~~~~~^~~~~~
a.cc:23:29: note:   no known conversion for argument 2 from 'std::string' {aka 'std::__cxx11::basic_string<char>'} to 'bool'