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

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

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


Compiler output:
a.cc: In function 'int main()':
a.cc:7:38: error: lvalue required as left operand of assignment
    7 |   if (S.at(0) = "R" && S.at(1) = "R" && S.at(2) = "R" ) {
      |                                  ~~~~^~~~~~~~~~
a.cc:10:41: error: lvalue required as left operand of assignment
   10 | else if (S.at(0) = "R" && S.at(1) = "R" && S.at(2) = "S") {
      |                                     ~~~~^~~~~~~~~~
a.cc:13:41: error: lvalue required as left operand of assignment
   13 | else if (S.at(0) = "S" && S.at(1) = "R" && S.at(2) = "R") {
      |                                     ~~~~^~~~~~~~~~
a.cc:16:41: error: lvalue required as left operand of assignment
   16 | else if (S.at(0) = "R" && S.at(1) = "S" && S.at(2) = "R") {
      |                                     ~~~~^~~~~~~~~~
a.cc:19:43: error: lvalue required as left operand of assignment
   19 |   else if (S.at(0) = "R" && S.at(1) = "S" && S.at(2) = "S") {
      |                                       ~~~~^~~~~~~~~~
a.cc:22:43: error: lvalue required as left operand of assignment
   22 |   else if (S.at(0) = "S" && S.at(1) = "R" && S.at(2) = "S") {
      |                                       ~~~~^~~~~~~~~~
a.cc:25:43: error: lvalue required as left operand of assignment
   25 |   else if (S.at(0) = "S" && S.at(1) = "S" && S.at(2) = "R") {
      |                                       ~~~~^~~~~~~~~~
a.cc:28:43: error: lvalue required as left operand of assignment
   28 |   else if (S.at(0) = "S" && S.at(1) = "S" && S.at(2) = "S") {
      |                                       ~~~~^~~~~~~~~~
Language: C++

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

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


Compiler output:
a.cc: In function 'int main()':
a.cc:7:38: error: lvalue required as left operand of assignment
    7 |   if (S.at(0) = 'R' && S.at(1) = 'R' && S.at(2) = 'R' ) {
      |                                  ~~~~^~~~~~~~~~
a.cc:10:41: error: lvalue required as left operand of assignment
   10 | else if (S.at(0) = 'R' && S.at(1) = 'R' && S.at(2) = 'S') {
      |                                     ~~~~^~~~~~~~~~
a.cc:13:41: error: lvalue required as left operand of assignment
   13 | else if (S.at(0) = 'S' && S.at(1) = 'R' && S.at(2) = 'R') {
      |                                     ~~~~^~~~~~~~~~
a.cc:16:41: error: lvalue required as left operand of assignment
   16 | else if (S.at(0) = 'R' && S.at(1) = 'S' && S.at(2) = 'R') {
      |                                     ~~~~^~~~~~~~~~
a.cc:19:43: error: lvalue required as left operand of assignment
   19 |   else if (S.at(0) = 'R' && S.at(1) = 'S' && S.at(2) = 'S') {
      |                                       ~~~~^~~~~~~~~~
a.cc:22:43: error: lvalue required as left operand of assignment
   22 |   else if (S.at(0) = 'S' && S.at(1) = 'R' && S.at(2) = 'S') {
      |                                       ~~~~^~~~~~~~~~
a.cc:25:43: error: lvalue required as left operand of assignment
   25 |   else if (S.at(0) = 'S' && S.at(1) = 'S' && S.at(2) = 'R') {
      |                                       ~~~~^~~~~~~~~~
a.cc:28:43: error: lvalue required as left operand of assignment
   28 |   else if (S.at(0) = 'S' && S.at(1) = 'S' && S.at(2) = 'S') {
      |                                       ~~~~^~~~~~~~~~
Language: C++

/*                                                  Alpha_The_Coder
                                                  Created on 20/08/2020                                                     */

#include <bits/stdc++.h>
using namespace std;
#define iamalpha ios_base::sync_with_stdio(false);cin.tie(NULL);
#define loop(a,n) for(int i=a;i<n;i++)
#define nloop(a,n) for(int j=a;j<n;j++)
#define lli long long int
void solve();
int main()
{
    iamalpha;
    int t=1;
    //cin>>t;
    while(t--)
    {
        solve();
    }

    return 0;
}
void solve()
{
    string s;
    cin>>s;
    int consecutive_days=0;
    int i=0;
    if(s[0]=='R' && s[1]=='R' && s[2]=='R')
        consecutive_days=3;
    else if(s[0]=='R' && s[1]='R' && s[2]=='S')
        consecutive_days=2;
    else if(s[0]=='S' && s[1]='R' && s[2]=='R')
        consecutive_days=2;
    else if(s[0]=='S' && s[1]='R' && s[2]=='S')
        consecutive_days=1;
    else if(s[0]=='S' && s[1]='S' && s[2]=='S')
        consecutive_days=0;
    else if(s[0]=='R' && s[1]='S' && s[2]=='R')
        consecutive_days=1;
    else
        consecutive_days=0;
    cout<<consecutive_days;
}

// Solely contributed by Subhojeet Sahoo aka Alpha


Compiler output:
a.cc: In function 'void solve()':
a.cc:31:23: error: lvalue required as left operand of assignment
   31 |     else if(s[0]=='R' && s[1]='R' && s[2]=='S')
a.cc:33:23: error: lvalue required as left operand of assignment
   33 |     else if(s[0]=='S' && s[1]='R' && s[2]=='R')
a.cc:35:23: error: lvalue required as left operand of assignment
   35 |     else if(s[0]=='S' && s[1]='R' && s[2]=='S')
a.cc:37:23: error: lvalue required as left operand of assignment
   37 |     else if(s[0]=='S' && s[1]='S' && s[2]=='S')
a.cc:39:23: error: lvalue required as left operand of assignment
   39 |     else if(s[0]=='R' && s[1]='S' && s[2]=='R')
Language: C++

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

int main() {
  string s;
  cin >> s;
  bool a=s.at(0)=="R";
  bool b=s.at(1)=="R";
  bool c=s.at(2)=="R";
 
  if(a and b and c)
  cout <<3<< endl;
  else if((a and b) or (b and c))
    cout<<2<<endl;
  else if(a or b or c)
    cout<<1<<endl; 
  else
    cout<<0<<endl;
  
}


Compiler output:
a.cc: In function 'int main()':
a.cc:7:17: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
    7 |   bool a=s.at(0)=="R";
      |          ~~~~~~~^~~~~
a.cc:8:17: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
    8 |   bool b=s.at(1)=="R";
      |          ~~~~~~~^~~~~
a.cc:9:17: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
    9 |   bool c=s.at(2)=="R";
      |          ~~~~~~~^~~~~
Language: C++

#include<stdio.h>
int main(void)
{
	char s[10];
	int i;
	scanf("%s", s);
	if (s[0] == 'R') {
		if (s[1] == 'R') {
			if (s[2] == 'R') {
				i = 3;
			}
			else {
				i = 2;
			}
		}
		else {
			i = 1;
		}
	}
	else {
		if (s[1] == 'R') {
			if (s[2] == 'R') {
				i = 2;
			}
			else {
				i = 1;
			}
		}
		else {
			if (s[2] == 'R') {
				i = 1;
			}
			else {
				i = 0;
			}
		}
		}
	printf("%d",i);
	return 0;
}
#include<stdio.h>
int main(void)
{
	char s[10];
	int i;
	scanf("%s", s);
	if (s[0] == 'R') {
		if (s[1] == 'R') {
			if (s[2] == 'R') {
				i = 3;
			}
			else {
				i = 2;
			}
		}
		else {
			i = 1;
		}
	}
	else {
		if (s[1] == 'R') {
			if (s[2] == 'R') {
				i = 2;
			}
			else {
				i = 1;
			}
		}
		else {
			if (s[2] == 'R') {
				i = 1;
			}
			else {
				i = 0;
			}
		}
		}
	printf("%d",i);
	return 0;
}


Compiler output:
a.cc:42:5: error: redefinition of 'int main()'
   42 | int main(void)
      |     ^~~~
a.cc:2:5: note: 'int main()' previously defined here
    2 | int main(void)
      |     ^~~~
Language: C++

/*Be patient && calm!
All our dreams can come true, if we have the courage to pursue them.
The secret of getting ahead is getting started.
It is hard to beat a person who never gives up.
First, solve the problem. Then, write the code.
Fix the cause, not the symptom.
Simplicity is the soul of efficiency.
Make it work, make it right, make it fast.*/
#include<bits\stdc++.h>
#include<iostream>
#include<vector>
#include<cmath>
#include<map>
#include<set>
#include<algorithm>
#include<sstream>
using namespace std;
#define mod 1000000007
#define N 100005
#define ll long long
#define ull unsigned long long
#define loop1(i, j, k, step) for (int i = j; i < k; i += step)
#define loop(i, j, k) for (int i = j; i < k; i++)
#define rloop1(i, j, k, step) for (int i = j; i >= k; i -= step)
#define rloop(i, j, k) for (int i = j; i >= k; i--)
#define rep(i, k) for (int i = (0); i < (k); i++)
#define rrep(i, k) for (int i = k - 1; i >= 0; i--)
#define forall(it, l) for (auto it = l.begin(); it != l.end(); it++)
#define mp make_pair
#define pb push_back
#define F first
#define S second
#define sz(x) (int)(x).size()
#define lin "\n"
#define Max (int)INT_MAX
#define Min (int)INT_MIN
#define MEM(a, b) memset(a, (b), sizeof(a))
#define fast_io ios_base::sync_with_stdio(0), cin.tie(NULL), cout.tie(0)
#define PI 2 * acos(0.0)
typedef vector<int> vi;
typedef pair<int, int> pi;
typedef vector<ll> vl;
typedef pair<ll, ll> pll;
// bool sortinrev(const pair<int, int> &a,
//                const pair<int, int> &b)
// {
//     return (a.first > b.first);
// }
// bool spOrder(const pair<int, int> &a,
//              const pair<int, int> &b)
// {
//     if (a.first == b.first)
//         return a.second < b.second;
//     return a.first > b.first;
//  }





void solve()
{
    string s;
    cin>>s;
    ll ans = 0;
    bool ok=true;
    if(s[0]=='R'&&s[0]==s[1]&&s[1]==s[2])
        cout << 3 << lin;
    else if((s[0]=='R'&&s[0]==s[1])||(s[1]=='R'&&s[1]==s[2]))
        cout << 2 << lin;
    else if(s[0]=='R'||s[1]=='R'||s[2]=='R')
        cout << 1 << lin;
        else
    cout << 0 << lin;
}





int main()
{
    // auto start = clock();
    fast_io;
    // freopen("input.txt", "r", stdin);
    // freopen("output.txt", "w", stdout);
    int t = 1;
    // cin >> t;
    // int c = 1;
    while (t--)
    {
        // cout << "Case " << c << ":"
        // << lin;
        solve();
        // if(t)
        // {
        //     cout << lin;
        // }
        // c++;
    }
    // auto stop = clock();
    // cerr << "time taken:" << double(stop - start) / double(CLOCKS_PER_SEC) << " s" << endl;
    return 0;
}

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

import numpy as np
import sys
input = sys.stdin.readline

tenki = input()
tenki = list(tenki)

max = 0

num = tenki.count("R")

if num == 0:
  out = 0
elif num == 1:
  out = 1
elif num == 3:
  out = 3
elif num == 2:
  if tenki[1]=="S":
    out = 1
  else:
    out = 2

print(out)

Compiler output:
a.cc:1:1: error: 'import' does not name a type
    1 | import numpy as np
      | ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
Language: C++

    #include<bits/stdc++.h>
    using namespace std;
    int main(){
    	string s;
      	cin>>s;
      	int best=0,m=0;
      	for(char c:s){
          if(c=="R") m++;
          else{
            best=max(best,m);
            m=0;
          }
        }
         cout<<best;
    	return 0;
    }

Compiler output:
a.cc: In function 'int main()':
a.cc:8:15: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
    8 |           if(c=="R") m++;
      |              ~^~~~~
Language: C++

    #include<bits/stdc++.h>
    using namespace std;
    int main(){
    	string s;
      	cin>>s;
      	int best=0,m=0;
      	for(char c:s){
          if(c=='R') m++;
          else{
            best=max(best,m);
            m=0;
        }
         cout<<best;
    	return 0;
    }

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

    #include<bits/stdc++.h>
    using namespace std;
    int main(){
    	string s;
      	cin>>s;
      	int best=0,m=0;
      	for(char c:s){
          if(c=="R") m++;
          else{
            best=max(best,m);
            m=0;
        }
         cout<<best;
    	return 0;
    }

Compiler output:
a.cc: In function 'int main()':
a.cc:8:15: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
    8 |           if(c=="R") m++;
      |              ~^~~~~
a.cc:15:6: error: expected '}' at end of input
   15 |     }
      |      ^
a.cc:3:15: note: to match this '{'
    3 |     int main(){
      |               ^
Language: C

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

int main()
{
	int c = 0, cm = 0;
	char C;
	for (int i=0; i<3; ++i){
		cin >> C;
		if (C=='R') c++;
		else cm = (c>cm) ? c : cm;
	}
	cout << cm << 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++

#include<bits/stdc++.h>
using namespace std;
int main(){
    string S;
    cin >> S;
 
    int ans = 0;
    int tmp = 0;
    REP(i, 3){
        if (S[i] == 'R'){
            tmp++;
        } else {
            ans = max(tmp, ans);
            tmp = 0;
        }
    }
    ans = max(tmp, ans);
 
    print(ans);
 
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:9: error: 'i' was not declared in this scope
    9 |     REP(i, 3){
      |         ^
a.cc:9:5: error: 'REP' was not declared in this scope
    9 |     REP(i, 3){
      |     ^~~
a.cc:19:5: error: 'print' was not declared in this scope; did you mean 'rint'?
   19 |     print(ans);
      |     ^~~~~
      |     rint
Language: C++

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

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


Compiler output:
a.cc: In function 'int main()':
a.cc:16:16: error: 'endll' was not declared in this scope
   16 |   cout << n << endll;
      |                ^~~~~
Language: C++

#include <iostream>
using namespace std;
int main(void){
  n = input()
if "RRR" in n:
    print(3)
elif "RR" in n:
    print(2)
elif "R" in n:
    print(1)
else:
    print(0)
    
}


Compiler output:
a.cc: In function 'int main()':
a.cc:4:3: error: 'n' was not declared in this scope
    4 |   n = input()
      |   ^
a.cc:4:7: error: 'input' was not declared in this scope; did you mean 'int'?
    4 |   n = input()
      |       ^~~~~
      |       int
Language: C++

#include <stdio.h>
int main(void){
    char S[3];
    for(int i = 0; i < 3; i++){
        scanf("%c", S[i]);
    }
    int counter = 0;

    if(S[0] == "R"){
        counter++;
        if(S[1] == "R"){
            counter++;
            if(S[2] == "R"){
                counter++;
            };
        };
    }else{
        if(S[1] == "R"){
            counter++;
            if(S[2] == "R"){
                counter++;
            };
        };
    }
    ;

    return 0;

}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:13: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
    9 |     if(S[0] == "R"){
      |        ~~~~~^~~~~~
a.cc:11:17: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   11 |         if(S[1] == "R"){
      |            ~~~~~^~~~~~
a.cc:13:21: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   13 |             if(S[2] == "R"){
      |                ~~~~~^~~~~~
a.cc:18:17: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   18 |         if(S[1] == "R"){
      |            ~~~~~^~~~~~
a.cc:20:21: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   20 |             if(S[2] == "R"){
      |                ~~~~~^~~~~~
Language: C++

#include<iostream>
#include<cstdio>
using namsepace std; 
void solve(){
  string s;
  int res=0;
  cin>>s;
  if (s[0]=R) res+=1;
  if (s[1]=R) res+=2;
  else res=0;
  if (s[2]=R) res+=3;
  else res=1;
  cout<<res;
}

int main(){
  ios_base:sync_with_stdio(0);
  cin.tie(0);
  solve();
}

Compiler output:
a.cc:3:7: error: expected nested-name-specifier before 'namsepace'
    3 | using namsepace std;
      |       ^~~~~~~~~
a.cc: In function 'void solve()':
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:7:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    7 |   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:7:8: error: 's' was not declared in this scope
    7 |   cin>>s;
      |        ^
a.cc:8:12: error: 'R' was not declared in this scope
    8 |   if (s[0]=R) res+=1;
      |            ^
a.cc:9:12: error: 'R' was not declared in this scope
    9 |   if (s[1]=R) res+=2;
      |            ^
a.cc:11:12: error: 'R' was not declared in this scope
   11 |   if (s[2]=R) res+=3;
      |            ^
a.cc:13:3: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   13 |   cout<<res;
      |   ^~~~
      |   std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc: In function 'int main()':
a.cc:17:12: error: 'sync_with_stdio' was not declared in this scope
   17 |   ios_base:sync_with_stdio(0);
      |            ^~~~~~~~~~~~~~~
a.cc:18:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
   18 |   cin.tie(0);
      |   ^~~
      |   std::cin
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
Language: C++

#include <iostream>
#include <cstdio>
using namespace std;

void solve()
{
	string s;
	int res = 0;
	cin >> s;
	if (s[0] == 'R') res++;
	if (s[1] == 'R') res++;
	else res = 0;
	if (s[2] == 'R') res++;
	cout << res;
}
int main()
{
	ios_base:sync_with_stdio(0);
	cin.tie(0);
	solve();
}

Compiler output:
a.cc: In function 'int main()':
a.cc:18:18: error: 'sync_with_stdio' was not declared in this scope
   18 |         ios_base:sync_with_stdio(0);
      |                  ^~~~~~~~~~~~~~~
Language: C

#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef vector<ll> VI;
typedef vector<VI> VVI;
typedef pair<ll, ll> P;
#define FOR(i,a,b) for(ll i=ll(a);i<ll(b);++i)
#define rep(i,n)  FOR(i,0,n)
#define PRINT(V) for (auto v : (V)) cout << v << " "
#define ALL(n) begin(n),end(n)
struct cww{cww(){ios::sync_with_stdio(false);cin.tie(0);}}star;
const ll INF = numeric_limits<ll>::max();
int main()
{
    string s; cin >> s;
    int c = 0;
    int ans = 0;
    rep(i, s.size()){
        if (s[i] == 'R') ++c;
        else c = 0;
        ans = max(ans, c);
    }
    cout << ans << 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.*;
public class Main{
	public static void main(String args[]){
    	Scanner sc = new Scanner(System.in);
      	String s = sc.nextLine();
      	int count =0;
       	int max = 0;
      	for(int i =0;i<s.length();i++){
        	if(s.charAt(i)='R'){
            	count++;
            }else{
            	max = Math.max(count, max);
              	count=0;
            }
        }
        System.out.println(count);
        
    }
}


Compiler output:
Main.java:9: error: unexpected type
        	if(s.charAt(i)='R'){
        	           ^
  required: variable
  found:    value
1 error
Language: Java

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

Compiler output:
Main.java:3: error: cannot find symbol
    	Scanner sc = new Scanner(System.in);
    	^
  symbol:   class Scanner
  location: class Main
Main.java:3: error: cannot find symbol
    	Scanner sc = new Scanner(System.in);
    	                 ^
  symbol:   class Scanner
  location: class Main
Main.java:8: error: unexpected type
        	if(s.charAt(i)='R'){
        	           ^
  required: variable
  found:    value
3 errors
Language: C++

#include<iostream>
#include <vector>
#include <algorithm>
using namespace std;
int main() {
	int N;
	int count = 0;
	cin >> N;
	vector<int> vec(N);
	for (int i = 0; i < N; ++i) cin >> vec[i];
	sort(vec.begin(), vec.end());
	for (int i = 0; i < N; i++){
		for (int j = 0; j < i; j++) {
			for (int k = 0; k < j; k++) {
				if (vec[k] != vec[j] and vec[i] != vec[j] and
					vec[k] + vec[j] > vec[i]) {
					count++;
			}
		}
	
	}
	cout << count;
}


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

public static void main(String [] args){
	Scanner scanner = new Scanner(System.in);
  
  	String input = scanner.next();
	int num;
    for(int i = 0; i < 3; i++){
    	if(input.charAt(i) == 'R')
          num++;
    }
  
  	System.out.println(num);
}

Compiler output:
Main.java:1: 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)
1 error
Language: C++

#include <iostream>

using namespace std;

int main(){
  string test1;
  cin >> test;
  cout << test1 << endl;
  
  
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:10: error: 'test' was not declared in this scope; did you mean 'test1'?
    7 |   cin >> test;
      |          ^~~~
      |          test1
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:9:9: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
    9 |     if(x=="R"){
      |        ~^~~~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main()
{
  string s;
  cin>>s;
  if(s[0]=='S' && s[1]=='S' && s[i]=='S')
     cout<<0<<endl;
    else if((s[0]=='R' && s[1]=='R' && s[2]=='S') || (s[0]=='S' && s[1]=='R' && s[2]=='R'))
     cout<<2<<endl;
     else if((s[0]=='R' && s[1]=='S' && s[2]=='S') || (s[0]=='S' && s[1]=='R' && s[2]=='S') || (s[0]=='S' && s[1]=='S' && s[2]=='R') || (s[0]=='R' && s[1]=='S' && s[2]=='R'))
     cout<<1<<endl;
     else
     cout<<3<<endl;
     }

Compiler output:
a.cc: In function 'int main()':
a.cc:7:34: error: 'i' was not declared in this scope
    7 |   if(s[0]=='S' && s[1]=='S' && s[i]=='S')
      |                                  ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main()
{
  string s;
  cin>>s;
  if(s[0]=='S' && s[1]=='S && s[i]=='S')
     cout<<0<<endl;
    else if((s[0]=='R' && s[1]=='R' && s[2]=='S') || (s[0]=='S' && s[1]=='R' && s[2]=='R'))
     cout<<2<<endl;
     else if((s[0]=='R' && s[1]=='S' && s[2]=='S') || (s[0]=='S' && s[1]=='R' && s[2]=='S') || (s[0]=='S' && s[1]=='S' && s[2]=='R') || (s[0]=='R' && s[1]=='S' && s[2]=='R'))
     cout<<1<<endl;
     else
     cout<<3<<endl;
     }
 

Compiler output:
a.cc:7:25: warning: multi-character literal with 11 characters exceeds 'int' size of 4 bytes
    7 |   if(s[0]=='S' && s[1]=='S && s[i]=='S')
      |                         ^~~~~~~~~~~~~~
a.cc:7:39: warning: missing terminating ' character
    7 |   if(s[0]=='S' && s[1]=='S && s[i]=='S')
      |                                       ^
a.cc:7:39: error: missing terminating ' character
    7 |   if(s[0]=='S' && s[1]=='S && s[i]=='S')
      |                                       ^~
a.cc: In function 'int main()':
a.cc:7:25: error: unable to find character literal operator 'operator""S' with 'int' argument
    7 |   if(s[0]=='S' && s[1]=='S && s[i]=='S')
      |                         ^~~~~~~~~~~~~~
a.cc:9:5: error: expected primary-expression before 'else'
    9 |     else if((s[0]=='R' && s[1]=='R' && s[2]=='S') || (s[0]=='S' && s[1]=='R' && s[2]=='R'))
      |     ^~~~
a.cc:8:20: error: expected ')' before 'else'
    8 |      cout<<0<<endl;
      |                    ^
      |                    )
    9 |     else if((s[0]=='R' && s[1]=='R' && s[2]=='S') || (s[0]=='S' && s[1]=='R' && s[2]=='R'))
      |     ~~~~            
a.cc:7:5: note: to match this '('
    7 |   if(s[0]=='S' && s[1]=='S && s[i]=='S')
      |     ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
typedef long long int ll;
#define mod 1000000007
ll expo(ll a,ll b)
{
  if(b==0)return 1;
  ll p=expo(a,b/2);
  p=p;
  p=(p*p);
 
  return b&1? (p*a)%mod :p;
}
ll bC(ll n, ll k)  
{  
  ll res = 1; 
  if ( k > n - k )  
  k = n - k;  
  for (ll i = 0; i < k; ++i)  
  {  
  res *= (n - i);  
  res /= (i + 1);  
  }  
  
  return res;  
}  

int main(int argc, char const *argv[])
{ 
 ios_base::sync_with_stdio(false);
 cin.tie(NULL);


 string s;
 cin>>s;
 int r=0;
int ans=0;
 for(int i=0;i<n;i++)
 {
  if(s[i]=='R')r++;
  else{
    ans=max(ans,r);
    r=0;
  }
 }
ans=max(ans,r);
 cout<<ans<<endl;

}
 
 

Compiler output:
a.cc: In function 'int main(int, const char**)':
a.cc:38:16: error: 'n' was not declared in this scope
   38 |  for(int i=0;i<n;i++)
      |                ^
Language: Java

package mondaisyu5;

import java.util.*;

public class App {

	public static void main(String[] args){
		Scanner sc =new Scanner(System.in);
	  	String s=sc.next();
	  int c=0;
	  for(int i=0;i<=2;i++){
	  if( s.charAt(i)=='R'){
	    c++;
	    }
	  
	  else{
	    c=0;
	  }
	  }
	  System.out.println(c);

	}
}

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

public class A {
	public static void main(String[] args) {
		 Scanner stdin = new Scanner(System.in);

		String S = stdin.nextString();
		if(S == "SSS") {
			System.out.println("0");
		}
		else if(S == "SSR" || S=="SRS" ||S=="RSS" || S=="RSR") {
			System.out.println("1");
		}
		else if(S == "SRR" || S=="RRS") {
			System.out.println("2");
		}
		else if(S == "RRR") {
			System.out.println("3");
		}
	}

}


Compiler output:
Main.java:1: error: class A is public, should be declared in a file named A.java
public class A {
       ^
Main.java:3: error: cannot find symbol
		 Scanner stdin = new Scanner(System.in);
		 ^
  symbol:   class Scanner
  location: class A
Main.java:3: error: cannot find symbol
		 Scanner stdin = new Scanner(System.in);
		                     ^
  symbol:   class Scanner
  location: class A
3 errors
Language: Java

public class A {
	public static void main(String[] args) {
		String S;
		if(S == "SSS")
			System.out.println("0");
		else if(S == "SSR" || "SRS" ||"RSS" || "RSR")
			System.out.println("1");
		else if(S == "SRR" || "RRS")
			System.out.println("2");
		else if(S == "RRR")
			System.out.println("3");

	}

}


Compiler output:
Main.java:1: error: class A is public, should be declared in a file named A.java
public class A {
       ^
Main.java:6: error: bad operand types for binary operator '||'
		else if(S == "SSR" || "SRS" ||"RSS" || "RSR")
		                   ^
  first type:  boolean
  second type: String
Main.java:8: error: bad operand types for binary operator '||'
		else if(S == "SRR" || "RRS")
		                   ^
  first type:  boolean
  second type: String
3 errors
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();
      	String[] Rain = S.split("S");
      	
      	int max_r = 0;
      	for(String r : Rain){
        	if(r < r.length()){
            	max_r = r.length();
            }
        }
    System.out.println(max_r);
    }
}

Compiler output:
Main.java:10: error: bad operand types for binary operator '<'
        	if(r < r.length()){
        	     ^
  first type:  String
  second type: int
1 error
Language: C++

#include<iostream>

using namespace std;

int main(){
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  string s;
  cin >> s;
  if(s[0]=='R){
     if(s[1]=='R'){
     	if(s[2]=='R'){
          cout << 3 << "\n";
        }else cout << 2 << "\n";
     }else cout << 1 << "\n";
  }else if(s[1]=='R'){
    	if(s[2]=='R') cout << 2 << "\n";
    	else cout << 1 << "\n";
  }else if(s[2]=='R') cout << 1 << "\n";
   else cout << 0 << "\n";
}

Compiler output:
a.cc:10:12: warning: missing terminating ' character
   10 |   if(s[0]=='R){
      |            ^
a.cc:10:12: error: missing terminating ' character
   10 |   if(s[0]=='R){
      |            ^~~~
a.cc: In function 'int main()':
a.cc:11:6: error: expected primary-expression before 'if'
   11 |      if(s[1]=='R'){
      |      ^~
a.cc:15:7: error: expected primary-expression before 'else'
   15 |      }else cout << 1 << "\n";
      |       ^~~~
a.cc:15:7: error: expected ')' before 'else'
   15 |      }else cout << 1 << "\n";
      |       ^~~~
      |       )
a.cc:10:5: note: to match this '('
   10 |   if(s[0]=='R){
      |     ^
a.cc: At global scope:
a.cc:16:4: error: expected unqualified-id before 'else'
   16 |   }else if(s[1]=='R'){
      |    ^~~~
a.cc:19:4: error: expected unqualified-id before 'else'
   19 |   }else if(s[2]=='R') cout << 1 << "\n";
      |    ^~~~
a.cc:20:4: error: expected unqualified-id before 'else'
   20 |    else cout << 0 << "\n";
      |    ^~~~
a.cc:21:1: error: expected declaration before '}' token
   21 | }
      | ^
Language: C

#include<cstdio>
int max(int x,int y){
	return x>y?x:y;
}
char ch;
int sum,ans;
int main(){
	for(int i=1;i<=3;++i){
		ch=getchar();
		if(ch=='S'){
			ans=max(ans,sum);
			sum=0;
		}
		else sum++;
	}
	ans=max(ans,sum);
	printf("%d",ans);
	return 0;
}

Compiler output:
main.c:1:9: fatal error: cstdio: No such file or directory
    1 | #include<cstdio>
      |         ^~~~~~~~
compilation terminated.
Language: C++

#include <iostream>

int main()
{
  char a[3];
  std::cin >> a;
    
  bool _1 = a[0] == 'R';
  bool _2 = a[1] == 'R';
  bool _3 = a[2] == 'R';
  
  if (_1 && _2 && _3){
    std::cout << '3'
  }else if( (_1 && _2) || (_2 && _3) ){
    std::cout << '2'
  }else if(_1 || _2 || _3){
    std::cout << '1'
  }else{
    std::cout << '0'
  }
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:21: error: expected ';' before '}' token
   13 |     std::cout << '3'
      |                     ^
      |                     ;
   14 |   }else if( (_1 && _2) || (_2 && _3) ){
      |   ~                  
a.cc:15:21: error: expected ';' before '}' token
   15 |     std::cout << '2'
      |                     ^
      |                     ;
   16 |   }else if(_1 || _2 || _3){
      |   ~                  
a.cc:17:21: error: expected ';' before '}' token
   17 |     std::cout << '1'
      |                     ^
      |                     ;
   18 |   }else{
      |   ~                  
a.cc:19:21: error: expected ';' before '}' token
   19 |     std::cout << '0'
      |                     ^
      |                     ;
   20 |   }
      |   ~
Language: C++

#include <stdio.h>
#include <std.h>


int main()
{
  std::string instr;
  
  Cin >>instr ;
  
  printf("1");
  retunr 0;
}

Compiler output:
a.cc:2:10: fatal error: std.h: No such file or directory
    2 | #include <std.h>
      |          ^~~~~~~
compilation terminated.
Language: C++

package main

import (
    "bufio"
    "fmt"
    "os"
)

var sc = bufio.NewScanner(os.Stdin)

func main() {
    var s string
    ans, tmp := 0, 0
    if sc.Scan() {
        s = sc.Text()
    }
  	for i:=0; i<3; i++ {
    	if s[i] == 'R' {
        	tmp++;
        } else {
        	if ans < tmp {
            	ans = tmp
            }
          	tmp = 0
        }
    }
  	if ans < tmp {
  		ans = tmp
    }
  	fmt.Println(ans)
}

Compiler output:
a.cc:1:1: error: 'package' does not name a type
    1 | package main
      | ^~~~~~~
Language: Java

import java.util.Scanner;

public class Main{
	public static void main(String args[]){
      test2();
    }

    private static void test_mine(){
        Scanner scan = new Scanner(System.in);
        String s = scan.next();

        int count = 0;
        if(s.charAt(1) == 'S'){
            if(s.charAt(0) == 'R' || s.charAt(2) == 'R')
                count = 1;
            else
                count = 0;
        }else{
            if(s.charAt(0) == 'R'){
                if(s.charAt(2) == 'R'){
                    count = 3;
                }else{
                    count = 2;
                }
            }else if(s.charAt(2) == 'R'){
                if(s.charAt(0) == 'R'){
                    count = 3;
                }else{
                    count = 2;
                }
            }else
                count = 1;
            }
        System.out.println(count);
    }

    private static void test_ans(){
        Scanner scan = new Scanner(System.in);
        String s = scan.next();
        
        boolean p = s.charAt(0) == 'R';
        boolean q = s.charAt(1) == 'R';
        boolean r = s.charAt(2) == 'R';

        int count = 0;
        if(p && q && r)
            count = 3;
        else if((p && q) || (q && r))
            count = 2;
        else if(p || q || r)
            count = 1;
        else
            count = 0;

        System.out.println(count);
    }
}

Compiler output:
Main.java:5: error: cannot find symbol
      test2();
      ^
  symbol:   method test2()
  location: class Main
1 error
Language: C++

#include "pch.h"
#include <iostream>

using namespace std;

int main() {
	char wea;
	int c = 0;
	for(int i = 0; i <= 2; i++){
		cin >> wea;
		if (wea == 'R'){
			c = c + 1;
		}
	}
	cout << c;
	return 0;
}

Compiler output:
a.cc:1:10: fatal error: pch.h: No such file or directory
    1 | #include "pch.h"
      |          ^~~~~~~
compilation terminated.
Language: Java

import java.util.*;


public class RainySeason {

	public static void main(String[] args) {
		// TODO Auto-generated method stub
		String S = new String();
		S="SRS";
		int count=0;
		if (S.equals("SSS")) {
			count = 0;
		} else if (S.equals("RSS") || S.equals("SSR") || S.equals("RRS")) {
			count = 2;
		} else if (S.equals("RRR")) {
			count = 3;
		} else {
			count = 1;
		}
		System.out.print(count);
	}
}


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


public class RainySeason {

	public static void main(String[] args) {
		// TODO Auto-generated method stub
		String S = new String();
		S="SRS";
		int count=0;
		if (S.equals("SSS")) {
			count = 0;
		} else if (S.equals("RSS") || S.equals("SSR") || S.equals("RRS")) {
			count = 2;
		} else if (S.equals("RRR")) {
			count = 3;
		} else {
			count = 1;
		}
		System.out.print(count);
	}
}


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

public class RainySeason {

	public static void main(String[] args) {
		// TODO Auto-generated method stub
		String S = new String();
		S="SRS";
		int count=0;
		if (S.equals("SSS")) {
			count = 0;
		} else if (S.equals("RSS") || S.equals("SSR") || S.equals("RRS")) {
			count = 2;
		} else if (S.equals("RRR")) {
			count = 3;
		} else {
			count = 1;
		}
		System.out.print(count);
	}
}

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

public static void main(String[] args) {
		// TODO Auto-generated method stub
		String S = new String();

		int count=0;
		if (S.equals("SSS")) {
			count = 0;
		} else if (S.equals("RSS") || S.equals("SSR") || S.equals("RRS")) {
			count = 2;
		} else if (S.equals("RRR")) {
			count = 3;
		} else {
			count = 1;
		}

	}

Compiler output:
Main.java:1: 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)
1 error
Language: Java


public class RainySeason {

	public static void main(String[] args) {
		// TODO Auto-generated method stub
		String S = new String();

		int count;
		if (S.equals("SSS")) {
			count = 0;
		} else if (S.equals("RSS") || S.equals("SSR") || S.equals("RRS")) {
			count = 2;
		} else if (S.equals("RRR")) {
			count = 3;
		} else {
			count = 1;
		}

	}
}


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


public class RainySeason {

	public static void main(String[] args) {
		// TODO Auto-generated method stub
		String S[] = new String[3];
		for (String s : S) {
			int count;
			if (s.equals("SSS")) {
				count = 0;
			} else if (s.equals("RSS") || s.equals("SSR") || s.equals("RRS")) {
				count = 2;
			} else if (s.equals("RRR")) {
				count = 3;
			} else {
				count = 1;
			}

		}
	}

}


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

from sys import exit
import math
ii = lambda : int(input())
mi = lambda : map(int,input().split())
li = lambda : list(map(int,input().split()))

s = input()

if s=='RRR':
    print(3)
elif 'RR' in s:
    print(2)
elif s=='SSS':
    print(0)
else:
    print(1)

Compiler output:
a.cc:9:7: warning: multi-character character constant [-Wmultichar]
    9 | if s=='RRR':
      |       ^~~~~
a.cc:11:6: warning: multi-character character constant [-Wmultichar]
   11 | elif 'RR' in s:
      |      ^~~~
a.cc:13:9: warning: multi-character character constant [-Wmultichar]
   13 | elif s=='SSS':
      |         ^~~~~
a.cc:1:1: error: 'from' does not name a type
    1 | from sys import exit
      | ^~~~
Language: C++

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

int main() {
 string S;
  cin >> S;
  int ans = 0;
  if(S[1] == 'S'){
     if(S[0] == 'R'){
ans++;
     }
    if(S[2] == 'R'){
      ans++;
    }
  
}
    if(S[1] == 'R'){
      ans++;
    }
      if(S[0] == 'R'){
        ans++;
      }
      if(S[2] == 'R'){
        ans++
    }
  
 
}


Compiler output:
a.cc: In function 'int main()':
a.cc:25:14: error: expected ';' before '}' token
   25 |         ans++
      |              ^
      |              ;
   26 |     }
      |     ~
Language: C++

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

int main() {
 string S;
  cin >> S;
  int ans = 0;
  if(S[1] == 'S'){
     if(S[0] == 'R'){
ans++;
     }      
    if(S[2] == 'R'){
      ans++;
    }
  }
}
    if(S[1] == 'R'){
      ans++;
      if(S[0] == 'R'){
        ans++;
      if(S[2] == 'R'){
        ans++
    }
  }
}
 
}


Compiler output:
a.cc:18:5: error: expected unqualified-id before 'if'
   18 |     if(S[1] == 'R'){
      |     ^~
a.cc:28:1: error: expected declaration before '}' token
   28 | }
      | ^
Language: C++

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

int main() {
 string S;
  cin >> S;
  int ans = 0;
  if(S[1] == 'S'){
     if(S[0] == 'R')ans++;
       if(S[2] == 'R')ans++;
    }
  }
}
    if(S[1] == 'R'){
      ans++;
      if(S[0] == 'R')ans++;
      if(S[2] == 'R')ans++
    }
  }
}
 
}


Compiler output:
a.cc:14:1: error: expected declaration before '}' token
   14 | }
      | ^
a.cc:15:5: error: expected unqualified-id before 'if'
   15 |     if(S[1] == 'R'){
      |     ^~
a.cc:20:3: error: expected declaration before '}' token
   20 |   }
      |   ^
a.cc:21:1: error: expected declaration before '}' token
   21 | }
      | ^
a.cc:23:1: error: expected declaration before '}' token
   23 | }
      | ^
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:7:13: error: 'SSS' was not declared in this scope
    7 |    if (S == SSS) {cout << 3 << endl;}
      |             ^~~
a.cc:8:18: error: 'SSR' was not declared in this scope
    8 |    else if (S == SSR) {cout << 2 << endl;}
      |                  ^~~
a.cc:9:18: error: 'RSS' was not declared in this scope
    9 |    else if (S == RSS) {cout << 2 << endl;}
      |                  ^~~
a.cc:10:18: error: 'SRS' was not declared in this scope
   10 |    else if (S == SRS) {cout << 1 << endl;}
      |                  ^~~
a.cc:11:18: error: 'SRR' was not declared in this scope
   11 |    else if (S == SRR) {cout << 1 << endl;}
      |                  ^~~
a.cc:12:18: error: 'RSR' was not declared in this scope
   12 |    else if (S == RSR) {cout << 1 << endl;}
      |                  ^~~
a.cc:13:18: error: 'RRS' was not declared in this scope
   13 |    else if (S == RRS) {cout << 1 << endl;}
      |                  ^~~
a.cc:14:18: error: 'RRR' was not declared in this scope
   14 |    else if (S == RRR) {cout << 0 << endl;}
      |                  ^~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main()
{
    string s;
    cin>>s;
    if((s[0]=='R'&&s[1]=='R')||(s[1]=='R'&&s[2]=='R'))
    cout<<"2"<<endl;
    else if(s[0]=='R'||s[1]=='R'||s[2]=='R')
    cout<<"1"<<endl;
    else
    {
        cout<<0<<endl;
    }
    
    return 0;
    


Compiler output:
a.cc: In function 'int main()':
a.cc:16:14: error: expected '}' at end of input
   16 |     return 0;
      |              ^
a.cc:4:1: note: to match this '{'
    4 | {
      | ^
Language: Java

import java.util.*;
import java.io.*;
public class atc
{
    public static void main(String[] args)
    {
        Scanner scan = new Scanner(System.in);
        String str = scan.next();
        if(str.equals("SSS"))
            System.out.println(0);
        if(str.equals("SSR"))
            System.out.println(1); 
        if(str.equals("SRS"))
            System.out.println(1);
        if(str.equals("SRR"))
            System.out.println(2);
        if(str.equals("RSS"))
            System.out.println(1);
        if(str.equals("RSR"))
            System.out.println(1);
        if(str.equals("RRS"))
            System.out.println(2);
        if(str.equals("RRR"))
            System.out.println(3);
    }
}


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

C#include <iostream>
using namespace std;

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


Compiler output:
a.cc:1:2: error: stray '#' in program
    1 | C#include <iostream>
      |  ^
a.cc:1:1: error: 'C' does not name a type
    1 | C#include <iostream>
      | ^
a.cc: In function 'int main()':
a.cc:6:5: error: 'string' was not declared in this scope
    6 |     string s;
      |     ^~~~~~
a.cc:7:5: error: 'cin' was not declared in this scope
    7 |     cin>>s;
      |     ^~~
a.cc:7:10: error: 's' was not declared in this scope
    7 |     cin>>s;
      |          ^
a.cc:10:9: error: 'cout' was not declared in this scope
   10 |         cout<<"2"<<endl;
      |         ^~~~
a.cc:10:20: error: 'endl' was not declared in this scope
   10 |         cout<<"2"<<endl;
      |                    ^~~~
a.cc:14:9: error: 'cout' was not declared in this scope
   14 |         cout<<"3"<<endl;
      |         ^~~~
a.cc:14:20: error: 'endl' was not declared in this scope
   14 |         cout<<"3"<<endl;
      |                    ^~~~
a.cc:18:9: error: 'cout' was not declared in this scope
   18 |         cout<<"0"<<endl;
      |         ^~~~
a.cc:18:20: error: 'endl' was not declared in this scope
   18 |         cout<<"0"<<endl;
      |                    ^~~~
a.cc:22:9: error: 'cout' was not declared in this scope
   22 |         cout<<"1"<<endl;
      |         ^~~~
a.cc:22:20: error: 'endl' was not declared in this scope
   22 |         cout<<"1"<<endl;
      |                    ^~~~
a.cc:26:9: error: 'cout' was not declared in this scope
   26 |         cout<<"1"<<endl;
      |         ^~~~
a.cc:26:20: error: 'endl' was not declared in this scope
   26 |         cout<<"1"<<endl;
      |                    ^~~~
a.cc:30:9: error: 'cout' was not declared in this scope
   30 |         cout<<"0"<<endl;
      |         ^~~~
a.cc:30:20: error: 'endl' was not declared in this scope
   30 |         cout<<"0"<<endl;
      |                    ^~~~
a.cc:34:9: error: 'cout' was not declared in this scope
   34 |         cout<<"1"<<endl;
      |         ^~~~
a.cc:34:20: error: 'endl' was not declared in this scope
   34 |         cout<<"1"<<endl;
      |                    ^~~~
Language: Java

import java.util.Scanner;

public class TaskA {

    public static void main(String[] args) {
        Scanner s = new Scanner(System.in);
        String str = s.next();
        char[] ch = str.toCharArray();
        int i = 0;
        int maxcount = 0;
        while(i < ch.length) {
            if(ch[i] != 'R') {
                i++;
                continue;
            }
            int count= 0;
            while ( i < ch.length && ch[i] == 'R') {
                count++;
                i++;
            }

            maxcount = Math.max(maxcount, count);
            i++;
        }

        System.out.println(maxcount);
    }

}


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