Language: C++

#include<iostream>
#include<bits/stdc++.h>
int main(){
	string s;
	getline(cin,s);
	vector<int>count;
	int c=0;;
	for(int i=0;i<3;i++){
		if(s[i]=='R'){
			c++;
		}
		else{
			count.push_back(c);
			c=0;
		}
	}
	sort(count.begin(),count.end(),greater<int>());
	cout<<count[0];
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:4:9: error: 'string' was not declared in this scope
    4 |         string s;
      |         ^~~~~~
a.cc:4: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:5:17: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    5 |         getline(cin,s);
      |                 ^~~
      |                 std::cin
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:5:21: error: 's' was not declared in this scope
    5 |         getline(cin,s);
      |                     ^
a.cc:6:9: error: 'vector' was not declared in this scope
    6 |         vector<int>count;
      |         ^~~~~~
a.cc:6:9: note: suggested alternatives:
In file included from /usr/include/c++/14/vector:66,
                 from /usr/include/c++/14/functional:64,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:53,
                 from a.cc:2:
/usr/include/c++/14/bits/stl_vector.h:428:11: note:   'std::vector'
  428 |     class vector : protected _Vector_base<_Tp, _Alloc>
      |           ^~~~~~
/usr/include/c++/14/vector:93:13: note:   'std::pmr::vector'
   93 |       using vector = std::vector<_Tp, polymorphic_allocator<_Tp>>;
      |             ^~~~~~
a.cc:6:16: error: expected primary-expression before 'int'
    6 |         vector<int>count;
      |                ^~~
a.cc:13:25: error: 'count' was not declared in this scope; did you mean 'std::count'?
   13 |                         count.push_back(c);
      |                         ^~~~~
      |                         std::count
In file included from /usr/include/c++/14/algorithm:86,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51:
/usr/include/c++/14/pstl/glue_algorithm_defs.h:101:1: note: 'std::count' declared here
  101 | count(_ExecutionPolicy&& __exec, _ForwardIterator __first, _ForwardIterator __last, const _Tp& __value);
      | ^~~~~
a.cc:17:14: error: 'count' was not declared in this scope; did you mean 'std::count'?
   17 |         sort(count.begin(),count.end(),greater<int>());
      |              ^~~~~
      |              std::count
/usr/include/c++/14/pstl/glue_algorithm_defs.h:101:1: note: 'std::count' declared here
  101 | count(_ExecutionPolicy&& __exec, _ForwardIterator __first, _ForwardIterator __last, const _Tp& __value);
      | ^~~~~
a.cc:17:40: error: 'greater' was not declared in this scope; did you mean 'std::greater'?
   17 |         sort(count.begin(),count.end(),greater<int>());
      |                                        ^~~~~~~
      |                                        std::greater
In file included from /usr/include/c++/14/string:49:
/usr/include/c++/14/bits/stl_function.h:353:12: note: 'std::greater' declared here
  353 |     struct greater;
      |            ^~~~~~~
a.cc:17:48: error: expected primary-expression before 'int'
   17 |         sort(count.begin(),count.end(),greater<int>());
      |                                                ^~~
a.cc:17:9: error: 'sort' was not declared in this scope; did you mean 'std::sort'?
   17 |         sort(count.begin(),count.end(),greater<int>());
      |         ^~~~
      |         std::sort
/usr/include/c++/14/pstl/glue_algorithm_defs.h:296:1: note: 'std::sort' declared here
  296 | sort(_ExecutionPolicy&& __exec, _RandomAccessIterator __first, _RandomAccessIterator __last);
      | ^~~~
a.cc:18:9: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   18 |         cout<<count[0];
      |         ^~~~
      |         std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~