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: In function 'int main()':
a.cc:11:28: error: no match for 'operator&&' (operand types are 'bool' and 'std::string' {aka 'std::__cxx11::basic_string<char>'})
   11 |     if(s[0]=="R"&&s[1]=="R"&&s[2]="R"){
      |        ~~~~~~~~~~~~~~~~~~~~^~~~~~
      |                 |               |
      |                 bool            std::string {aka std::__cxx11::basic_string<char>}
a.cc:11:28: note: candidate: 'operator&&(bool, bool)' (built-in)
   11 |     if(s[0]=="R"&&s[1]=="R"&&s[2]="R"){
      |        ~~~~~~~~~~~~~~~~~~~~^~~~~~
a.cc:11:28: note:   no known conversion for argument 2 from 'std::string' {aka 'std::__cxx11::basic_string<char>'} to 'bool'
a.cc:13:29: error: no match for 'operator&&' (operand types are 'bool' and 'std::string' {aka 'std::__cxx11::basic_string<char>'})
   13 |     }if(s[0]=="R"&&s[1]=="R"&&s[2]="S"){
      |         ~~~~~~~~~~~~~~~~~~~~^~~~~~
      |                  |               |
      |                  bool            std::string {aka std::__cxx11::basic_string<char>}
a.cc:13:29: note: candidate: 'operator&&(bool, bool)' (built-in)
   13 |     }if(s[0]=="R"&&s[1]=="R"&&s[2]="S"){
      |         ~~~~~~~~~~~~~~~~~~~~^~~~~~
a.cc:13:29: note:   no known conversion for argument 2 from 'std::string' {aka 'std::__cxx11::basic_string<char>'} to 'bool'
a.cc:17:29: error: no match for 'operator&&' (operand types are 'bool' and 'std::string' {aka 'std::__cxx11::basic_string<char>'})
   17 |     }if(s[0]=="S"&&s[1]=="R"&&s[2]="S"){
      |         ~~~~~~~~~~~~~~~~~~~~^~~~~~
      |                  |               |
      |                  bool            std::string {aka std::__cxx11::basic_string<char>}
a.cc:17:29: note: candidate: 'operator&&(bool, bool)' (built-in)
   17 |     }if(s[0]=="S"&&s[1]=="R"&&s[2]="S"){
      |         ~~~~~~~~~~~~~~~~~~~~^~~~~~
a.cc:17:29: note:   no known conversion for argument 2 from 'std::string' {aka 'std::__cxx11::basic_string<char>'} to 'bool'
a.cc:19:29: error: no match for 'operator&&' (operand types are 'bool' and 'std::string' {aka 'std::__cxx11::basic_string<char>'})
   19 |     }if(s[0]=="S"&&s[1]=="R"&&s[2]="R"){
      |         ~~~~~~~~~~~~~~~~~~~~^~~~~~
      |                  |               |
      |                  bool            std::string {aka std::__cxx11::basic_string<char>}
a.cc:19:29: note: candidate: 'operator&&(bool, bool)' (built-in)
   19 |     }if(s[0]=="S"&&s[1]=="R"&&s[2]="R"){
      |         ~~~~~~~~~~~~~~~~~~~~^~~~~~
a.cc:19:29: note:   no known conversion for argument 2 from 'std::string' {aka 'std::__cxx11::basic_string<char>'} to 'bool'
a.cc:22:28: error: no match for 'operator&&' (operand types are 'bool' and 'std::string' {aka 'std::__cxx11::basic_string<char>'})
   22 |     if(s[0]=="S"&&s[1]=="S"&&s[2]="R"){
      |        ~~~~~~~~~~~~~~~~~~~~^~~~~~
      |                 |               |
      |                 bool            std::string {aka std::__cxx11::basic_string<char>}
a.cc:22:28: note: candidate: 'operator&&(bool, bool)' (built-in)
   22 |     if(s[0]=="S"&&s[1]=="S"&&s[2]="R"){
      |        ~~~~~~~~~~~~~~~~~~~~^~~~~~
a.cc:22:28: note:   no known conversion for argument 2 from 'std::string' {aka 'std::__cxx11::basic_string<char>'} to 'bool'
a.cc:24:29: error: no match for 'operator&&' (operand types are 'bool' and 'std::string' {aka 'std::__cxx11::basic_string<char>'})
   24 |     }if(s[0]=="S"&&s[1]=="S"&&s[2]="S"){
      |         ~~~~~~~~~~~~~~~~~~~~^~~~~~
      |                  |               |
      |                  bool            std::string {aka std::__cxx11::basic_string<char>}
a.cc:24:29: note: candidate: 'operator&&(bool, bool)' (built-in)
   24 |     }if(s[0]=="S"&&s[1]=="S"&&s[2]="S"){
      |         ~~~~~~~~~~~~~~~~~~~~^~~~~~
a.cc:24:29: note:   no known conversion for argument 2 from 'std::string' {aka 'std::__cxx11::basic_string<char>'} to 'bool'