criyle/codenet-compile-errors huggingface dataset:
Language: C++

#include <iostream>
using namespace std;
int main()
{
  string str ;
  getline(cin,str);
  int n= str.length ;
  if(str[0]=='R' && str[1] =='R' && str[2]=='R')
                                        cout<<3;
  if((str[0]=='R' && str[1] =='R' && str[2]!='R')||(str[0]!='R' && str[1] =='R' && str[2]=='R'))
                                        cout<<2;
 if(str[0]=='R' && str[1] !='R' && str[2]=='R')||(str[0]!='R' && str[1] !='R' && str[2]=='R')||(str[0]=='R' && str[1] !='R' && str[2]!='R')||(str[0]!='R' && str[1] =='R' && str[2]!='R')
                                       cout<<1;
         
}                                      
                                       
    
      


Compiler output:
a.cc: In function 'int main()':
a.cc:7:14: error: cannot convert 'std::__cxx11::basic_string<char>::length' from type 'std::__cxx11::basic_string<char>::size_type (std::__cxx11::basic_string<char>::)() const noexcept' {aka 'long unsigned int (std::__cxx11::basic_string<char>::)() const noexcept'} to type 'int'
    7 |   int n= str.length ;
      |              ^~~~~~
a.cc:12:48: error: expected primary-expression before '||' token
   12 |  if(str[0]=='R' && str[1] !='R' && str[2]=='R')||(str[0]!='R' && str[1] !='R' && str[2]=='R')||(str[0]=='R' && str[1] !='R' && str[2]!='R')||(str[0]!='R' && str[1] =='R' && str[2]!='R')
      |                                                ^~
Language: C++

#include <bits/stdc++.h>
using namespace std;

int main() {
  string str;
  cin >> str;

  if (str == "RRR") {
    cout << 3 << endl;
  }

  if (str == "RRS" || str == "SRR") {
    cout << 2 << endl;
  }

  if (str == "RSS" || str == "SRS" || str == "SSR") {
    cout << 1 << endl;
  }
  
  if (str == "SSS") {
    cout << 0 << endl;
  }

Compiler output:
a.cc: In function 'int main()':
a.cc:22:4: error: expected '}' at end of input
   22 |   }
      |    ^
a.cc:4:12: note: to match this '{'
    4 | int main() {
      |            ^
Language: C++

#include <bits/stdc++.h>
using namespace std;

int main() {
  string c;
  int S, a=0, b=0, i;
  cin >> S;
  cin >> c;
  
  for(int i=0; i<S; i++) {
    if(c[i] == 'S')a++;
  }
  if(a==0||b==S)cout << 0;
  else {
    for(int i=0; i<S; i++) {
      if(c[i] == 'R')b++;
    }
    cout << b
  }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:18:14: error: expected ';' before '}' token
   18 |     cout << b
      |              ^
      |              ;
   19 |   }
      |   ~
Language: C++

#include <bits/stdc++.h>
using namespace std;

int main() {
  string s;
  cin >> s;
  int c =0;
  if(s == "RRS" || s =="SRR") c=2;
  else if(s == "RRR") c=3;
  else if(s == "SSS") c=0;
  else c=1
  cout << c;
}



Compiler output:
a.cc: In function 'int main()':
a.cc:11:11: error: expected ';' before 'cout'
   11 |   else c=1
      |           ^
      |           ;
   12 |   cout << c;
      |   ~~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;

int main() {
  string str0;
  cin >> str0;};
 
int countR(string str0) {
 
for (int i = 0; i < 3; i++) {
  int k;
  if(str0[i]== "R" ){
  k = k+1; }
  cout << k << endl;};
 
};

 
if( countR(str0)==2 ){
 if(str0[1]== "R" ){
 cout << 2 << endl;}
 else{
 cout << 1 << endl;};
}
else{
 cout << countR(str0) << endl;};


Compiler output:
a.cc: In function 'int countR(std::string)':
a.cc:12:13: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   12 |   if(str0[i]== "R" ){
a.cc:16:1: warning: no return statement in function returning non-void [-Wreturn-type]
   16 | };
      | ^
a.cc: At global scope:
a.cc:19:1: error: expected unqualified-id before 'if'
   19 | if( countR(str0)==2 ){
      | ^~
a.cc:25:1: error: expected unqualified-id before 'else'
   25 | else{
      | ^~~~
Language: C++

#include <iostream>
using namespace std;
int main()
{
  string str ='';
  cin>>str ;
  int n= str.length ;
  if(str[0]=='R' && str[1] =='R' && str[2)=='R')
                                        cout<<3;
  if((str[0]=='R' && str[1] =='R' && str[2)!='R')||(str[0]!='R' && str[1] =='R' && str[2)=='R'))
                                        cout<<2;
 if(str[0]=='R' && str[1] !='R' && str[2)=='R')||(str[0]!='R' && str[1] !='R' && str[2)=='R')||(str[0]=='R' && str[1] !='R' && str[2)!='R')||(str[0]!='R' && str[1] =='R' && str[2)!='R')
                                       cout<<1;
         
}                                      
                                       
    
      

Compiler output:
a.cc:5:15: error: empty character constant
    5 |   string str ='';
      |               ^~
a.cc: In function 'int main()':
a.cc:5:15: error: conversion from 'char' to non-scalar type 'std::string' {aka 'std::__cxx11::basic_string<char>'} requested
a.cc:7:14: error: cannot convert 'std::__cxx11::basic_string<char>::length' from type 'std::__cxx11::basic_string<char>::size_type (std::__cxx11::basic_string<char>::)() const noexcept' {aka 'long unsigned int (std::__cxx11::basic_string<char>::)() const noexcept'} to type 'int'
    7 |   int n= str.length ;
      |              ^~~~~~
a.cc:8:42: error: expected ']' before ')' token
    8 |   if(str[0]=='R' && str[1] =='R' && str[2)=='R')
      |                                          ^
      |                                          ]
a.cc:8:43: error: expected primary-expression before '==' token
    8 |   if(str[0]=='R' && str[1] =='R' && str[2)=='R')
      |                                           ^~
a.cc:10:43: error: expected ']' before ')' token
   10 |   if((str[0]=='R' && str[1] =='R' && str[2)!='R')||(str[0]!='R' && str[1] =='R' && str[2)=='R'))
      |                                           ^
      |                                           ]
a.cc:10:50: error: expected primary-expression before '||' token
   10 |   if((str[0]=='R' && str[1] =='R' && str[2)!='R')||(str[0]!='R' && str[1] =='R' && str[2)=='R'))
      |                                                  ^~
a.cc:10:89: error: expected ']' before ')' token
   10 |   if((str[0]=='R' && str[1] =='R' && str[2)!='R')||(str[0]!='R' && str[1] =='R' && str[2)=='R'))
      |                                                                                         ^
      |                                                                                         ]
