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

#include <bits/stdc++.h>
#include <cmath>
using namespace std;
#define _GLIBCXX_DEBUG
#define ll long long
#define rep(i,n) for (ll i = 0; i < n; i++)
#define vl vector<ll>
#define vpl vector<pair<ll,ll>>
#define vvl vector<vector<ll>> //a(縦行,vector<ll>(横列));
#include<algorithm>//__gcd(a,b)
#include <iostream>
#include <vector>
#include <cstdlib>
template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return true; } return false; }
template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return true; } return false; }

const long long INF = 1LL << 60;

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

    if(S=="SSS")cout<<0<<endl;
    if(S=="RRS")cout<<2<<endl;
    if(S=="RSR")cout<<1<<endl;
    if(S=="SRR")cout<<2<<endl;
    if(S=="SSR")cout<<1<<endl;
    if(S=="RRR")cout<<3<<endl;
if(S=="SRS")cout<<1<<endl;
if(S=="RSS")cout<<1<<endl;


Compiler output:
a.cc: In function 'int main()':
a.cc:29:27: error: expected '}' at end of input
   29 | if(S=="RSS")cout<<1<<endl;
      |                           ^
a.cc:19:11: note: to match this '{'
   19 | int main(){
      |           ^
Language: C++

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

int main(){
    string s;
    cin >> s;
    int ans = 0;
    int tmp = 0;
    for (int i = 0; i < 3; i++)
    {
        if (S.at(i)=='R')
        {
            tmp++;
        }
        else
        {
            tmp = 0;
        }
        ans = max(tmp,ans);
    }
    
    

    cout << ans << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:11:13: error: 'S' was not declared in this scope
   11 |         if (S.at(i)=='R')
      |             ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main()
{
	string x;
	cin>>x;
	int count=0,maxi=0;
	for(i=0;i<3;i++)
	{
		if(x[i]=='R')
		count+=1;
		else
		{
			maxi=max(maxi,count);
			count=0;
		}
	}
	cout<<maxi;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:13: error: 'i' was not declared in this scope
    8 |         for(i=0;i<3;i++)
      |             ^
Language: C

#include <bits/stdc++.h>
#define rep(i,n) for(int i = 0; i < (n); ++i)
using namespace std;
using ll = long long;
using P = pair<int, int>;

int main()
{
	string S;
	cin >> S;
	char str[2] = {'S','R'};
	if (S.at(1) == str[0] )
	{
		if (count(S.begin(), S.end(), str[1]) == 0)
		{
			cout << 0 << endl;
		}
		else {
			cout << 1 << endl;
		}

		return 0;
	}

	auto i = count(S.begin(), S.end(), str[1]);

	cout << i << endl;

	return 0;

}

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

import java.util.Scanner;
public class main {
     public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        String S = sc.next();
        int ans = 0;
        int max = 0;
    
        for(int i = 0;i < S.length(); i++){        
        if(S.charAt(i)=='R'){
            ans++;
            if(ans > max){
                max = ans;
            }
        }else{
            ans = 0;
        }
        }
        System.out.println(max);
    }    
}


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

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  string S;
  cin >> S;
  if (S == "RRR") {
    cout << 3 << endl;
  }
  else if (S == "RRS" || S == "SRR"){
    cout << 2 << endl;
  }
  else if (S == "RSS" || S == "SRS" || S == "SSR" || S == "RSR" ||) {
    cout << 1 << endl;
  }
  else {
    cout << 0 << endl;
  }
    
    
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:67: error: expected primary-expression before ')' token
   13 |   else if (S == "RSS" || S == "SRS" || S == "SSR" || S == "RSR" ||) {
      |                                                                   ^
Language: C++

s = input()
if s[0] == "R":
    if s[1] == "R":
        if s[2] == "R":
            print(3)
        else:
            print(2)
    else:
        print(1)
else:
    if s[1] == "R":
        if s[2] == "R":
            print(2)
        else:
            print(1)
    else:
        if s[2] == "R":
            print(1)
        else:
            print(0)

Compiler output:
a.cc:1:1: error: 's' does not name a type
    1 | s = input()
      | ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
#define ll long long int
#define vll vector<ll>
#define fast  ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);

ll solve(string s)
{
     ll n=s.size();
     if(s[0]=='R' && s[1]=='R' && s[2]=='R')
        return 3;
     else if((s[0]=='R' && s[1]=='R')||(s[1]=='R' && s[2]=='R'))
        return 2;
     else if(s[0]=='R' || s[1]=='R' || s[2]=='R')
        return 1;
    else return 0;
}
int main()
{
    ll t=1;
    string s;
    while(t--)
    {
        cin>>s;
        cout<<solve(s)<,endl;
    }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:25:24: error: expected primary-expression before ',' token
   25 |         cout<<solve(s)<,endl;
      |                        ^
Language: C++

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

#define ll long long int
#define pi 3.141592653589793238
#define fast ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0)
#define mod 1000000007

int main(){
	fast;
	string s;
	cin>>s;
	if(s[0]=='R' and s[1]=='R' and s[2]=='R')
		cout<<3;
	else if(s[0]=='R' and s[1]!='R' )
		cout<<1;
	else if(s[0]!='R' and s[1]=='R' and s[2]!='R')
		cout<<1;
	else if(s[2]=='R' and s[1]!='R' and s[0]!='R')
		cout<<1;
	else if
	else if(s[0]!='R' and s[1]==s[0] and s[2]==s[0])
		cout<<0;
	else 
		cout<<2;
	return 0;
}



Compiler output:
a.cc: In function 'int main()':
a.cc:22:9: error: expected '(' before 'else'
   22 |         else if(s[0]!='R' and s[1]==s[0] and s[2]==s[0])
      |         ^~~~
      |         (
a.cc:24:9: error: 'else' without a previous 'if'
   24 |         else
      |         ^~~~
Language: Java

import java.util.*;

class Main {
    public static void main (String[] args) {
        Scanner sc = new Scanner(System.in);
        String S = sc.next();
        int c = 0;

        if (S.equals("RRR")) {
            c = 3;
        } else if (S.equals("RRS") || S.equals("SRR")) {
            c = 3;
        } else if (S.equals("SSS")) {
            c = 0;
        } else (c = 1;)

        System.out.println(c);
    }
}

Compiler output:
Main.java:15: error: ')' expected
        } else (c = 1;)
                     ^
Main.java:15: error: not a statement
        } else (c = 1;)
               ^
Main.java:15: error: illegal start of expression
        } else (c = 1;)
                      ^
3 errors
Language: C++

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

int main() {
  str S;
  cin >> S;
  if (S == "RSR") cout << 1 << endl ;
  else {
    int count = 0;
    for (int i=0 ; i < 3 ; i++ ) {
      if (S[i]=='R') count++;
    }
    cout << count << endl;
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:3: error: 'str' was not declared in this scope; did you mean 'std'?
    5 |   str S;
      |   ^~~
      |   std
a.cc:6:10: error: 'S' was not declared in this scope
    6 |   cin >> S;
      |          ^
Language: C++

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

int main() {
  string s;
  cin >> s;
  int ans;
  if (s=="SSS") ans=0;
  else if (s=="SSR" || s=="SRS" || s=="RSS" || s=="RSR") ans=1;
  else if (s=="RRS" || s=="SRR") ans=2;
  else if (s=="RRR") ans=3
  cout << ans;
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:12:27: error: expected ';' before 'cout'
   12 |   else if (s=="RRR") ans=3
      |                           ^
      |                           ;
   13 |   cout << ans;
      |   ~~~~
Language: Java

import java.util.*;
import java.io.*;
public class Main extends PrintWriter {
    Main()
    {
        super(System.out);
    }
    public static void main(String args[]) {
      Main o=new Main();
      o.main();
      o.flush();
      o.close();
    }
    void main()
    {
        Scanner sc=new Scanner(System.in);
        String str=sc.next();
        int c=0;
        for(i=0;i<3;i++)
        {
            ch=str.charAt(i);
            if(str.charAt(0)=='R' && str.charAt(1)=='R' && str.charAt(2)=='R')
            println(3);    
            else if((str.charAt(0)=='R' && str.charAt(1)=='R') || (str.charAt(1)=='R' && str.charAt(2)=='R'))
            println(2);
            else if(str.indexOf('R')>=0)
            println(1);
            else
            println(0);
        }
        sc.close();
    }
}

Compiler output:
Main.java:19: error: cannot find symbol
        for(i=0;i<3;i++)
            ^
  symbol:   variable i
  location: class Main
Main.java:19: error: cannot find symbol
        for(i=0;i<3;i++)
                ^
  symbol:   variable i
  location: class Main
Main.java:19: error: cannot find symbol
        for(i=0;i<3;i++)
                    ^
  symbol:   variable i
  location: class Main
Main.java:21: error: cannot find symbol
            ch=str.charAt(i);
            ^
  symbol:   variable ch
  location: class Main
Main.java:21: error: cannot find symbol
            ch=str.charAt(i);
                          ^
  symbol:   variable i
  location: class Main
5 errors
Language: C++

/*************************************************\
           In the name of almighty ALLAH
                 MD.Faysal Hasan
                Comilla Univesity
\*************************************************/

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

#define     ikarus_101  ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);

typedef     long long             ll;
typedef     long double           ld;
typedef     unsigned long long    ull;
typedef     vector<ll>            vll;
typedef     pair<ll,ll>           pll;
typedef     vector<pll>           vpl;
typedef     map<ll,ll>            mll;
typedef     multiset<ll>          msl;
typedef     multimap<ll,ll>       Mll;
using pqboro=priority_queue<ll,vll,less<ll>>;
using pqchoto=priority_queue<ll,vll,greater<ll>>;

#define    all(str)       str.begin(),str.end()
#define    sajo(str)      sort(str.begin(),str.end())
#define    rev(str)       reverse(str.begin(),str.end())
#define    usajo(str)     sort(str.rbegin(),str.rend())
#define    vin(a)         for(auto &it : a) cin>>it
#define    vout(a)        for(auto it:a) cout<<it<<' ';cout<<nn
#define    pb             push_back
#define    eb             emplace_back
#define    mkp(x,y)       make_pair(x,y)
#define    F              first
#define    S              second
#define    yes            cout<<"YES"<<nn
#define    no             cout<<"NO"<<nn
#define    nn             "\n" ///endl
#define    rep(i,n)       for (i=0;i<n;++i )
#define    rep1(i,n)      for (i=1;i<=n;++i )

#define    min3(a,b,c)    min(a,min(b,c))
#define    max3(a,b,c)    max(a,max(b,c))
#define    sqr(x)         ((x)*(x))
#define    pi             2*acos(0.0)
#define    gcd(a,b)       __gcd(a,b)
#define    lcm(a,b)       (a/gcd(a,b))*b
#define    mem(a,b)       memset(a,b,sizeof (a))
#define    dec(x)         cout<<fixed<<setprecision(x)
#define    none(n)         __builtin_popcountll(n)

template < typename T > string toString ( T Number ) { stringstream ss ; ss << Number ; return ss.str() ; }
template < typename T > ll toll ( T str ) { stringstream ss ; ss << str ; ll num ; ss >> num ; return num ; }
ll power(ll n , ll k) { if(k == 0) return 1 ; if(k&1) return n*sqr(power(n,k/2)) ; else return sqr(power(n,k/2)); }

const   int  N   =   2e5+7;
const   int  M   =   1e9+7;
const   ll  inf  =   0x7f7f7f7f7f7f7f7f;
const   int dx[] =   {+1,+2,+2,+1,-1,-2,-2,-1};
const   int dy[] =   {-2,-1,+1,+2,+2,+1,-1,-2};

int main() {//ikarus_101

    int n,m,i,j,k,x;

    string s;cin>>s;
    k=0;
    for(auto it:s) {
        k += (it=='R');
    }
    if(k!=2) {
        cout << k << endl;
    }
    else {
        if(s[1]=='R') {
            cout << 2 << endl;
        } else {
                cout << 1 <<< endl;
        }
    }





    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:77:29: error: expected primary-expression before '<' token
   77 |                 cout << 1 <<< endl;
      |                             ^
Language: C++

void solve(){
 string s;
 cin>>s;
 int r=0, rmax=0;
 for(int i=0;i<3;i++){
    if(s[i]=='R')
        r++;
    if(s[i]=='S'){
        if(r>rmax)
            rmax=r;
        r=0;
    }
 }

 if(r>rmax)
            rmax=r;

cout<<rmax;
}


int main()
{
    
    ll t = 1;
    // cin >> t;
    while (t--) {
        solve();
    }
    

    return 0;
}

Compiler output:
a.cc: In function 'void solve()':
a.cc:2:2: error: 'string' was not declared in this scope
    2 |  string s;
      |  ^~~~~~
a.cc:3:2: error: 'cin' was not declared in this scope
    3 |  cin>>s;
      |  ^~~
a.cc:3:7: error: 's' was not declared in this scope
    3 |  cin>>s;
      |       ^
a.cc:18:1: error: 'cout' was not declared in this scope
   18 | cout<<rmax;
      | ^~~~
a.cc: In function 'int main()':
a.cc:25:5: error: 'll' was not declared in this scope
   25 |     ll t = 1;
      |     ^~
a.cc:27:12: error: 't' was not declared in this scope
   27 |     while (t--) {
      |            ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
#define REP(i, n) for (int i = 0; i < int(n); i++)
#define FOR(i, a, b) for (int i = a; i < int(b); i++)
#define FOREACH(i, v) for (__typeof((v).begin()) i = (v).begin(); i != (v).end(); i++)
#define SIZE(v) ((int)(v).size())
#define pb push_back
#define mp make_pair
#define st first
#define nd second
#define ll long long
#define llint long long
#define pii pair<int, int>
#define UNVISITED -1


template<typename T>
string to_string(const vector<T>& vc, int w) {
	if(vc.empty()) return "";
	if(w + 1 == vc.size()) return to_string(vc[w]);
	return to_string(vc[w]) + "," + to_string(vc, w + 1);
}
 
template<typename T>
string to_string(const vector<T>& vc) {
	return "{" + to_string(vc, 0) + "}";
}
 
void debug_out() { cerr << endl; }
 
template <typename Head, typename... Tail>
void debug_out(Head H, Tail... T) {
  cerr << " " << to_string(H);
  debug_out(T...);
}
 
#ifdef DEBUG
#define debug(...) cerr << "[" << #__VA_ARGS__ << "]:", debug_out(__VA_ARGS__)
#else
#define debug(...) 42
#endif
 
class DebugStream {}LOG;
template <typename T>DebugStream &operator<<(DebugStream &s, const T&) { return s; }
#ifdef DEBUG
#define LOG clog
#endif



int main() {
	scanf("%s", s);
	int len = strlen(s);
	int i = 0;
	int ans = 0;
	while(i < len) {
		int j = i;
		if(s[i] == 'R') {
			while(j + 1 < len && s[j + 1] == 'R') j++;
			ans = max(ans, j - i + 1);
		}
		i = j + 1;
	}
	printf("%d\n", ans);
}

Compiler output:
a.cc: In function 'int main()':
a.cc:52:21: error: 's' was not declared in this scope; did you mean 'st'?
   52 |         scanf("%s", s);
      |                     ^
      |                     st
Language: C++

#include <bits/stdc++.h>
#include <vector>
#include<queue>
#include<stack>
using namespace std;
#define ll long long
#define pb push_back
#define mp make_pair 
#define gogogo ios::sync_with_stdio(0);cin.tie(0);
int build(){
    
    
    
}
int solve(){
   string s1;
  cin>>s1;
  int cnt=0,ans=1;
  for(int i=0;i<3;i++){
    if(s[i]=='R')cnt++;
    ans=max(ans,cnt);
  }
       return(ans);
       
       
   }
}
int main(){
    gogogo;
    int t=1;
   // cin>>t;
    while(t--){
     auto c=solve();
    cout<<c<<endl;
     
    }
}

Compiler output:
a.cc: In function 'int build()':
a.cc:14:1: warning: no return statement in function returning non-void [-Wreturn-type]
   14 | }
      | ^
a.cc: In function 'int solve()':
a.cc:20:8: error: 's' was not declared in this scope
   20 |     if(s[i]=='R')cnt++;
      |        ^
a.cc: At global scope:
a.cc:27:1: error: expected declaration before '}' token
   27 | }
      | ^
Language: C++

s = input()
count = 0
cur = ''
ma = 0
for i in range(3):
    if s[i] == cur:
        count += 1
    else:
        cur = s[i]
        ma = max(count, ma)
        count = 1

ma = max(count, ma)
print(ma)

Compiler output:
a.cc:3:7: error: empty character constant
    3 | cur = ''
      |       ^~
a.cc:1:1: error: 's' does not name a type
    1 | s = input()
      | ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
string s;
  cin>>s;
  int ans=0;
  for(int i=0;i<sisize();i++){
  if(s[i]=='R')
    ans++;
  }
  cout<<ans;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:17: error: 'sisize' was not declared in this scope; did you mean 'dysize'?
    7 |   for(int i=0;i<sisize();i++){
      |                 ^~~~~~
      |                 dysize
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){int x=0,y=0;char t;for(int i=0;i<3;i++){cin>>t;
if(t=='R'&&x==y){y++;x++;}else y=0;cout<<x<<endl;}

Compiler output:
a.cc: In function 'int main()':
a.cc:4:51: error: expected '}' at end of input
    4 | if(t=='R'&&x==y){y++;x++;}else y=0;cout<<x<<endl;}
      |                                                   ^
a.cc:3:11: note: to match this '{'
    3 | int main(){int x=0,y=0;char t;for(int i=0;i<3;i++){cin>>t;
      |           ^
Language: C++

#include <iostream>
#include <string.

using namespace std;

int main() {
  	string w;
  	cin >> w;
  	int c = 0;
  	for ( int i = 0; i < 3; i++ )
      	if ( w[i] == 'R' )
          	c++;
  	cout << c << endl;
  	return 0;
}

Compiler output:
a.cc:2:18: error: missing terminating > character
    2 | #include <string.
      |                  ^
a.cc:2:10: fatal error: string.: No such file or directory
    2 | #include <string.
      |          ^
compilation terminated.
Language: C++

#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define all(v) v.begin(),v.end()

int main() {
  string a;
  int b=0;
  cin >> a;
  if(a=="RRR"){b=3}
  else if(a=="RRS"){b=2}
  else if(a=="RSR"){b=1}
  else if(a=="SRR"){b=2}
  else if(a=="SSS"){b=0}
  else{b=1}
  
  cout << b << endl;
}



Compiler output:
a.cc: In function 'int main()':
a.cc:10:19: error: expected ';' before '}' token
   10 |   if(a=="RRR"){b=3}
      |                   ^
      |                   ;
a.cc:11:24: error: expected ';' before '}' token
   11 |   else if(a=="RRS"){b=2}
      |                        ^
      |                        ;
a.cc:12:24: error: expected ';' before '}' token
   12 |   else if(a=="RSR"){b=1}
      |                        ^
      |                        ;
a.cc:13:24: error: expected ';' before '}' token
   13 |   else if(a=="SRR"){b=2}
      |                        ^
      |                        ;
a.cc:14:24: error: expected ';' before '}' token
   14 |   else if(a=="SSS"){b=0}
      |                        ^
      |                        ;
a.cc:15:11: error: expected ';' before '}' token
   15 |   else{b=1}
      |           ^
      |           ;
Language: C++

#include <bits/stdc++.h>
using namespace std;
#define int long long
#define rep(i,n) for(int i=0;i<n;i++)
#define rep1(i,n) for(int i=1;i<=n;i++)
#define rep2(i,n) for(int i=0;i<=n;i++)
#define repr(i,a,n) for(int i=a;i<n;i++)
#define all(a) a.begin(),a.end()
#define P pair<long long,long long>
#define double long double
#define INF 1e10
#define MOD 1e9+7
template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return 1; } return 0; }
template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return 1; } return 0; }
using Graph = vector<vector<int>>;
int fg(int k){
    int sum = 1;
    for (int i = 1; i <= k; ++i)
    {
        sum *= i;
    }
    return sum;
}
signed main(){
 string a;
  cin>>a;
  if(a=="RRR"){
    cout<<3;
  }
  else if(a=="RRS"||a=="SRR"){
    cout<<2;
  }
  else if(a="SSS"){
    cout<<0;
  }
  else{
  cout<<1;
  }
}   

Compiler output:
a.cc: In function 'int main()':
a.cc:33:12: error: could not convert 'a.std::__cxx11::basic_string<char>::operator=(((const char*)"SSS"))' from 'std::__cxx11::basic_string<char>' to 'bool'
   33 |   else if(a="SSS"){
      |           ~^~~~~~
      |            |
      |            std::__cxx11::basic_string<char>
Language: C++

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

string S;
cin >> S;
if(S == RRR){
    cout << "3" << endl;
}

if(S.at(0) == S.at(1) || S.at(1) == S.at(2)){
    cout << "2" << endl;
}

if(S == SRS || RSR){
    cout << "1" << endl;
}
if(S == SSS){
    cout << "0" << endl;
}
}

Compiler output:
a.cc:5:1: error: 'cin' does not name a type
    5 | cin >> S;
      | ^~~
a.cc:6:1: error: expected unqualified-id before 'if'
    6 | if(S == RRR){
      | ^~
a.cc:10:1: error: expected unqualified-id before 'if'
   10 | if(S.at(0) == S.at(1) || S.at(1) == S.at(2)){
      | ^~
a.cc:14:1: error: expected unqualified-id before 'if'
   14 | if(S == SRS || RSR){
      | ^~
a.cc:17:1: error: expected unqualified-id before 'if'
   17 | if(S == SSS){
      | ^~
a.cc:20:1: error: expected declaration before '}' token
   20 | }
      | ^
Language: Java

public class Main {
    public static void main(String[] args) {
        Scanner s = new Scanner(System.in);
        String weather = s.nextLine();
        int count = 0, max =0;
        for(int i = 0; i < 3; ++i) {
            if(weather.charAt(i) == 'R') {
                count++;
            } else {
                max = Math.max(max, count);
                count = 0;
            }
        }
        max = Math.max(max, count);
        System.out.println(max);
   }
}


Compiler output:
Main.java:3: error: cannot find symbol
        Scanner s = new Scanner(System.in);
        ^
  symbol:   class Scanner
  location: class Main
Main.java:3: error: cannot find symbol
        Scanner s = new Scanner(System.in);
                        ^
  symbol:   class Scanner
  location: class Main
2 errors
Language: C++

int main() {
    char S[4];
    cin >> S;
    if(S[0]=='R' && S[1]=='R' && S[2]=='R') cout << "3" << endl;
    else if((S[0]=='R'&&S[1]=='R') || (S[1]=='R'&&S[2]=='R')) cout << "2" << endl;
    else if(!(S[0]=='S' && S[1]=='S' && S[2]=='S')) cout << "1" << endl;
    else cout << "0" << endl;
    
    
}

Compiler output:
a.cc: In function 'int main()':
a.cc:3:5: error: 'cin' was not declared in this scope
    3 |     cin >> S;
      |     ^~~
a.cc:4:45: error: 'cout' was not declared in this scope
    4 |     if(S[0]=='R' && S[1]=='R' && S[2]=='R') cout << "3" << endl;
      |                                             ^~~~
a.cc:4:60: error: 'endl' was not declared in this scope
    4 |     if(S[0]=='R' && S[1]=='R' && S[2]=='R') cout << "3" << endl;
      |                                                            ^~~~
a.cc:5:63: error: 'cout' was not declared in this scope
    5 |     else if((S[0]=='R'&&S[1]=='R') || (S[1]=='R'&&S[2]=='R')) cout << "2" << endl;
      |                                                               ^~~~
a.cc:5:78: error: 'endl' was not declared in this scope
    5 |     else if((S[0]=='R'&&S[1]=='R') || (S[1]=='R'&&S[2]=='R')) cout << "2" << endl;
      |                                                                              ^~~~
a.cc:6:53: error: 'cout' was not declared in this scope
    6 |     else if(!(S[0]=='S' && S[1]=='S' && S[2]=='S')) cout << "1" << endl;
      |                                                     ^~~~
a.cc:6:68: error: 'endl' was not declared in this scope
    6 |     else if(!(S[0]=='S' && S[1]=='S' && S[2]=='S')) cout << "1" << endl;
      |                                                                    ^~~~
a.cc:7:10: error: 'cout' was not declared in this scope
    7 |     else cout << "0" << endl;
      |          ^~~~
a.cc:7:25: error: 'endl' was not declared in this scope
    7 |     else cout << "0" << endl;
      |                         ^~~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){int x=0,y=0;char t;for(int i=0;i<3;i++){cin>>t;
if(t=='R'&&x==y){y++;x++;}else y=0;cout<<x<<endl;

Compiler output:
a.cc: In function 'int main()':
a.cc:4:50: error: expected '}' at end of input
    4 | if(t=='R'&&x==y){y++;x++;}else y=0;cout<<x<<endl;
      |                                                  ^
a.cc:3:51: note: to match this '{'
    3 | int main(){int x=0,y=0;char t;for(int i=0;i<3;i++){cin>>t;
      |                                                   ^
a.cc:4:50: error: expected '}' at end of input
    4 | if(t=='R'&&x==y){y++;x++;}else y=0;cout<<x<<endl;
      |                                                  ^
a.cc:3:11: note: to match this '{'
    3 | int main(){int x=0,y=0;char t;for(int i=0;i<3;i++){cin>>t;
      |           ^
Language: C++

#iclude<bits/stdc++.h>
using namespace std;
int main()
{
  string s;
  cin>>s;
  int flag=0,ans=0;
  for(int i=0;i<s.length();i++)
  {
    if(s[i]=='R')
      flag++;
    if(s[i]='S')
      flag=0;
    ans=max(ans,flag);
  }
  if(flag!=0)
    ans=max(ans,flag);
  cout<<ans<<endl;
}

Compiler output:
a.cc:1:2: error: invalid preprocessing directive #iclude; did you mean #include?
    1 | #iclude<bits/stdc++.h>
      |  ^~~~~~
      |  include
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 | #iclude<bits/stdc++.h>
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 | #iclude<bits/stdc++.h>
a.cc:6:8: error: 's' was not declared in this scope
    6 |   cin>>s;
      |        ^
a.cc:14:9: error: 'max' was not declared in this scope
   14 |     ans=max(ans,flag);
      |         ^~~
a.cc:17:9: error: 'max' was not declared in this scope
   17 |     ans=max(ans,flag);
      |         ^~~
a.cc:18:3: error: 'cout' was not declared in this scope
   18 |   cout<<ans<<endl;
      |   ^~~~
a.cc:18:3: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:18:14: error: 'endl' was not declared in this scope
   18 |   cout<<ans<<endl;
      |              ^~~~
a.cc:1:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
  +++ |+#include <ostream>
    1 | #iclude<bits/stdc++.h>
Language: C++

#include <iostream>
#include<bits/stdc++.h>
using namespace std;
using ll = long long;

long long ncr(int n, int r) {
    if(r > n - r) r = n - r; // because C(n, r) == C(n, n - r)
    long long ans = 1;
    int i;

    for(i = 1; i <= r; i++) {
        ans *= n - r + i;
        ans /= i;
    }

    return ans;
}
ll mod(ll a,ll b,ll m){
    if(b==0)return 1;
    if(b%2==0){
        ll y =  mod(a,b/2,m);
        return (y*y)%m;
    }
    else{
        return ((a%m)*mod(a,b-1,m))%m;
    }
}

ll modinv(ll a,ll m){
return mod(a,m-2,m);
//works only for prime m.
//else calculate phi(m)-1.
}



int main()
{
    string s;
    cin>>s;
    int r=0;
    if(s[0]=='R'&&s[1]=='R'&&s[2]=='R'){
        cout<<3;
    }
    else if(s[0]=='R'&&s[1]=RSR='R')cout<<2;
    else if(s[1]=='R'&&s[2]=='R')cout<<2;
    else if(s[0]=='R'||s[1]=='R'||s[2]=='R')cout<<1;
    else cout<<0;

    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:45:29: error: 'RSR' was not declared in this scope
   45 |     else if(s[0]=='R'&&s[1]=RSR='R')cout<<2;
      |                             ^~~
Language: C++

//Amumu-style
#include<bits/stdc++.h>
#define ll long long
#define IOSF ios::sync_with_stdio(false)
#define mp(a,b) make_pair(a,b)
#define pb(a) push_back(a)
#define ini(a,b) memset(a,b,sizeof(a))
#define ms multiset
#define um unordered_map
using namespace std;
int main() {
	string s;
	cin>>s;
	if(s=="RRR") cout<<3;
	if(s=="RRS") cout<<2;
	if(s=="RSR") cout<<1;
	if(S=="RSS") cout<<1;

	if(s=="SRR") cout<<2;
	if(s=="SRS") cout<<1;
	if(s=="SSR") cout<<1;
	if(s=="SSS") cout<<0;
	return 0;
}
//当年陈刀仔！

Compiler output:
a.cc: In function 'int main()':
a.cc:17:12: error: 'S' was not declared in this scope
   17 |         if(S=="RSS") cout<<1;
      |            ^
Language: C++

/*************************************************\
           In the name of almighty ALLAH
                 MD.Faysal Hasan
                Comilla Univesity
\*************************************************/

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

#define     ikarus_101  ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);

typedef     long long             ll;
typedef     long double           ld;
typedef     unsigned long long    ull;
typedef     vector<ll>            vll;
typedef     pair<ll,ll>           pll;
typedef     vector<pll>           vpl;
typedef     map<ll,ll>            mll;
typedef     multiset<ll>          msl;
typedef     multimap<ll,ll>       Mll;
using pqboro=priority_queue<ll,vll,less<ll>>;
using pqchoto=priority_queue<ll,vll,greater<ll>>;

#define    all(str)       str.begin(),str.end()
#define    sajo(str)      sort(str.begin(),str.end())
#define    rev(str)       reverse(str.begin(),str.end())
#define    usajo(str)     sort(str.rbegin(),str.rend())
#define    vin(a)         for(auto &it : a) cin>>it
#define    vout(a)        for(auto it:a) cout<<it<<' ';cout<<nn
#define    pb             push_back
#define    eb             emplace_back
#define    mkp(x,y)       make_pair(x,y)
#define    F              first
#define    S              second
#define    yes            cout<<"YES"<<nn
#define    no             cout<<"NO"<<nn
#define    nn             "\n" ///endl
#define    rep(i,n)       for (i=0;i<n;++i )
#define    rep1(i,n)      for (i=1;i<=n;++i )

#define    min3(a,b,c)    min(a,min(b,c))
#define    max3(a,b,c)    max(a,max(b,c))
#define    sqr(x)         ((x)*(x))
#define    pi             2*acos(0.0)
#define    gcd(a,b)       __gcd(a,b)
#define    lcm(a,b)       (a/gcd(a,b))*b
#define    mem(a,b)       memset(a,b,sizeof (a))
#define    dec(x)         cout<<fixed<<setprecision(x)
#define    none(n)         __builtin_popcountll(n)

template < typename T > string toString ( T Number ) { stringstream ss ; ss << Number ; return ss.str() ; }
template < typename T > ll toll ( T str ) { stringstream ss ; ss << str ; ll num ; ss >> num ; return num ; }
ll power(ll n , ll k) { if(k == 0) return 1 ; if(k&1) return n*sqr(power(n,k/2)) ; else return sqr(power(n,k/2)); }

const   int  N   =   2e5+7;
const   int  M   =   1e9+7;
const   ll  inf  =   0x7f7f7f7f7f7f7f7f;
const   int dx[] =   {+1,+2,+2,+1,-1,-2,-2,-1};
const   int dy[] =   {-2,-1,+1,+2,+2,+1,-1,-2};

int main() {//ikarus_101

    int n,m,i,j,k,x;

    string s;cin>>s;
    k=0;
    for(auto it:s) {
        k += (x=='R');
    }
    if(k!=2) {
        cout << k << endl;
    }
    else {
        if(s[1]=='R') {
            cout << 2 << endl;
        } else {
                cout << 1 <<< endl;
        }
    }





    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:77:29: error: expected primary-expression before '<' token
   77 |                 cout << 1 <<< endl;
      |                             ^
Language: C++

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

int main () {
	string s;
  	int count = 0;
  	cin >> s;
  	for (int i = 0; i < s.size; i++) {
      if (s[i] == "R") {
      	count++;
      }
    }
  cout << count;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:31: 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 '()' ?)
    8 |         for (int i = 0; i < s.size; i++) {
      |                             ~~^~~~
      |                                   ()
a.cc:9:16: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
    9 |       if (s[i] == "R") {
Language: C++

#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
const int maxn = 1e6 + 10;
int main()
{
    char s[maxn];
    gets(s);
    int tmp = 0;
    int i = 0;
    int max1 = 0;
    while(s[i] != '\0') {
        if(s[i] == 'R') {
            tmp++;
            max1 = max(max1, tmp);
        }
        if(s[i] == 'S')
            tmp = 0;
        i++;
    }
    printf("%d\n",max1);
    system("pause");
    return 0;
}

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

#include<bits/stdc++.h>
using namespace std;
void main(){
  string str;
  cin>>str;
  int count=0,max=0;
  for(int i=0;i<str.length();i++){
    if(str[i]=='R'){
      count++;
      if(count>max){
        max=count;
      }
    }else{
      count=0;
    }
  }
  printf("%d\n",max);
}

Compiler output:
a.cc:3:1: error: '::main' must return 'int'
    3 | void main(){
      | ^~~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){int x=0,y=0;char t;for(int i=0;i<3;i++){cin>>t;
if(t=='R'&&x==y){y++;x++;}else y=0;}cout<<x<<endl;

Compiler output:
a.cc: In function 'int main()':
a.cc:4:51: error: expected '}' at end of input
    4 | if(t=='R'&&x==y){y++;x++;}else y=0;}cout<<x<<endl;
      |                                                   ^
a.cc:3:11: note: to match this '{'
    3 | int main(){int x=0,y=0;char t;for(int i=0;i<3;i++){cin>>t;
      |           ^
Language: C++


#include<bits/stdc++.h>
using namespace std;
 
#define ll long long int
#define vi vector<int>
#define pb push_back
#define vli vector<long long int>
#define mp make_pair 
#define pii pair<int,int>
int main()
{
  string s;
  cin>>s;
  int i,c=0;
  for(i=1;i<3;i++)
  {if(s[i]=='R'&&s[i-1]=='R')
    c++;}
  
  cout<<c<<endl;

Compiler output:
a.cc: In function 'int main()':
a.cc:20:17: error: expected '}' at end of input
   20 |   cout<<c<<endl;
      |                 ^
a.cc:12:1: note: to match this '{'
   12 | {
      | ^
Language: C++

#include<iostream>
using namespace stg;

int main() {
  string s;
  cin >> s;
  int ans = 0;
  int m = 0;
  for(int i = 0; i < s.size(); i++) {
    if(s[i] == 'R') {
      ans++;
      m = max(m, ans);
    } else {
      ans = 0;
    }
  }
  return m;
}


Compiler output:
a.cc:2:17: error: 'stg' is not a namespace-name
    2 | using namespace stg;
      |                 ^~~
a.cc: In function 'int main()':
a.cc:5:3: error: 'string' was not declared in this scope
    5 |   string s;
      |   ^~~~~~
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:6:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    6 |   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:6:10: error: 's' was not declared in this scope
    6 |   cin >> s;
      |          ^
a.cc:12:11: error: 'max' was not declared in this scope; did you mean 'std::max'?
   12 |       m = max(m, ans);
      |           ^~~
      |           std::max
In file included from /usr/include/c++/14/string:51:
/usr/include/c++/14/bits/stl_algobase.h:303:5: note: 'std::max' declared here
  303 |     max(const _Tp& __a, const _Tp& __b, _Compare __comp)
      |     ^~~
Language: Java



import java.util.*;
import java.io.*;

public class Main
	static FastReader in = new FastReader();

	public static void main(String[] args) 
	{
		String s = in.nextLine();
		solve(s);
	}
	
	static void solve(String ss)
	{
		String [] s = ss.split("");
		int largest = -1;;
		int curr = 0;
		for(int i = 0; i < s.length; i++)
		{
			if(s[i].equals("R"))
				curr++;
			else
			{
				largest = Math.max(largest, curr);
				curr = 0;
			}
		}
		System.out.println(largest);
	}
	
	

	static class FastReader {
		BufferedReader br;
		StringTokenizer st;

		public FastReader() {
			br = new BufferedReader(new InputStreamReader(System.in));
		}

		String next() {
			while (st == null || !st.hasMoreElements()) {
				try {
					st = new StringTokenizer(br.readLine());
				} catch (IOException e) {
					e.printStackTrace();
				}
			}
			return st.nextToken();
		}

		int nextInt() {
			return Integer.parseInt(next());
		}

		long nextLong() {
			return Long.parseLong(next());
		}

		double nextDouble() {
			return Double.parseDouble(next());
		}

		String nextLine() {
			String str = "";
			try {
				str = br.readLine();
			} catch (IOException e) {
				e.printStackTrace();
			}
			return str;
		}
	}
}





Compiler output:
Main.java:6: error: '{' expected
public class Main
                 ^
Main.java:9: error: unnamed classes are a preview feature and are disabled by default.
	public static void main(String[] args) 
	              ^
  (use --enable-preview to enable unnamed classes)
Main.java:76: error: class, interface, enum, or record expected
}
^
3 errors
Language: C++

#include<iostream>
#include<bits/stdc++.h>
using namespace std;
int main()
{
	string s;
	cin s;
	int hash[3];
	if(s[0]=='S')
	hash[0] = 0;
	else
	hash[0] = 1;
	for(int i=1;i<3;i++)
	{
		if(s[i]=='R')
		hash[i] = hash[i-1] + 1;
		else
		hash[i] = 0;
	}
	return max(hash[0],max(hash[1],hash[2]));
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:12: error: expected ';' before 's'
    7 |         cin s;
      |            ^~
      |            ;
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:8:12: error: 'S' was not declared in this scope
    8 |         if(S[i]=='R')
      |            ^
Language: C++

#include <bits/stdc++.h>
#define ll long long
#define vi vector<int>
#define vll vector<ll>
#define pb push_back
#define ppb pop_back()
#define fi first
#define se second
#define pi pair<int, int>
#define rep(i, a, n) for(int i = a; i <= n; i++)
#define REP(i, a, n) for(int i = a; i < n; i++)
#define Y "YES"
#define N "NO"
using namespace std;

int n;

int main() {
	ios::sync_with_stdio(0);
	cin.tie(0);
	
	cin >> n;
	if (n == "RRR") cout << 3;
	else if (n == "RRS" || n == "SRR") cout << 2;
	else if (n == "SSS") cout << 0;
	else cout << 1; 
}


Compiler output:
a.cc: In function 'int main()':
a.cc:23:15: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   23 |         if (n == "RRR") cout << 3;
      |             ~~^~~~~~~~
a.cc:24:20: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   24 |         else if (n == "RRS" || n == "SRR") cout << 2;
      |                  ~~^~~~~~~~
a.cc:24:34: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   24 |         else if (n == "RRS" || n == "SRR") cout << 2;
      |                                ~~^~~~~~~~
a.cc:25:20: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   25 |         else if (n == "SSS") cout << 0;
      |                  ~~^~~~~~~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
#define ll long long
int a[2000005];
int main()
{
    string s;
    int cnt=0;
    cin >> s;
    int mx=0;;
    for(int i=0;i<s.size();i++)
    {
        if(s[i]=='R')
            cnt++;
        else
        {
            mx = max(cnt,mx);
            cnt0;
        }
    }
    mx = max(cnt,mx);
    cout << mx << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:18:13: error: 'cnt0' was not declared in this scope; did you mean 'cnt'?
   18 |             cnt0;
      |             ^~~~
      |             cnt
Language: C++

#inbclude<bits/stdc++.h>
using namespace std;
int main()
{
	string s;
  cin >> s;
  if(s=="SSS")
    cout<<0;
  else if(s=="RRR")
    cout<<3;
  else if(s=="SRR" || s=="RRS")
    cout<<2;
  else
    cout<<1;
}

Compiler output:
a.cc:1:2: error: invalid preprocessing directive #inbclude; did you mean #include?
    1 | #inbclude<bits/stdc++.h>
      |  ^~~~~~~~
      |  include
a.cc: In function 'int main()':
a.cc:5:9: 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 | #inbclude<bits/stdc++.h>
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 | #inbclude<bits/stdc++.h>
a.cc:6:10: error: 's' was not declared in this scope
    6 |   cin >> s;
      |          ^
a.cc:8:5: error: 'cout' was not declared in this scope
    8 |     cout<<0;
      |     ^~~~
a.cc:8:5: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:10:5: error: 'cout' was not declared in this scope
   10 |     cout<<3;
      |     ^~~~
a.cc:10:5: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:12:5: error: 'cout' was not declared in this scope
   12 |     cout<<2;
      |     ^~~~
a.cc:12:5: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:14:5: error: 'cout' was not declared in this scope
   14 |     cout<<1;
      |     ^~~~
a.cc:14:5: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
Language: C++

#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)


int main() {
  string S;
  cin >> S;
  
  if(S="RRR"){
    cout << 3 <<endl;
  }
  else if(S="RRS"){
    cout << 2 <<endl;
  }
  else if(S="SRR"){
    cout << 2 <<endl;
  }
  else if(S="RSS"){
    cout << 1 <<endl;
  }
  else if(S="SRS"){
    cout << 1 <<endl;
  }
  else if(S="SSR"){
    cout << 1 <<endl;
  }
  else if(S="RSR"){
    cout << 1 <<endl;
  }
  else{
    cout << 0 <<endl;
  }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:10:7: error: could not convert 'S.std::__cxx11::basic_string<char>::operator=(((const char*)"RRR"))' from 'std::__cxx11::basic_string<char>' to 'bool'
   10 |   if(S="RRR"){
      |      ~^~~~~~
      |       |
      |       std::__cxx11::basic_string<char>
a.cc:13:12: error: could not convert 'S.std::__cxx11::basic_string<char>::operator=(((const char*)"RRS"))' from 'std::__cxx11::basic_string<char>' to 'bool'
   13 |   else if(S="RRS"){
      |           ~^~~~~~
      |            |
      |            std::__cxx11::basic_string<char>
a.cc:16:12: error: could not convert 'S.std::__cxx11::basic_string<char>::operator=(((const char*)"SRR"))' from 'std::__cxx11::basic_string<char>' to 'bool'
   16 |   else if(S="SRR"){
      |           ~^~~~~~
      |            |
      |            std::__cxx11::basic_string<char>
a.cc:19:12: error: could not convert 'S.std::__cxx11::basic_string<char>::operator=(((const char*)"RSS"))' from 'std::__cxx11::basic_string<char>' to 'bool'
   19 |   else if(S="RSS"){
      |           ~^~~~~~
      |            |
      |            std::__cxx11::basic_string<char>
a.cc:22:12: error: could not convert 'S.std::__cxx11::basic_string<char>::operator=(((const char*)"SRS"))' from 'std::__cxx11::basic_string<char>' to 'bool'
   22 |   else if(S="SRS"){
      |           ~^~~~~~
      |            |
      |            std::__cxx11::basic_string<char>
a.cc:25:12: error: could not convert 'S.std::__cxx11::basic_string<char>::operator=(((const char*)"SSR"))' from 'std::__cxx11::basic_string<char>' to 'bool'
   25 |   else if(S="SSR"){
      |           ~^~~~~~
      |            |
      |            std::__cxx11::basic_string<char>
a.cc:28:12: error: could not convert 'S.std::__cxx11::basic_string<char>::operator=(((const char*)"RSR"))' from 'std::__cxx11::basic_string<char>' to 'bool'
   28 |   else if(S="RSR"){
      |           ~^~~~~~
      |            |
      |            std::__cxx11::basic_string<char>
Language: Java

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class RainySeason {
    public static void main(String[] args) throws IOException {
        BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
        String s = reader.readLine();
        if(s.contains("RRR")) {
            System.out.println(3);
        } else if(s.contains("RR")) {
            System.out.println(2);
        } else if(s.contains("R")) {
            System.out.println(1);
        } else {
            System.out.println(0);
        }
        
    }
}


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

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

#define mem(arr,x) memset(arr,x,sizeof(arr))
#define pb push_back
#define ll long long
#define mp make_pair
#define rep(i,n)  for(ll i=0;i<n;i++)
#define repi(i,n)  for(ll i=1;i<=n;i++)
#define all(x)   (x.begin(),x.end())

const double PI = 3.1415926535897932;
const int mod = 1e9 + 7;  
int max(int a,int b)
{
	if(a>b)
	return a;
	return b;
}


int main()
{
	
ios_base::sync_with_stdio(false);
cin.tie(0);
cout.tie(0);
string s;
cin>>s;
int ans=1;
int n=(int)s.length();
int f=0;
rep(i,n)
{
	if(s[i]=='R')
	{
		f=1;
		break;
	}
}
for(int i=0;i<n-1;i++)
{
	if(s[i]=='R' && s[i+1]=='R')
	{ans++;
		RR
	}
}
if(f==0)
cout<<0;
else
cout<<ans;





}
  

Compiler output:
a.cc: In function 'int main()':
a.cc:45:17: error: 'RR' was not declared in this scope
   45 |                 RR
      |                 ^~
Language: C++

#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
const int maxn = 1e6 + 10;
struct st {
    int from, to, next;
}edge[maxn];
int num;
int head[maxn];
int vis[maxn];
int f[maxn][3]; //0被自己覆盖； 1被儿子覆盖； 2被父亲覆盖；
void add_edge(int u, int v) {
    edge[++num].from = u;
    edge[num].to = v;
    edge[num].next = head[u];
    head[u] = num;
}

void dfs(int u) {
    vis[u] = 1;
    
    for(int i = head[u]; i != -1; i = edge[i].next) {
        int k = edge[i].to;
        if(vis[k] != 1) {
            
        }
    }
    
}
void parpare() {
    num = 0;
    memset(head, -1, sizeof(head));
    memset(vis, 0, sizeof(vis));
}
int main()
{
    char s[maxn];
    gets(s);
    int tmp = 0;
    int i = 0;
    int max1 = 0;
    while(s[i] != '\0') {
        if(s[i] == 'R') {
            tmp++;
            max1 = max(max1, tmp);
        }
        if(s[i] == 'S')
            tmp = 0;
        i++;
    }
    printf("%d\n",max1);
    system("pause");
    return 0;
}

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

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

int main() {
   string s; 
   cin >> s;
   if(s[0] == 'R' && s[1] == 'R' && s[2] == 'R') {
      cout << 3;
   } else if(s[0] == 'R' && s[1] == 'R') {
      cout << 2;
   } else if(s[1] == 'R' && s[2] == 'R') {
      cout << 2;
   } else (s[0] == 'R' || s[1] == 'R' || s[2] == 'R') {
      cout << 1;
   } else {
      cout << 0;
   }

	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:54: error: expected ';' before '{' token
   13 |    } else (s[0] == 'R' || s[1] == 'R' || s[2] == 'R') {
      |                                                      ^~
      |                                                      ;
a.cc:15:6: error: 'else' without a previous 'if'
   15 |    } else {
      |      ^~~~