a.cc:12:41: error: expected ']' before ')' token
   12 |  if(str[0]=='R' && str[1] !='R' && str[2)=='R')||(str[0]!='R' && str[1] !='R' && str[2)=='R')||(str[0]=='R' && str[1] !='R' && str[2)!='R')||(str[0]!='R' && str[1] =='R' && str[2)!='R')
      |                                         ^
      |                                         ]
a.cc:12:42: error: expected primary-expression before '==' token
   12 |  if(str[0]=='R' && str[1] !='R' && str[2)=='R')||(str[0]!='R' && str[1] !='R' && str[2)=='R')||(str[0]=='R' && str[1] !='R' && str[2)!='R')||(str[0]!='R' && str[1] =='R' && str[2)!='R')
      |                                          ^~
Language: C++

#include <bits/stdc++.h>
using namespace std;

int main() {
  string s;
  cin >> s;
  
  if(s.at(0) == s.at(1) == s.at(2) == R){
    cout << 3 << endl;
  }
  else if(s.at(0) == s.at(1) == R || s.at(1) == s.at(2) == R){
    cout << 2 << endl;
  }
  else if(s.at(0) == R || s.at(1) == R || s.at(2) == R){
    cout << 1 << endl;
  }
  else{
    cout << 0 << endl;
  }
}
  
  


Compiler output:
a.cc: In function 'int main()':
a.cc:8:39: error: 'R' was not declared in this scope
    8 |   if(s.at(0) == s.at(1) == s.at(2) == R){
      |                                       ^
Language: C++

#pragma GCC optimize("Ofast")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
#pragma GCC optimize("unroll-loops")

#include<bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>

using namespace std;
using namespace __gnu_pbds;

#define DEBUG
#ifdef DEBUG
#define debug(...) __f(#__VA_ARGS__, __VA_ARGS__)
	template <typename Arg1>
	void __f(const char* name, Arg1&& arg1)
	{
		cerr << name << " = " << arg1 << endl;
	}
	template <typename Arg1, typename... Args>
	void __f(const char* names, Arg1&& arg1, Args&&... args)
	{
		const char* comma = strchr(names + 1, ','); cerr.write(names, comma - names) << " = " << arg1 << " || ";
		__f(comma+1, args...);
	}
#else
#define debug(...)
#endif

template <class Ch, class Tr, class Container>
basic_ostream <Ch, Tr> & operator << (basic_ostream <Ch, Tr> & os, Container const& x) {
    os << "{ ";
    for(auto& y : x) os << y << " ; ";
    return os << "}";
}

template <class X, class Y>
ostream & operator << (ostream & os, pair <X, Y> const& p) {
	return os << "[ " << p.first << ", " << p.second << "]" ;
}

#define FAST_IO std::ios::sync_with_stdio(false); cin.tie(0); cout.tie(0);
#define ll long long int
#define pb push_back
#define mp make_pair
#define ld long double
#define sz(a) (ll)(a).size()
#define endl "\n"

// priority_queue<ll, vector<ll>, less<ll>>pq;     // Max Heap
// priority_queue<ll, vector<ll>, greater<ll>>pq;  // Min Heap

typedef tree<ll,null_type,less<ll>,rb_tree_tag,tree_order_statistics_node_update> ordered_set;
//K-th smallest
//cout << k << "kth (1 based indexing) smallest: " << *A.find_by_order(k - 1) << endl;
//NO OF ELEMENTS < X
//cout << "No of elements less than " << X << " are " << A.order_of_key(X) << endl;

int main()
{
	FAST_IO;

 	string a;
 	cin >> a;
 	if(a == "RRR") cout << 3 << endl;
 	else if(a[0] == 'R' && a[1] == 'R') cout << 2 << endl;
 	else if(a[1] == 'R' && a[2] == 'R') cout << 2 << endl;
 	else
 	{
 		if(a == "SSS") cout << 0 << endl;
 		else cout << 1 << endl;
 	}   
    return 0;
}

Compiler output:
In file included from /usr/include/c++/14/string:43,
                 from /usr/include/c++/14/bitset:52,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:52,
                 from a.cc:5:
/usr/include/c++/14/bits/allocator.h: In destructor 'std::__cxx11::basic_string<char>::_Alloc_hider::~_Alloc_hider()':
/usr/include/c++/14/bits/allocator.h:182:7: error: inlining failed in call to 'always_inline' 'std::allocator< <template-parameter-1-1> >::~allocator() noexcept [with _Tp = char]': target specific option mismatch
  182 |       ~allocator() _GLIBCXX_NOTHROW { }
      |       ^
In file included from /usr/include/c++/14/string:54:
/usr/include/c++/14/bits/basic_string.h:186:14: note: called from here
  186 |       struct _Alloc_hider : allocator_type // TODO check __is_final
      |              ^~~~~~~~~~~~
Language: C++

#include<bits/stdc++.h> 
using namespace std;
int main(){
string s;cin>>s;
  int c=0;int maxi=0;
  for(int i=0;i<(int)s.size;++i){
if(s[i]=='S')c=0;
    else ++c;
    maxi=max(maxi,c);
  }
  maxi=max(maxi,c);
  cout<<maxi<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:24: error: invalid use of member function 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size() const [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = long unsigned int]' (did you forget the '()' ?)
    6 |   for(int i=0;i<(int)s.size;++i){
      |                      ~~^~~~
      |                            ()
Language: C++

#include<bits/stdc++.h>
using namespace std;

int main() {
string s;
int k=0;
cin >> s;
s+='$';
vectior<int> v;
for(int i =0;i<=(int)s.size();i++) {
if(s[i]=='R') k++;
else v.push_back(k), k=0;
}
sort(v.begin(),v.end());
cout << v[v.size()-1] << '\n';
return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:9:1: error: 'vectior' was not declared in this scope
    9 | vectior<int> v;
      | ^~~~~~~
a.cc:9:9: error: expected primary-expression before 'int'
    9 | vectior<int> v;
      |         ^~~
a.cc:12:6: error: 'v' was not declared in this scope
   12 | else v.push_back(k), k=0;
      |      ^
a.cc:14:6: error: 'v' was not declared in this scope
   14 | sort(v.begin(),v.end());
      |      ^
Language: C++

#include <bits/stdc++.h>
using namespace std;

int main() {
  string str0;
  cin >> str0;};
 
int countR(string str0) {
 
for (int i = 0; i < 3; i++) {
  int k;
  if(str0[i]== "R" ){
  k = k+1; }
  cout << k << endl;}
 
};

 
if( countR(str0)==2 ){
 if(str0[1]== "R" ){
 cout << 2 << endl;}
 else{
 cout << 1 << endl;}
}
else{
 cout << countR(str0) << endl;};


Compiler output:
a.cc: In function 'int countR(std::string)':
a.cc:12:13: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   12 |   if(str0[i]== "R" ){
a.cc:16:1: warning: no return statement in function returning non-void [-Wreturn-type]
   16 | };
      | ^
a.cc: At global scope:
a.cc:19:1: error: expected unqualified-id before 'if'
   19 | if( countR(str0)==2 ){
      | ^~
a.cc:25:1: error: expected unqualified-id before 'else'
   25 | else{
      | ^~~~
Language: C++

#include<iostream>
 
using namespace std;
char str[3];
int sum =0;
 
int main(){
 
  cin >> str;
 
  for(int i = 0; i<=1;i++){
    if(i==0&&str[i]=='R'){
    sum++;
    }
    
  if(str[i] == 'R'&&str[i+1] == 'R'){
    if(sum==0){
    	sum++;
    }
  	sum++;
  	}
  }
  if((i==3&&str[i]=='R')&&sum==0){
    sum++;
    }
  
  cout << sum << endl;
  
  return 0;
  }

Compiler output:
a.cc: In function 'int main()':
a.cc:23:7: error: 'i' was not declared in this scope
   23 |   if((i==3&&str[i]=='R')&&sum==0){
      |       ^
Language: C++

using namespace std;
int main(){
int ans=0;
for(int i =0;i<3;i++){
string S;
cin>>S;
int founnd =0;
for(int j =0;j<S.size();j++){
if (S[j]=='r'){
found=1;
)
ans+= found;
}
count<<ans<<end1;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:1: error: 'string' was not declared in this scope
    5 | string S;
      | ^~~~~~
a.cc:1:1: note: 'std::string' is defined in header '<string>'; this is probably fixable by adding '#include <string>'
  +++ |+#include <string>
    1 | using namespace std;
a.cc:6:1: error: 'cin' was not declared in this scope
    6 | cin>>S;
      | ^~~
a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
  +++ |+#include <iostream>
    1 | using namespace std;
a.cc:6:6: error: 'S' was not declared in this scope
    6 | cin>>S;
      |      ^
a.cc:10:1: error: 'found' was not declared in this scope; did you mean 'founnd'?
   10 | found=1;
      | ^~~~~
      | founnd
a.cc:11:1: error: expected primary-expression before ')' token
   11 | )
      | ^
a.cc:14:1: error: 'count' was not declared in this scope
   14 | count<<ans<<end1;
      | ^~~~~
a.cc:14:13: error: 'end1' was not declared in this scope
   14 | count<<ans<<end1;
      |             ^~~~
a.cc:15:2: error: expected '}' at end of input
   15 | }
      |  ^
a.cc:4:22: note: to match this '{'
    4 | for(int i =0;i<3;i++){
      |                      ^
a.cc:15:2: error: expected '}' at end of input
   15 | }
      |  ^
a.cc:2:11: note: to match this '{'
    2 | int main(){
      |           ^
Language: C++

using namespace std;
int main(){
int ans=0;
for(int i =0;i<3;i++){
string S;
cin>>S;
int founnd =0;
for(int j =0;j<S.size();j++){
if (S[j]=='R'){
found=1;
)
ans+= found;
}
count<<ans<<end1;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:1: error: 'string' was not declared in this scope
    5 | string S;
      | ^~~~~~
a.cc:1:1: note: 'std::string' is defined in header '<string>'; this is probably fixable by adding '#include <string>'
  +++ |+#include <string>
    1 | using namespace std;
a.cc:6:1: error: 'cin' was not declared in this scope
    6 | cin>>S;
      | ^~~
a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
  +++ |+#include <iostream>
    1 | using namespace std;
a.cc:6:6: error: 'S' was not declared in this scope
    6 | cin>>S;
      |      ^
a.cc:10:1: error: 'found' was not declared in this scope; did you mean 'founnd'?
   10 | found=1;
      | ^~~~~
      | founnd
a.cc:11:1: error: expected primary-expression before ')' token
   11 | )
      | ^
a.cc:14:1: error: 'count' was not declared in this scope
   14 | count<<ans<<end1;
      | ^~~~~
a.cc:14:13: error: 'end1' was not declared in this scope
   14 | count<<ans<<end1;
      |             ^~~~
a.cc:15:2: error: expected '}' at end of input
   15 | }
      |  ^
a.cc:4:22: note: to match this '{'
    4 | for(int i =0;i<3;i++){
      |                      ^
a.cc:15:2: error: expected '}' at end of input
   15 | }
      |  ^
a.cc:2:11: note: to match this '{'
    2 | int main(){
      |           ^
Language: C++

#include <bits/stdc++.h>
using namespace std;

int main() {
  string str = x;
  cin >> x;

  if (x == "RRR") {
    cout << 3 << endl;
  }

  if (x == "RRS" || x == "SRR") {
    cout << 2 << endl;
  }

  if (x == "RSS" || x == "SRS" || x == "SSR") {
    cout << 1 << endl;
  }
  
  if (x == "SSS") {
    cout << 0 << endl;
  }
  
  cout << "終了" << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:16: error: 'x' was not declared in this scope
    5 |   string str = x;
      |                ^
Language: C++


#include<iostream>
using namespace std;
int main()
{

int i;
while(t--){
    int cnt=0;
string s;
cin>>s;

int n=s.size();
for( i=0;i<n;i++){
    if(s[i]=='R'){
        cnt++;
    }

}
if(cnt==2){
    if( s[0]=='R' && s[2]=='R'){
        cout<<cnt/2<<endl;
    }
    else{
        cout<<cnt<<endl;
    }
}
else
cout<<cnt<<endl;

return 0;
}








Compiler output:
a.cc: In function 'int main()':
a.cc:8:7: error: 't' was not declared in this scope
    8 | while(t--){
      |       ^
a.cc:32:2: error: expected '}' at end of input
   32 | }
      |  ^
a.cc:5:1: note: to match this '{'
    5 | {
      | ^
Language: C++

using namespace std;
int main(){
  int ans=0;
for(int i =0;i<3;i++){
  string S;
  cin>>S;
  int founnd =0;
  
for(int j =0;j<S.size();j++){
  if (S[j]=='R'){
    found=1;
  }
  ans += found;
}
  count<<ans<<end1;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:3: error: 'string' was not declared in this scope
    5 |   string S;
      |   ^~~~~~
a.cc:1:1: note: 'std::string' is defined in header '<string>'; this is probably fixable by adding '#include <string>'
  +++ |+#include <string>
    1 | using namespace std;
a.cc:6:3: error: 'cin' was not declared in this scope
    6 |   cin>>S;
      |   ^~~
a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
  +++ |+#include <iostream>
    1 | using namespace std;
a.cc:6:8: error: 'S' was not declared in this scope
    6 |   cin>>S;
      |        ^
a.cc:11:5: error: 'found' was not declared in this scope; did you mean 'founnd'?
   11 |     found=1;
      |     ^~~~~
      |     founnd
a.cc:13:10: error: 'found' was not declared in this scope; did you mean 'founnd'?
   13 |   ans += found;
      |          ^~~~~
      |          founnd
a.cc:15:3: error: 'count' was not declared in this scope
   15 |   count<<ans<<end1;
      |   ^~~~~
a.cc:15:15: error: 'end1' was not declared in this scope
   15 |   count<<ans<<end1;
      |               ^~~~
a.cc:16:2: error: expected '}' at end of input
   16 | }
      |  ^
a.cc:2:11: note: to match this '{'
    2 | int main(){
      |           ^
Language: C++

#include <bits/stdc++.h>
using namespace std;

int main() {
  string str = x;
  cin >> x;

  if (x == "RRR") {
    cout << 3 << endl;
  }

  if (x == "RRS" || x == "SRR") {
    cout << 2 << endl;
  }

  if (x == "RSS" || x == "SRS" || x == "SSR") {
    cout << 1 << endl;
  }
  
  cout << "終了" << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:16: error: 'x' was not declared in this scope
    5 |   string str = x;
      |                ^
Language: C++

#include <bits/stdc++.h>
using namespace std;

int main() {
  string str0;
  cin >> str0;};
 
int countR(string str0) {
 
for (int i = 0; i < 3; i++) {
  int k;
  if(str0[i]=="R"){
  k = k+1 };
  cout << k << endl };
 
};

 
if( countR(str0)==2 ){
 if(str0[1]=="R"){
 cout << 2 << endl}
 else{
 cout << 1 << endl}
}
else{
 cout << countR(str0) << endl};


Compiler output:
a.cc: In function 'int countR(std::string)':
a.cc:12:13: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   12 |   if(str0[i]=="R"){
a.cc:13:10: error: expected ';' before '}' token
   13 |   k = k+1 };
      |          ^~
      |          ;
a.cc:14:20: error: expected ';' before '}' token
   14 |   cout << k << endl };
      |                    ^~
      |                    ;
a.cc:16:1: warning: no return statement in function returning non-void [-Wreturn-type]
   16 | };
      | ^
a.cc: At global scope:
a.cc:19:1: error: expected unqualified-id before 'if'
   19 | if( countR(str0)==2 ){
      | ^~
a.cc:25:1: error: expected unqualified-id before 'else'
   25 | else{
      | ^~~~
Language: C++

#include<iostream>
 
using namespace std;
char str[3];
int sum =0;
 
int main(){
 
  cin >> str;
  
  for(int i = 0; i<1;i++){
    #include<iostream>
 
using namespace std;
char str[3];
int sum =0;
 
int main(){
 
  cin >> str;
  
  for(int i = 0; i<1;i++){
    if(i==0&&str[i]=='R'){
    sum++;
    }
    
  if(str[i] == 'R'&&str[i+1] == 'R'){
    if(sum==0){
    	sum++;
    }
  	sum++;
  	}
  }
  
  cout << sum << endl;
  
  return 0;
}
  if(str[i] == 'R'&&str[i+1] == 'R'){
  	sum++;
  	}
  }
  
  cout << sum << endl;
  
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:18:9: warning: empty parentheses were disambiguated as a function declaration [-Wvexing-parse]
   18 | int main(){
      |         ^~
a.cc:18:9: note: remove parentheses to default-initialize a variable
   18 | int main(){
      |         ^~
      |         --
a.cc:18:9: note: or replace parentheses with braces to value-initialize a variable
a.cc:18:11: error: a function-definition is not allowed here before '{' token
   18 | int main(){
      |           ^
Language: Java

import java.util.Scanner;

public class Answer {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String s = sc.next();
        int max = 0;
        for (int i = 0; i < s.length(); i++) {
            if(s.charAt(i) == 'R'){
                int count = 0;
                for (; i < s.length() && s.charAt(i) == 'R'; i++,count++) ;
                if(max < count){
                    max = count;
                }
            }
        }
        System.out.println(max);
        sc.close();
    }
}

Compiler output:
Main.java:3: error: class Answer is public, should be declared in a file named Answer.java
public class Answer {
       ^
1 error
Language: C++

#include<iostream>
#include<stdio.h>
#include<string.h>
 
using namespace std;
 
int main()
{
  char str[3],ch='R';
  cin>>str;
  int cnt=0;
  for(int i=0;i<3;++i)
    if(strcmp(str[i],ch)==0)
      cnt+=1;
  if(cnt==2 && strcmp(str[2],ch)!=0)
    cout<<cnt-1;
  else
    cout<<cnt;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:20: error: invalid conversion from 'char' to 'const char*' [-fpermissive]
   13 |     if(strcmp(str[i],ch)==0)
      |               ~~~~~^
      |                    |
      |                    char
In file included from a.cc:3:
/usr/include/string.h:156:32: note:   initializing argument 1 of 'int strcmp(const char*, const char*)'
  156 | extern int strcmp (const char *__s1, const char *__s2)
      |                    ~~~~~~~~~~~~^~~~
a.cc:13:22: error: invalid conversion from 'char' to 'const char*' [-fpermissive]
   13 |     if(strcmp(str[i],ch)==0)
      |                      ^~
      |                      |
      |                      char
/usr/include/string.h:156:50: note:   initializing argument 2 of 'int strcmp(const char*, const char*)'
  156 | extern int strcmp (const char *__s1, const char *__s2)
      |                                      ~~~~~~~~~~~~^~~~
a.cc:15:28: error: invalid conversion from 'char' to 'const char*' [-fpermissive]
   15 |   if(cnt==2 && strcmp(str[2],ch)!=0)
      |                       ~~~~~^
      |                            |
      |                            char
/usr/include/string.h:156:32: note:   initializing argument 1 of 'int strcmp(const char*, const char*)'
  156 | extern int strcmp (const char *__s1, const char *__s2)
      |                    ~~~~~~~~~~~~^~~~
a.cc:15:30: error: invalid conversion from 'char' to 'const char*' [-fpermissive]
   15 |   if(cnt==2 && strcmp(str[2],ch)!=0)
      |                              ^~
      |                              |
      |                              char
/usr/include/string.h:156:50: note:   initializing argument 2 of 'int strcmp(const char*, const char*)'
  156 | extern int strcmp (const char *__s1, const char *__s2)
      |                                      ~~~~~~~~~~~~^~~~
Language: Java

import objectdraw.*;
import java.awt.*;

public class RainySeason extends WindowController{
    private String inputString;
    private String[] letters=new String[3];
    private int intToReturn=0;

    public int compute(String S){
        inputString=S;
        for (int count=0;count<3;count++){
            letters[count]=inputString.substring(count,count+1);
        }
        if (inputString.equals("RRR")){
            intToReturn=3;
        }
        else if(inputString.equals("SSS")){
            intToReturn=0;
        } 
        else if (letters[1].equals("S"))    {
            intToReturn=1;
        }
        else if (letters[0].equals("S")&&letters[2].equals("S")){
            intToReturn=1;
        }
        else{
            intToReturn=2;
        }
        return intToReturn;
    }
}

Compiler output:
Main.java:4: error: class RainySeason is public, should be declared in a file named RainySeason.java
public class RainySeason extends WindowController{
       ^
Main.java:4: error: cannot find symbol
public class RainySeason extends WindowController{
                                 ^
  symbol: class WindowController
Main.java:1: error: package objectdraw does not exist
import objectdraw.*;
^
3 errors
Language: C

string=input()
  count=0
  pop=0
  sum=0
  for i in range(0,3):
    if(string[i]=='R'):
      count=count+1
    if(string[i]=='S'||i==2):
	  pop=count
      count=0
    if(count>=2)
      sum=sum+pop
 print(sum)

Compiler output:
main.c:1:1: warning: data definition has no type or storage class
    1 | string=input()
      | ^~~~~~
main.c:1:1: error: type defaults to 'int' in declaration of 'string' [-Wimplicit-int]
main.c:1:8: error: implicit declaration of function 'input' [-Wimplicit-function-declaration]
    1 | string=input()
      |        ^~~~~
main.c:1:8: error: initializer element is not constant
main.c:2:3: error: expected ',' or ';' before 'count'
    2 |   count=0
      |   ^~~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;

int main() {
  string str = x;
  cin >> x;

  if (x == "RRR") {
    cout << 3 << endl;
  }

  if (x == "RRS" || x == "SRR") {
    cout << 2 << endl;
  }

  if (x == "RSS" || x == "SRS" || x == "SSR") {
    cout << 1 << endl;
  }


Compiler output:
a.cc: In function 'int main()':
a.cc:5:16: error: 'x' was not declared in this scope
    5 |   string str = x;
      |                ^
a.cc:18:4: error: expected '}' at end of input
   18 |   }
      |    ^
a.cc:4:12: note: to match this '{'
    4 | int main() {
      |            ^
Language: C++

#include <bits/stdc++.h>
using namespace std;

int main() {
  string str0;
  cin >> str0;};
 
int countR(string str0) {
 
for (int i = 0; i < 3; i++) {
  if(str0[i]=="R"){
    int k
  k = k+1 };
  cout << k << endl };
 
};

 
if( countR(str0)==2 ){
 if(str0[1]=="R"){
 cout << 2 << endl};
 else{
 cout << 1 << endl};
}
else{
 cout << countR(str0) << endl};


Compiler output:
a.cc: In function 'int countR(std::string)':
a.cc:11:13: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   11 |   if(str0[i]=="R"){
a.cc:13:3: error: expected initializer before 'k'
   13 |   k = k+1 };
      |   ^
a.cc:14:11: error: 'k' was not declared in this scope
   14 |   cout << k << endl };
      |           ^
a.cc:16:1: warning: no return statement in function returning non-void [-Wreturn-type]
   16 | };
      | ^
a.cc: At global scope:
a.cc:19:1: error: expected unqualified-id before 'if'
   19 | if( countR(str0)==2 ){
      | ^~
a.cc:25:1: error: expected unqualified-id before 'else'
   25 | else{
      | ^~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;

int main() {
  string S;
  cin >> S;
  
  if(S.at(0) == S.at(1) == S.at(2) == R){
    cout << 3 << endl;
  }
  else if(S.at(0) == S.at(1) == R || S.at(1) == S.at(2) == R){
    cout << 2 << endl;
  }
  else if(S.at(0) == R || S.at(1) == R || S.at(2) == R){
    cout << 1 << endl;
  }
  else{
    cout << 0 << endl;
  }
}
  
  


Compiler output:
a.cc: In function 'int main()':
a.cc:8:39: error: 'R' was not declared in this scope
    8 |   if(S.at(0) == S.at(1) == S.at(2) == R){
      |                                       ^
Language: C++

#include <bits/stdc++.h>
using namespace std;

int main() {
  string str0;
  cin >> str0;
 
int countR(string str0) {
 
for (int i = 0; i < 3; i++) {
  if(str0[i]=="R"){
    int k
  k = k+1 };
  cout << k << endl };
 
};

 
if( countR(str0)==2 ){
 if(str0[1]=="R"){
 cout << 2 << endl};
 else{
 cout << 1 << endl};
}
else{
 cout << countR(str0) << endl};};


Compiler output:
a.cc: In function 'int main()':
a.cc:8:25: error: a function-definition is not allowed here before '{' token
    8 | int countR(string str0) {
      |                         ^
a.cc:19:5: error: 'countR' was not declared in this scope
   19 | if( countR(str0)==2 ){
      |     ^~~~~~
a.cc:20:12: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   20 |  if(str0[1]=="R"){
a.cc:21:19: error: expected ';' before '}' token
   21 |  cout << 2 << endl};
      |                   ^
      |                   ;
a.cc:22:2: error: expected '}' before 'else'
   22 |  else{
      |  ^~~~
a.cc:19:22: note: to match this '{'
   19 | if( countR(str0)==2 ){
      |                      ^
a.cc:23:19: error: expected ';' before '}' token
   23 |  cout << 1 << endl};
      |                   ^
      |                   ;
a.cc: At global scope:
a.cc:25:1: error: expected unqualified-id before 'else'
   25 | else{
      | ^~~~
a.cc:26:32: error: expected declaration before '}' token
   26 |  cout << countR(str0) << endl};};
      |                                ^
Language: C++

#include <stdio.h>
#include <cstdio>
#include <iostream>
#include <vector>
#include <algorithm>

int str_chnum(const char str[], int c)
{
    int i;
    int count = 0;
    
    for (i = 0; str[i] != '\0'; i++)
        if (str[i] == c)
            count++;
    return (count);
}

int main(void)
{
    char str[256];
    char ch[10];
    int R;

    scanf("%s", str);

    if(char str[256]==RRR){
     printf("1");
   }
    
   else if (char str[256]==RRR){
      printf("%d\n", str_chnum(str, R));
    }
    
    return (0);
}

Compiler output:
a.cc: In function 'int main()':
a.cc:26:13: error: condition declares an array
   26 |     if(char str[256]==RRR){
      |             ^~~
a.cc:30:18: error: condition declares an array
   30 |    else if (char str[256]==RRR){
      |                  ^~~
Language: C

#include<stdio.h>

int main()
{
    char S[4];
    scanf("%s",S);
    int i,p=0;
    for(i=0;i<strlen(S);i++)
    {
    if(S[i]=='R')
    p++;
    if(S[i]=='S'&&c>0)
    break;
    }
    printf("%d",p);
    return 0;
}

Compiler output:
main.c: In function 'main':
main.c:8:15: error: implicit declaration of function 'strlen' [-Wimplicit-function-declaration]
    8 |     for(i=0;i<strlen(S);i++)
      |               ^~~~~~
main.c:2:1: note: include '<string.h>' or provide a declaration of 'strlen'
    1 | #include<stdio.h>
  +++ |+#include <string.h>
    2 | 
main.c:8:15: warning: incompatible implicit declaration of built-in function 'strlen' [-Wbuiltin-declaration-mismatch]
    8 |     for(i=0;i<strlen(S);i++)
      |               ^~~~~~
main.c:8:15: note: include '<string.h>' or provide a declaration of 'strlen'
main.c:12:19: error: 'c' undeclared (first use in this function)
   12 |     if(S[i]=='S'&&c>0)
      |                   ^
main.c:12:19: note: each undeclared identifier is reported only once for each function it appears in
Language: C++

#include <bits/stdc++.h>

using namespace std;

int main()
{
    char s[4];
    int count = 0;
    gets(s);

    for(int i=0; s[i]!='\0'; ++i)
    {
        if(s[i] == 'R')
        {
            count++;
        }

        else if(s[0] == 'S' && s[1] == 'R' && s[2] == 'R')
        {
            count = 0;
        }
        else if(s[0] == 'S' && s[1] == 'R' && s[2] == 'S')
        {
            count = 1;
        }
        else if(s[0] == 'S' && s[1] == 'S' && s[2] == 'R')
        {
            count = 0;
        }
        else
        {
            count = count;
            break;
        }
    }

    cout << count << endl;




}


Compiler output:
a.cc: In function 'int main()':
a.cc:9:5: error: 'gets' was not declared in this scope; did you mean 'getw'?
    9 |     gets(s);
      |     ^~~~
      |     getw
Language: C

#include<stdio.h>
#include<string.h>

int main()
{
    char s[5],r;
    int len,i,count;

    scanf("%s",s);
    {

    len = strlen(s);

    for(i=0,count=0;i<len;i++)
    {
        if(i==0)
        {
            if(s[i]=='R')
            {
            count++;
            }
            r = s[i];
        }

        else
        {
            if(s[i]=='R' && r=='R')
            {
            count++;
            }
            r = s[i];
        }
    }

    printf("%d",count);

    return 0;
}


Compiler output:
main.c: In function 'main':
main.c:38:1: error: expected declaration or statement at end of input
   38 | }
      | ^
Language: C

#stdio.h
void main (){
  char k;
  int i=0;
  scanf(%s, &k);
  if (k = "s"){
    i= i +1;
  }

Compiler output:
main.c:1:2: error: invalid preprocessing directive #stdio
    1 | #stdio.h
      |  ^~~~~
main.c: In function 'main':
main.c:5:3: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
    5 |   scanf(%s, &k);
      |   ^~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
  +++ |+#include <stdio.h>
    1 | #stdio.h
main.c:5:3: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
    5 |   scanf(%s, &k);
      |   ^~~~~
main.c:5:3: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:5:9: error: expected expression before '%' token
    5 |   scanf(%s, &k);
      |         ^
main.c:6:9: error: assignment to 'char' from 'char *' makes integer from pointer without a cast [-Wint-conversion]
    6 |   if (k = "s"){
      |         ^
main.c:8:3: error: expected declaration or statement at end of input
    8 |   }
      |   ^
Language: C++

//Author : Vipul Sharma

// LIBRARIES
#include <bits/stdc++.h>

// MACROS
#define ll long long int
#define ld long double
#define rep(i, a, b) for (ll i = a; i < b; i++)
#define rev(i,b,a) for(ll i=b-1;i>=a;i--)
#define eqrep(i,a,b) for(ll i=1;i<=b;i++)
#define itrep(at) for (auto it = at.begin(); it != at.end(); it++)
#define ld long double
#define pb push_back
#define w(t) while (t--)
#define booster                       \
    ios_base::sync_with_stdio(false); \
    cin.tie(NULL);
#define mod 1000000007
#define endl "\n"
# define INF 0x3f3f3f3f 
#define deb1(x) cout << #x << " : " << x << endl;
#define deb2(x, y) cout << #x << " : " << x << "\t" << #y << " : " << y << endl;
#define deb3(x, y, z) cout << #x << " : " << x << "\t" << #y << " : " << y << "\t" << #z << " : " << z << endl;
#define deb4(x, y, z, w) cout << #x << " : " << x << "\t" << #y << " : " << y << "\t" << #z << " : " << z << "\t" << #w << " : " << w << endl;
#define deb5(a, b, c, d, e) cout << #a << ": " << a << " | " << #b << ": " << b << " | " << #c << ": " << c << " | " << #d << ": " << d << " | " << #e << ": " << e << endl;
#define deb6(a, b, c, d, e, f) cout << #a << ": " << a << " | " << #b << ": " << b << " | " << #c << ": " << c << " | " << #d << ": " << d << " | " << #e << ": " << e << " | " << #f << ": " << f << endl;

using namespace std;
long long cost = 1e18;

void solve()
{
	string s;
	cin>>s;
	ll res=1;
	//if(s[i]=='R' and s[i+1]=='S') res=1;
	if(s[i]=='R' and s[i+1]=='R' and s[i+2]=='R') res=3;
	if(s[i]=='R' and s[i+1]=='R') res=2;
	if(s[i+1]=='R' and s[i+2]=='R') res=2;
	if(s[i]!='R' and s[i+1]!='R' and s[i+2]!='R') res=0;
	cout<<res<<endl;
}


int main()
{
    booster;
    solve();
    return 0;
}


Compiler output:
a.cc: In function 'void solve()':
a.cc:38:14: error: 'i' was not declared in this scope
   38 |         if(s[i]=='R' and s[i+1]=='R' and s[i+2]=='R') res=3;
      |              ^
a.cc:39:14: error: 'i' was not declared in this scope
   39 |         if(s[i]=='R' and s[i+1]=='R') res=2;
      |              ^
a.cc:40:14: error: 'i' was not declared in this scope
   40 |         if(s[i+1]=='R' and s[i+2]=='R') res=2;
      |              ^
a.cc:41:14: error: 'i' was not declared in this scope
   41 |         if(s[i]!='R' and s[i+1]!='R' and s[i+2]!='R') res=0;
      |              ^
Language: C++

#include<iostream>
using namespace std;
int main()
{
char s[3];
cin>>s;
int i,count=0;
for(i=0;i<3;i++)
{
    if(i<=1)
    {
    if(s[i]=='R' && (s[i+1]=='R')
        {
            count+=2;
        }
    else
    {
        if(s[i]=='R' && s[i+2]=='R')
    {
        count+=1;
    }
}
}
}
if(count<=3)
{
    cout<<count;
}
else
{
    cout<<(count-1);
}
}


Compiler output:
a.cc: In function 'int main()':
a.cc:12:34: error: expected ')' before '{' token
   12 |     if(s[i]=='R' && (s[i+1]=='R')
      |       ~                          ^
      |                                  )
   13 |         {
      |         ~                         
a.cc:23:1: error: expected primary-expression before '}' token
   23 | }
      | ^
Language: C++

#include <bits/stdc++.h>
using namespace std;


int countR(string str0) {
 
for (int i = 0; i < 3; i++) {
  if(str0[i]=="R"){
    int k
  k = k+1 };
  cout << k << endl };
 
};

int main() {
  string str0;
  cin >> str0;
 
 
if( countR(str0)==2 ){
 if(str0[1]=="R"){
 cout << 2 << endl};
 else{
 cout << 1 << endl};
}
else{
 cout << countR(str0) << endl};}


Compiler output:
a.cc: In function 'int countR(std::string)':
a.cc:8:13: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
    8 |   if(str0[i]=="R"){
a.cc:10:3: error: expected initializer before 'k'
   10 |   k = k+1 };
      |   ^
a.cc:11:11: error: 'k' was not declared in this scope
   11 |   cout << k << endl };
      |           ^
a.cc:13:1: warning: no return statement in function returning non-void [-Wreturn-type]
   13 | };
      | ^
a.cc: In function 'int main()':
a.cc:21:12: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   21 |  if(str0[1]=="R"){
a.cc:22:19: error: expected ';' before '}' token
   22 |  cout << 2 << endl};
      |                   ^
      |                   ;
a.cc:23:2: error: expected '}' before 'else'
   23 |  else{
      |  ^~~~
a.cc:20:22: note: to match this '{'
   20 | if( countR(str0)==2 ){
      |                      ^
a.cc:24:19: error: expected ';' before '}' token
   24 |  cout << 1 << endl};
      |                   ^
      |                   ;
a.cc: At global scope:
a.cc:26:1: error: expected unqualified-id before 'else'
   26 | else{
      | ^~~~
a.cc:27:32: error: expected declaration before '}' token
   27 |  cout << countR(str0) << endl};}
      |                                ^
Language: C++

#include <bits/stdc++.h>

using namespace std;

int main()
{
    char s[50];
    int count = 0;
    gets(s);

    for(int i=0; s[i]!='\0'; ++i)
    {
        if(s[i] == 'R')
        {
            count++;
        }

        else if(s[0] == 'S' && s[1] == 'R' && s[2] == 'R')
        {
            count = 0;
        }
        else if(s[0] == 'S' && s[1] == 'R' && s[2] == 'S')
        {
            count = 1;
        }
        else if(s[0] == 'S' && s[1] == 'S' && s[2] == 'R')
        {
            count = 0;
        }
        else
        {
            count = count;
            break;
        }
    }

    cout << count << endl;




}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:5: error: 'gets' was not declared in this scope; did you mean 'getw'?
    9 |     gets(s);
      |     ^~~~
      |     getw
Language: C++

#include <bits/stdc++.h>
using namespace std;

int main() {
  int L =0;
  bool w = 'S';
  vector<int>S;
  for(int i = 0 ;i < 3;i++)cin >> S[i];
  for(int x : S){
    if(w == x)L++;
    w = x;
  cout << L <<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:2: error: expected '}' at end of input
   13 | }
      |  ^
a.cc:4:12: note: to match this '{'
    4 | int main() {
      |            ^
Language: C++

#include <bits/stdc++.h>
using namespace std;


int countR(string str0) {
 
for (int i = 0; i < 3; i++) {
  if(str0[i]=="R"){
    int k
  k = k+1 }
  return k }
 
};

int main() {
  string str0;
  cin >> str0;
 
 
if( countR(str0)==2 ){
 if(str0[1]=="R"){
 cout << 2 << endl};
 else{
 cout << 1 << endl};
}
else{
 cout << countR(str0) << endl};}


Compiler output:
a.cc: In function 'int countR(std::string)':
a.cc:8:13: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
    8 |   if(str0[i]=="R"){
a.cc:10:3: error: expected initializer before 'k'
   10 |   k = k+1 }
      |   ^
a.cc:11:10: error: 'k' was not declared in this scope
   11 |   return k }
      |          ^
a.cc:11:11: error: expected ';' before '}' token
   11 |   return k }
      |           ^~
      |           ;
a.cc: In function 'int main()':
a.cc:21:12: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   21 |  if(str0[1]=="R"){
a.cc:22:19: error: expected ';' before '}' token
   22 |  cout << 2 << endl};
      |                   ^
      |                   ;
a.cc:23:2: error: expected '}' before 'else'
   23 |  else{
      |  ^~~~
a.cc:20:22: note: to match this '{'
   20 | if( countR(str0)==2 ){
      |                      ^
a.cc:24:19: error: expected ';' before '}' token
   24 |  cout << 1 << endl};
      |                   ^
      |                   ;
a.cc: At global scope:
a.cc:26:1: error: expected unqualified-id before 'else'
   26 | else{
      | ^~~~
a.cc:27:32: error: expected declaration before '}' token
   27 |  cout << countR(str0) << endl};}
      |                                ^
Language: C

#include <bits/stdc++.h>

using namespace std;

int main()
{
    char s[50];
    int count = 0;
    gets(s);

    for(int i=0; s[i]!='\0'; ++i)
    {
        if(s[i] == 'R')
        {
            count++;
        }

        else if(s[0] == 'S' && s[1] == 'R' && s[2] == 'R')
        {
            count = 0;
        }
        else if(s[0] == 'S' && s[1] == 'R' && s[2] == 'S')
        {
            count = 1;
        }
        else if(s[0] == 'S' && s[1] == 'S' && s[2] == 'R')
        {
            count = 0;
        }
        else
        {
            count = count;
            break;
        }
    }

    cout << count << endl;




}

Compiler output:
main.c:1:10: fatal error: bits/stdc++.h: No such file or directory
    1 | #include <bits/stdc++.h>
      |          ^~~~~~~~~~~~~~~
compilation terminated.
Language: C++

//Coded by Abhijay Mitra
#include <iostream>
#include <stdlib.h>
#include <algorithm>
#include <cstdio>
#include <numeric>
#include <cstring>
#include <numeric>
#include <vector>
#include <iterator> 
#include <map>
#include <set>
#include <climits>
#include <queue>
#include <cmath>
#include <stack>
#include <cctype>
#include <bitset>
// #include <bits/stdc++.h>
#define double long double
#define int long long int
#define ll int
#define ibs ios_base::sync_with_stdio(false)
#define cti cin.tie(0)
#define bp __builtin_popcount
#define pb emplace_back
#define koto_memory(a) cout<<(sizeof(a)/1048576.0)<<" MB";
#define res(v) sort(all(v)),v.erase(unique(all(v)), v.end());
#define timer cerr << "Time elapsed : " << 1.0 * clock() / CLOCKS_PER_SEC << " sec \n";
#define deb(x) cout<<"\n["<<#x<<" = "<<x<<"]\n";
using vi = std::vector<int>;
using vvi = std::vector<vi>;
using pii = std::pair<int,int>;
using vpii = std::vector<pii>;
using vvpii = std::vector<vpii>;
#define mp         make_pair
#define rep(i,a,b) for (int i = a; i <= b; i++)
#define per(i,b,a) for (int i = b; i >= a; i--)
#define all(x)     x.begin(), x.end()
using namespace std;
const int N=2e6+10;
const int inf = /*0x3f3f3f3f*/1e18+10;
// const ll M = 998244353 ; // Mulo
// const int M = 1e9+7 ; // Mulo
const double Pi = 3.14159265;
#define F first
#define S second
void solve(){
  string s;cin>>s;
  int len=3;
  if(s==)
  if(s[0]!='R' or s[1]!='R' or s[2]!='R')len=min(len,2LL);
  if(s[1]!='R')len=min(len,1LL);
  if(s[0]=='S' and s[2]=='S')len=min(len,1LL);
  if(s[0]=='S' and s[1]=='S' and s[2]=='S')len=0;
  cout<<len;
}
int32_t main()
{
  ibs;cti;
  solve();return 0;
  /*,cout<<"\n"*/;
  // cout<<"\n";
  int xx=0;
  int t;cin>>t;while(t--){/*xx++;cout<<"Case "<<xx<<":\n"*/;solve();cout<<"\n";}
  return 0;
}

Compiler output:
a.cc: In function 'void solve()':
a.cc:51:9: error: expected primary-expression before ')' token
   51 |   if(s==)
      |         ^
Language: C++

#include<bits/stdc++.h>
int main(){
  string s;
  int ans=0;
  cin >> s;
  for(int i=0;i<3;i++){
    if(s.at(i)='S')ans++;
    else ans=0;
  }
  cout << ans << endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:3:3: error: 'string' was not declared in this scope
    3 |   string s;
      |   ^~~~~~
a.cc:3:3: note: suggested alternatives:
In file included from /usr/include/c++/14/string:41,
                 from /usr/include/c++/14/bitset:52,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:52,
                 from a.cc:1:
/usr/include/c++/14/bits/stringfwd.h:77:33: note:   'std::string'
   77 |   typedef basic_string<char>    string;
      |                                 ^~~~~~
/usr/include/c++/14/string:76:11: note:   'std::pmr::string'
   76 |     using string    = basic_string<char>;
      |           ^~~~~~
a.cc:5:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    5 |   cin >> s;
      |   ^~~
      |   std::cin
In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:146:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:5:10: error: 's' was not declared in this scope
    5 |   cin >> s;
      |          ^
a.cc:10:3: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   10 |   cout << ans << 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:10:18: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   10 |   cout << ans << endl;
      |                  ^~~~
      |                  std::endl
In file included from /usr/include/c++/14/istream:41,
                 from /usr/include/c++/14/sstream:40,
                 from /usr/include/c++/14/complex:45,
                 from /usr/include/c++/14/ccomplex:39,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:127:
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
Language: C++

#include<stdc++/bits.h>
int main(){
  string s;
  int ans=0;
  cin >> s;
  for(int i=0;i<3;i++){
    if(s.at(i)='S')ans++;
    else ans=0;
  }
  cout << ans << endl;
  return 0;
}

Compiler output:
a.cc:1:9: fatal error: stdc++/bits.h: No such file or directory
    1 | #include<stdc++/bits.h>
      |         ^~~~~~~~~~~~~~~
compilation terminated.
Language: C++

#include<iostream>
#include<string>
using namespace std;
int main()
{
char s[100];
 int count=0,count1=0;
gets(s);
int n=strlen(s);
for(int i=0;i<n;i++)
{
 if(s[i]=='R')       
 count++; 
 if(s[i]=='R' && s[i]==s[i+1])
  count1++;  
    }
  if(count>0 && count1>0)
cout<<count<<endl;
 else if(count>0 && count1==0) 
   cout<<"1"<<endl;
    else
    cout<<"0"<<endl; 
return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:1: error: 'gets' was not declared in this scope; did you mean 'getw'?
    8 | gets(s);
      | ^~~~
      | getw
a.cc:9:7: error: 'strlen' was not declared in this scope
    9 | int n=strlen(s);
      |       ^~~~~~
a.cc:2:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    1 | #include<iostream>
  +++ |+#include <cstring>
    2 | #include<string>