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

#include <iostream>
using namespace std;

int main(){
    string S;
    cin >> S;
    
    bool p S[0] == R;
    bool q S[1] == R;
    bool r S[2] == R;
    
    if (p and q and r) {
        cout << 3 << endl;
    } else if ((p and q) or (q and r)) {
        cout << 2 << endl;
    } else if (p or q or r) {
        cout << 1 << endl;
    } else {
        cout << 0 << endl;
    }
 
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:12: error: expected initializer before 'S'
    8 |     bool p S[0] == R;
      |            ^
a.cc:9:12: error: expected initializer before 'S'
    9 |     bool q S[1] == R;
      |            ^
a.cc:10:12: error: expected initializer before 'S'
   10 |     bool r S[2] == R;
      |            ^
a.cc:12:9: error: 'p' was not declared in this scope
   12 |     if (p and q and r) {
      |         ^
a.cc:12:15: error: 'q' was not declared in this scope
   12 |     if (p and q and r) {
      |               ^
a.cc:12:21: error: 'r' was not declared in this scope
   12 |     if (p and q and r) {
      |                     ^
Language: C

#include <stdio.h>
int main(){
  char S[3];
  int count=0;
  setbuf(stdout,NULL);
  scanf("%s",S);
  if(S[0]==R){
    count++;
    if(S[1]==R){
      count++;
      if(S[2]==R){
        count++;
      }
    }
  }
  else if(S[1]==R){
    count++;
    if(S[2]==R){
      count++;
    }
  }
  else if(S[2]==R){
    count++;
  }
  printf("%d",count);
  return 0;
}


Compiler output:
main.c: In function 'main':
main.c:7:12: error: 'R' undeclared (first use in this function)
    7 |   if(S[0]==R){
      |            ^
main.c:7:12: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include <stdio.h>
int main(){
  char S[3];
  int count=0;
  setbuf(stdout,NULL);
  scanf("%s",S);
  if(S[1]==R){
    count++;
    if(S[2]==R){
      count++;
      if(S[3]==R){
        count++;
      }
    }
  }
  if(S[2]==R){
    count++;
    if(S[3]==R){
      count++;
    }
  }
  if(S[3]==R){
    count++;
  }
  printf("%d",count);
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:7:12: error: 'R' undeclared (first use in this function)
    7 |   if(S[1]==R){
      |            ^
main.c:7:12: note: each undeclared identifier is reported only once for each function it appears in
Language: Java

public static void main(args )
  
  

Compiler output:
Main.java:1: error: unnamed classes are a preview feature and are disabled by default.
public static void main(args )
              ^
  (use --enable-preview to enable unnamed classes)
Main.java:1: error: <identifier> expected
public static void main(args )
                            ^
Main.java:1: error: reached end of file while parsing
public static void main(args )
                              ^
3 errors
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:9:16: error: no post-increment operator for type
    9 |           count++;
      |                ^~
a.cc:12:23: error: overloaded function with no contextual type information
   12 |                 count=0;
      |                       ^
a.cc:14:15: error: invalid operands of types 'int' and '<unresolved overloaded function type>' to binary 'operator<'
   14 |         if(max<count){
      |            ~~~^~~~~~
a.cc:15:21: error: cannot resolve overloaded function 'count' based on conversion to type 'int'
   15 |                 max=count;
      |                     ^~~~~
Language: C++

#include <iostream>
using namespace std;
 
int main()
{
	string wheather;
  	cin>>wheather;
  	char cnt=0; 
  	char maxcnt=0;
  	
  	for(int loop=0;loop<3;loop++)
    {
      	if(wheather[loop]=='R')
        {
          	cnt++;
          if(maxcnt=<cnt)
            maxcnt=cnt;
        }
      	else
          cnt=0;
    }
  	cout<<maxcnt<<endl;
 	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:16:21: error: expected primary-expression before '<' token
   16 |           if(maxcnt=<cnt)
      |                     ^
Language: C++

#include <iostream>
#include <string>

int main() {
	string s;
  	cin >> s;
  	int cnt{0}, res{0};
  	for (char c : s) {
    	if (c == 'S') {
        	cnt = 0;
        } else {
        	cnt++;
        }
      	res = max(res, cnt);
    }
  
  	cout << res << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:9: error: 'string' was not declared in this scope
    5 |         string s;
      |         ^~~~~~
a.cc:5:9: note: suggested alternatives:
In file included from /usr/include/c++/14/iosfwd:41,
                 from /usr/include/c++/14/ios:40,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:1:
/usr/include/c++/14/bits/stringfwd.h:77:33: note:   'std::string'
   77 |   typedef basic_string<char>    string;
      |                                 ^~~~~~
In file included from /usr/include/c++/14/bits/locale_classes.h:40,
                 from /usr/include/c++/14/bits/ios_base.h:41,
                 from /usr/include/c++/14/ios:44:
/usr/include/c++/14/string:76:11: note:   'std::pmr::string'
   76 |     using string    = basic_string<char>;
      |           ^~~~~~
a.cc:6:9: 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:16: error: 's' was not declared in this scope
    6 |         cin >> s;
      |                ^
a.cc:14:15: error: 'max' was not declared in this scope; did you mean 'std::max'?
   14 |         res = max(res, cnt);
      |               ^~~
      |               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)
      |     ^~~
a.cc:17:9: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   17 |         cout << res << endl;
      |         ^~~~
      |         std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:17:24: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   17 |         cout << res << endl;
      |                        ^~~~
      |                        std::endl
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
Language: Java

package test;

import java.io.IOException;

public class Atc {

	public static void main(String[] args) throws IOException {
		int count = 0;
		int res = 0;
		for (int i = 0; i < 3; i++) {
			char data = (char) System.in.read();
			if (data == 'R') {
				count++;
			}
			if (data == 'S') {
				count = 0;
			}
			if (count > res) {
				res = count;
			}
		}
		System.out.println(res);
	}

}

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

package test;

import java.util.Scanner;

public class Atc {

	public static void main(String[] args) {
		Scanner scn = new Scanner(System.in);
		String data = scn.nextLine();
		int count = 0;
		int res = 0;
		for (int i = 0; i < 3; i++) {
			if (data.charAt(i) == 'R') {
				count++;
			}
			if (data.charAt(i) == 'S') {
				count = 0;
			}
			if (count > res) {
				res = count;
			}
		}
		System.out.println(res);
	}

}


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

#include<iostream>
using namespace std;
int main(){
  int ans=0;
  char S[3];
  cin >> S;
  for(i=0:i<3:i++){
  if(S[i]==R){
  ans++;
    }
  }
  if(S[0]==R &&　S[1]==S && S[2]==R){
    ans=1;
}

Compiler output:
a.cc:12:16: error: extended character 　 is not valid in an identifier
   12 |   if(S[0]==R &&　S[1]==S && S[2]==R){
      |                ^
a.cc: In function 'int main()':
a.cc:7:7: error: 'i' was not declared in this scope
    7 |   for(i=0:i<3:i++){
      |       ^
a.cc:12:3: error: expected primary-expression before 'if'
   12 |   if(S[0]==R &&　S[1]==S && S[2]==R){
      |   ^~
a.cc:11:4: error: expected ';' before 'if'
   11 |   }
      |    ^
      |    ;
   12 |   if(S[0]==R &&　S[1]==S && S[2]==R){
      |   ~~
a.cc:12:3: error: expected primary-expression before 'if'
   12 |   if(S[0]==R &&　S[1]==S && S[2]==R){
      |   ^~
a.cc:11:4: error: expected ')' before 'if'
   11 |   }
      |    ^
      |    )
   12 |   if(S[0]==R &&　S[1]==S && S[2]==R){
      |   ~~
a.cc:7:6: note: to match this '('
    7 |   for(i=0:i<3:i++){
      |      ^
a.cc:12:12: error: 'R' was not declared in this scope
   12 |   if(S[0]==R &&　S[1]==S && S[2]==R){
      |            ^
a.cc:12:16: error: '\U00003000S' was not declared in this scope
   12 |   if(S[0]==R &&　S[1]==S && S[2]==R){
      |                ^~~
a.cc:14:2: error: expected '}' at end of input
   14 | }
      |  ^
a.cc:3:11: note: to match this '{'
    3 | int main(){
      |           ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
  string s;
  cin >> s;
  bool p = s.at(0) =="R";
  bool q = s.at(1) =="R";
  bool r = s.at(2) =="R";
  if(p and q and r){
    cout << "3" << endl;
  }else if((p and q) or( q and r)){
    cout << "2" << endl;
  }else if(p or q or r){
    cout << "1" << endl;
  }else{
    cout << "0" << endl;
  }
}


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

#include<bits/stdc++.h>
using namespace std;
int main(){
  string s;
  cin >> s;
  bool p = s.at(0) =="R"
  bool q = s.at(1) =="R"
  bool r = s.at(2) =="R"
  if(p and q and r){
    cout << "3" << endl;
  }else if((p and q) or( q and r)){
    cout << "2" << endl;
  }else if(p or q or r){
    cout << "1" << endl;
  }else{
    cout << "0" << endl;
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:20: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
    6 |   bool p = s.at(0) =="R"
      |            ~~~~~~~~^~~~~
a.cc:7:3: error: expected ',' or ';' before 'bool'
    7 |   bool q = s.at(1) =="R"
      |   ^~~~
a.cc:11:4: error: 'else' without a previous 'if'
   11 |   }else if((p and q) or( q and r)){
      |    ^~~~
a.cc:11:19: error: 'q' was not declared in this scope
   11 |   }else if((p and q) or( q and r)){
      |                   ^
a.cc:11:32: error: 'r' was not declared in this scope
   11 |   }else if((p and q) or( q and r)){
      |                                ^
Language: C++

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


Compiler output:
a.cc: In function 'int main()':
a.cc:6:10: error: 'RRS' was not declared in this scope
    6 |   if(s = RRS|| s = SRR){
      |          ^~~
a.cc:6:20: error: 'SRR' was not declared in this scope
    6 |   if(s = RRS|| s = SRR){
      |                    ^~~
a.cc:8:16: error: 'SRS' was not declared in this scope
    8 |   }else if(s = SRS|| s = RSS||s=SSR){
      |                ^~~
a.cc:8:26: error: 'RSS' was not declared in this scope
    8 |   }else if(s = SRS|| s = RSS||s=SSR){
      |                          ^~~
a.cc:8:33: error: 'SSR' was not declared in this scope
    8 |   }else if(s = SRS|| s = RSS||s=SSR){
      |                                 ^~~
a.cc:10:14: error: 'RRR' was not declared in this scope
   10 |   }else if(s=RRR){
      |              ^~~
a.cc: At global scope:
a.cc:16:1: error: expected declaration before '}' token
   16 | }
      | ^
Language: C++

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

int FindRainyDays(string& S) {
  int max_length = 0;
  int count = 0;
  for (int second = 0; second < S.length(); ++second) {
    if (S[i] == 'R') {
      count++;
    }
    else {
      max_length = max(max_length, count);
      count = 0;
    }
  }
  return max_length;
}

int main() {
  string S;
  cin >> S;
  cout << FindRainyDays(S) << endl;
}
  

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

import sys
sys.setrecursionlimit(10**7)

def input(): return sys.stdin.readline()[:-1]
mod = 10**9 + 7
def readInt():return int(input())
def readIntList():return list(map(int,input().split()))
def readStringList():return list(input())
def readStringListWithSpace():return list(input().split())
def readString():return input()

days = readStringList()
# print(days)
count = 0 if days[0] != 'R' else 1
res = 0
for i in range(1,3):
    if days[i] == 'R' and days[i-1] == 'R':
        count += 1
    elif days[i] == 'R':
        count = 1
    else:
        count = 0
    res = max(res,count)
print(res)

Compiler output:
a.cc:13:3: error: invalid preprocessing directive #print
   13 | # print(days)
      |   ^~~~~
a.cc:1:1: error: 'import' does not name a type
    1 | import sys
      | ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
Language: C++

s = str(input())
ans = 0
tmp = 0
for i in range(len(s)):
    if(s[i] == 'R'):
        tmp += 1
    else:
        ans = tmp
        tmp = 0

print(ans)

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

#include<stdio.h>
int main()
{if(c[0]=='R' && c[1]=='R' && c[2]=='R')
    char c[3];
    {
        scanf("%s",c);
        if(c[0]=='R' && c[1]=='R' && c[2]=='R')
        {
            printf("3\n");
        }
        if(c[0]=='R' && c[1]=='R' && c[2]=='s')
        {
            printf("2\n");
        }
        if(c[0]=='S' && c[1]=='R' && c[2]=='R')
        {
            printf("2\n");
        }
        if(c[0]=='R' && c[1]=='S' && c[2]=='R')
        {
            printf("1\n");
        }
        if(c[0]=='S' && c[1]=='R' && c[2]=='S')
        {
            printf("1\n");
        }
        if(c[0]=='S' && c[1]=='S' && c[2]=='S')
        {
            printf("0\n");
        }
        if(c[0]=='R' && c[1]=='S' && c[2]=='S')
        {
            printf("1\n");
        }
        if(c[0]=='S' && c[1]=='S' && c[2]=='R')
        {
            printf("1\n");
        }
    }
    return 0;
}

Compiler output:
main.c: In function 'main':
main.c:3:5: error: 'c' undeclared (first use in this function)
    3 | {if(c[0]=='R' && c[1]=='R' && c[2]=='R')
      |     ^
main.c:3:5: note: each undeclared identifier is reported only once for each function it appears in
main.c:4:5: error: expected expression before 'char'
    4 |     char c[3];
      |     ^~~~
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 count = 0;
  int cnt = 0;
  rep(i,3){
    if(S[i] == 'R'){
      count++;
    }
    else{
      int count = 0;
  }
  }
  int cnt = max(count,cnt);
  cout << cnt << endl;
  }


Compiler output:
a.cc: In function 'int main()':
a.cc:18:7: error: redeclaration of 'int cnt'
   18 |   int cnt = max(count,cnt);
      |       ^~~
a.cc:9:7: note: 'int cnt' previously declared here
    9 |   int cnt = 0;
      |       ^~~
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:11:12: error: expected '(' before '{' token
   11 |     else if{
      |            ^
      |            (
Language: C

// #include<bits/stdc++.h>
#include<iostream>
#include<queue>
#include<stack>
#include<array>
#include<list>
#include<forward_list>
#include<vector>
#include<deque>
#include<set>
#include<map>
#include<unordered_map>
#include<unordered_set>
#include<cmath>
#include<algorithm>
#include<cstring>
#include<utility>
#include<functional>
using namespace std;

#define Fo(i,k,n) for(i=k;i<n;i++)
#define fo(i,n) for(i=0;i<n;i++)
#define deb(x) cout<<#x<<" "<<x<<endl;
void prtv(vector<int>&v){
    for(auto i:v){
        cout<<i<<" ";
    }
    cout<<endl;
}

template<typename T> void print_queue(T q){
    while (!q.empty())
    {
        cout<<q.top()<<" ";
        q.pop();
    }
    cout<<endl;
}


int dp[3001][3001][4];

int solve(vector<vector<int>>&arr,int row,int col,int k){
    if((row==1 && col==1) && k>0) return arr[row-1][col-1];
    if((row==1 && col==1) && k==0) return 0;

    if(dp[row][col][k]!=-1) return dp[row][col][k];

    if(row==1 && k>0) 
        return dp[row][col][k] = max(arr[row-1][col-1]+solve(arr,row,col-1,k-1),solve(arr,row,col-1,k));
    else if(row==1 && k==0)
        return dp[row][col][k] = solve(arr,row,col-1,k);
    if(col==1 && k>0) 
        return dp[row][col][k] = max(arr[row-1][col-1]+solve(arr,row-1,col,k=3),solve(arr,row-1,col,k=3));
    else if(col==1 && k==0)
        return dp[row][col][k] = solve(arr,row-1,col,k=3);
    
    
    if(k>0){
        return dp[row][col][k] = max(max(arr[row-1][col-1]+solve(arr,row-1,col,k=3),solve(arr,row-1,col,k=3)),
                                    max(arr[row-1][col-1]+solve(arr,row,col-1,k-1),solve(arr,row,col-1,k)));
    }
    else{

        return dp[row][col][k] = max(solve(arr,row-1,col,k=3),solve(arr,row,col-1,k));
    }

}
int main() {
    vector<vector<int>>arr;
    int row,col,k;
    cin>>row>>col>>k;

    // deb(row);deb(col);deb(k);
    for(int i=0;i<=row-1;i++){
        vector<int>v;
        for(int j=0;j<=col-1;j++){
            v.push_back(0);
        }
        arr.push_back(v);
    }
    for(int i=0;i<=k-1;i++){
        int r,c,v;
        cin>>r>>c>>v;
        arr[r-1][c-1]=v;
    }

    memset(dp,-1,sizeof(dp));

    // cout<<endl;
    // for(auto v:arr){
    //     prtv(v);
    // } 
    // cout<<dp[1000][1000][2];
    // cout<<endl;
    int kpar = 3;
    int ans = solve(arr,row,col,kpar);
    cout<<ans<<endl;
    return 0;
}



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

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

int main(){
  int S;
  cin >> S;
  if ans = 1;
  if(S=="RRR") ans = 3;
  if(S=="RRS"||S=="SRR") ans = 2;
  if(S=="SSS") ans = 0;
  cout << ans;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:6: error: expected '(' before 'ans'
    8 |   if ans = 1;
      |      ^~~
      |      (
a.cc:9:7: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
    9 |   if(S=="RRR") ans = 3;
      |      ~^~~~~~~
a.cc:9:16: error: 'ans' was not declared in this scope; did you mean 'abs'?
    9 |   if(S=="RRR") ans = 3;
      |                ^~~
      |                abs
a.cc:10:7: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   10 |   if(S=="RRS"||S=="SRR") ans = 2;
      |      ~^~~~~~~
a.cc:10:17: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   10 |   if(S=="RRS"||S=="SRR") ans = 2;
      |                ~^~~~~~~
a.cc:10:26: error: 'ans' was not declared in this scope; did you mean 'abs'?
   10 |   if(S=="RRS"||S=="SRR") ans = 2;
      |                          ^~~
      |                          abs
a.cc:11:7: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   11 |   if(S=="SSS") ans = 0;
      |      ~^~~~~~~
a.cc:11:16: error: 'ans' was not declared in this scope; did you mean 'abs'?
   11 |   if(S=="SSS") ans = 0;
      |                ^~~
      |                abs
a.cc:12:11: error: 'ans' was not declared in this scope; did you mean 'abs'?
   12 |   cout << ans;
      |           ^~~
      |           abs
Language: C++

use std::io;

fn main(){
    let mut s = String::new();
    io::stdin().read_line(&mut s);

    let mut cnt = 0;
    let mut max = 0;
    for c in s.chars() {
        if c == 'R' {
            cnt += 1;
        }
        if cnt > max {
                max = cnt;
        }
        
        if c != 'R' {
            cnt = 0;
        }
    }
    println!("{}", max);
}

Compiler output:
a.cc:1:1: error: 'use' does not name a type
    1 | use std::io;
      | ^~~
a.cc:3:1: error: 'fn' does not name a type
    3 | fn main(){
      | ^~
Language: C++

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

int main(){
    string s;
    int count=0, f=0;
    cin >> s;
    if (s.at(0) == 'R'){
        count++;
    }
    if(s.at(1) == 'R'){
        count++;
        f=1;
    }
    if(s.at(2) == 'R'{
        count++;
        if(f == 1)count--;
    }
    
}

Compiler output:
a.cc: In function 'int main()':
a.cc:15:22: error: expected ')' before '{' token
   15 |     if(s.at(2) == 'R'{
      |       ~              ^
      |                      )
a.cc:20:1: error: expected primary-expression before '}' token
   20 | }
      | ^
Language: C++

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

int main(){
    string s;
    int count=0, conec=0;
    cin >> s;
    if (s.at(0) == 'R'){
        count++;
    }
    if(s.at(1) == 'R'){
        count++;
        f=1;
    }
    if(s.at(2) == 'R'{
        count++;
        if(f == 1)count--;
    }
    
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:9: error: 'f' was not declared in this scope
   13 |         f=1;
      |         ^
a.cc:15:22: error: expected ')' before '{' token
   15 |     if(s.at(2) == 'R'{
      |       ~              ^
      |                      )
a.cc:20:1: error: expected primary-expression before '}' token
   20 | }
      | ^
Language: Java

import java.util.*;

public class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    
    String S = sc.next();
    int r;
    
    if (S.indexOf("RRR") != -1) r = 3;
    else if (S.indexOf("RR")  != -1) r = 2;
    else if (S.indexOf('R')   != -1) r = 1;
    
    System.out.println(r);
  }
}

Compiler output:
Main.java:14: error: variable r might not have been initialized
    System.out.println(r);
                       ^
1 error
Language: Java

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

/*
	Author:	Koushik Sahu
	Date: 28-Aug-2020 10:17:59 pm
*/

public class ABC175_A {

	static FastScanner fs = new FastScanner();

	public static void main(String[] args) {
		String s;
		s = fs.next();
		int ans = 0;
		int[] arr = new int[3];
		for(int i=0; i<3; i++) {
			if(s.charAt(i)=='R') arr[i] = 1;
			else arr[i] = 0;
		}
		for(int i=1; i<3; i++) {
			if(arr[i]==1) arr[i] += arr[i-1];
		}
		ans = Math.max(arr[0], Math.max(arr[1], arr[2]));
		System.out.println(ans);
	}

	static class FastScanner {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		StringTokenizer st = new StringTokenizer("");

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

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

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

		public int[] readArray(int n) {
			int[] a = new int[n];
			for (int i = 0; i < n; i++)
				a[i] = nextInt();
			return a;
		}

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

		public long[] readLongArray(int n) {
			long[] a = new long[n];
			for (int i = 0; i < n; i++)
				a[i] = nextLong();
			return a;
		}

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

}

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

#include <bits/stdc++.h>
using namespace std;
int main(){
int T=0;
  int X=0;
  string A=[3]
  if(A[0]=='R'){
    T=T+1;
    X=X+1;
  }
  if(T==1){
    if(A[1]=='R'){
      X=X+1;
    }else T=T-1;
  }
  if(T==1){
    if(A[2]=='R'){
      X=X+1;
    }else T=T-1;
  }
  cout<<X<<endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:6:13: error: expected identifier before numeric constant
    6 |   string A=[3]
      |             ^
a.cc: In lambda function:
a.cc:7:3: error: expected '{' before 'if'
    7 |   if(A[0]=='R'){
      |   ^~
a.cc: In function 'int main()':
a.cc:6:12: error: conversion from 'main()::<lambda()>' to non-scalar type 'std::string' {aka 'std::__cxx11::basic_string<char>'} requested
    6 |   string A=[3]
      |            ^~~
a.cc:7:3: error: expected ',' or ';' before 'if'
    7 |   if(A[0]=='R'){
      |   ^~
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main(){
int T=0;
  int X=0;
  string A=[3];
  if(A[0]==R){
    T=T+1;
    X=X+1;
  }
  if(T==1){
    if(A[1]==R){
      X=X+1;
    }else T=T-1;
  }
  if(T==1){
    if(A[2]==R){
      X=X+1;
    }else T=T-1;
  }
  cout<<X<<endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:6:13: error: expected identifier before numeric constant
    6 |   string A=[3];
      |             ^
a.cc: In lambda function:
a.cc:6:15: error: expected '{' before ';' token
    6 |   string A=[3];
      |               ^
a.cc: In function 'int main()':
a.cc:6:12: error: conversion from 'main()::<lambda()>' to non-scalar type 'std::string' {aka 'std::__cxx11::basic_string<char>'} requested
    6 |   string A=[3];
      |            ^~~
a.cc:7:12: error: 'R' was not declared in this scope
    7 |   if(A[0]==R){
      |            ^
a.cc:12:14: error: 'R' was not declared in this scope
   12 |     if(A[1]==R){
      |              ^
a.cc:17:14: error: 'R' was not declared in this scope
   17 |     if(A[2]==R){
      |              ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main(){
int T=0;
  int X=0;
  string A=[3];
  if(A[0]==R){
    T=T+1;
    X=X+1;
  }
  if(T=1){
    if(A[1]==R){
      X=X+1;
    }else T=T-1;
  }
  if(T=1){
    if(A[2]==R){
      X=X+1;
    }else T=T-1;
  }
  cout<<X<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:13: error: expected identifier before numeric constant
    6 |   string A=[3];
      |             ^
a.cc: In lambda function:
a.cc:6:15: error: expected '{' before ';' token
    6 |   string A=[3];
      |               ^
a.cc: In function 'int main()':
a.cc:6:12: error: conversion from 'main()::<lambda()>' to non-scalar type 'std::string' {aka 'std::__cxx11::basic_string<char>'} requested
    6 |   string A=[3];
      |            ^~~
a.cc:7:12: error: 'R' was not declared in this scope
    7 |   if(A[0]==R){
      |            ^
a.cc:12:14: error: 'R' was not declared in this scope
   12 |     if(A[1]==R){
      |              ^
a.cc:17:14: error: 'R' was not declared in this scope
   17 |     if(A[2]==R){
      |              ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main(){
int T=0;
  int X=0;
  string A=[i];
  for(int i=0;i<2;i++){
    if(i==0){
      if(A[i]=='R'){
        T=T+1;
        X=X+1;
      }
    }else if(i=!0){
      if(T==1){
      if(A[i]=='R'){
        X=X+1;
      }else if(A[i]=='s'){
        T=T-1;
      }
      }else if(A[i]=='R'){
        T=T+1;
      }
    }
  }
  cout<<X<<endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:6:13: error: 'i' was not declared in this scope
    6 |   string A=[i];
      |             ^
a.cc: In lambda function:
a.cc:6:15: error: expected '{' before ';' token
    6 |   string A=[i];
      |               ^
a.cc: In function 'int main()':
a.cc:6:12: error: conversion from 'main()::<lambda()>' to non-scalar type 'std::string' {aka 'std::__cxx11::basic_string<char>'} requested
    6 |   string A=[i];
      |            ^~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main(){
int T=0;
  int X=0;
  string A[i];
  for(int i=0;i<2;i++){
    if(i==0){
      if(A[i]=='R'){
        T=T+1;
        X=X+1;
      }
    }else if(i=!0){
      if(T==1){
      if(A[i]=='R'){
        X=X+1;
      }else if(A[i]=='s'){
        T=T-1;
      }
      }else if(A[i]=='R'){
        T=T+1;
      }
    }
  }
  cout<<X<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:12: error: 'i' was not declared in this scope
    6 |   string A[i];
      |            ^
a.cc:9:10: error: 'A' was not declared in this scope
    9 |       if(A[i]=='R'){
      |          ^
a.cc:15:10: error: 'A' was not declared in this scope
   15 |       if(A[i]=='R'){
      |          ^
a.cc:20:16: error: 'A' was not declared in this scope
   20 |       }else if(A[i]=='R'){
      |                ^
Language: C

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

int main(){
        string s;
        cin>>s;
        
        cout<< (s=="RRR"? 3:(s=="RRS" || s=="SRR" ? 2:(s=="SSS" ? 0:1)));
        cout<<"\n";
        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: C++

#include<bits/stdc++.h>
#define ll long long 
#define pb push_back
#define ff first
#define ss second
#define setbits(x)          __builtin_popcountll(x)
#define lp(a,n) for(ll i=a; i<n; i++)
#define lpi(a,n) for(int i=a; i<n; i++)
#define w(t) int t; cin>>t; while(t--)
#define vi vector<int> 
#define vll vector<ll>
#define pll pair<ll, ll>
#define pii pair<int, int>
#define inf 1e9
#define LB lower_bound
#define UB upper_bound
const int mod = 1000000007;
using namespace std;
ll gcd(ll a,ll b){
    if(a==0)return b;
    return gcd(b%a,a);
}
ll lcm(ll a, ll b){
    return (a*b)/gcd(a,b);
}

int prime[100007];
void SieveOfEratosthenes(int n) 
{ 
    memset(prime, -1, sizeof(prime)); 
  
    for (int p=2; p*p<=n; p++) 
    { 
         
        if (prime[p] == -1) 
        { 
            for (int i=p*p; i<=n; i += p) 
                prime[i] = p; 
        } 
    } 
    
} 
int lps(string s){
    int len = 0;
    int n = s.length();
    int dp[n];
    dp[0] = 0;
    for(int i=1; i<n; i++){
        if(s[i] == s[len]){
            len++;
            dp[i] = len;
            continue;
        }
        if(len!=0){
            len = dp[len-1];
            i--;
            continue;
        }
        dp[i]=0;
    }
    return dp[n-1];
}
 
ll power(unsigned ll x,unsigned  ll y) 
{ 
    ll res = 1;     
    while (y > 0) 
    { 
        if (y & 1) 
            res = res*x; 
   
        y = y>>1;
        x = x*x;  
    } 
    return res; 
}

//to calculate p1^x  *  p2^x2  *p3^x3 ----------
//i.e. prime factorization and store pi and xi in vector 
vector<pair<ll, ll>> pFactor;

void factorize(long long n) 
{ 
    int count = 0; 
  
    // count the number of times 2 divides  
    while (!(n % 2)) { 
        n >>= 1; // equivalent to n=n/2; 
        count++; 
    } 
  
    // if 2 divides it 
    if (count) 
        pFactor.pb({2,count}); 
  
    // check for all the possible numbers that can  
    // divide it 
    for (long long i = 3; i <= sqrt(n); i += 2) { 
        count = 0; 
        while (n % i == 0) { 
            count++; 
            n = n / i; 
        } 
        if (count) 
            pFactor.pb({i,count});
    } 
  
    // if n at the end is a prime number. 
    if (n > 2) 
        pFactor.pb({n,1}); 
} 



int main(){
ios_base::sync_with_stdio(false);
cin.tie(NULL);
   string s;
   cin>>s;
   int r=0;
   int c=0;
   for(int i=0; i<s.length(); i++){
       if(s[i]=="R"){
           c++;
       }else{
           r = max(r, c);
           c=0;
       }
   }
   cout<<r<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:123:15: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
  123 |        if(s[i]=="R"){
Language: Java

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.Arrays;
import java.util.Random;
import java.util.StringTokenizer;

public class RainyDay {
     public static void main(String[] args) {
         FastScanner fs=new FastScanner();
         int T=1;
         for (int tt=0; tt<T; tt++) {
                    String s = fs.next();
                    int maxc = 0;
                    int maxg = 0;
                    for(int i=0;i<s.length();i++){
                        if(s.charAt(i) == 'R'){
                            maxc++;
                            maxg = Math.max(maxc,maxg);
                        }
                        else{
                            maxc = 0;
                        }
                        
                    }
                    System.out.println(maxg);


                 }
}
 
 static class FastScanner {
     BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
     StringTokenizer st=new StringTokenizer("");
     String next() {
     while (!st.hasMoreTokens())
         try {
             st=new StringTokenizer(br.readLine());
         } catch (IOException e) {
             e.printStackTrace();
         }
         return st.nextToken();
     }
     
     int nextInt() {
         return Integer.parseInt(next());
     }
     int[] readArray(int n) {
         int[] a=new int[n];
         for (int i=0; i<n; i++) a[i]=nextInt();
         return a;
     }
     long nextLong() {
         return Long.parseLong(next());
     }
 }

 
}


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

#include<iostream>
#include<vector>
#define rep(i,n) for(int (i)=0;(i)<(n);(i)++)
using namespace std;

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


	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:26: error: unable to find character literal operator 'operator""and' with 'char' argument
   10 |                 if(s[0]=='R'and s[2]=='R'){
      |                          ^~~~~~
a.cc:10:32: error: expected ')' before 's'
   10 |                 if(s[0]=='R'and s[2]=='R'){
      |                   ~            ^~
      |                                )
a.cc:18:26: error: unable to find character literal operator 'operator""or' with 'char' argument
   18 |                 if(s[0]=='R'or s[2]=='R'){
      |                          ^~~~~
a.cc:18:31: error: expected ')' before 's'
   18 |                 if(s[0]=='R'or s[2]=='R'){
      |                   ~           ^~
      |                               )
Language: C++

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

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

    int r;

    for (int i = 0; i < 3; i++){
        if (S.at(i) == "R"){
            r++;
        }
    }

    if (r == 3){
        cout << 3;
    }
    else if(r == 2){
        if(S.at(1) == "R"){
            cout << 2;
        }
    }
    else if(r == 0){
        cout << 0;
    }
    else{
        cout 1;
    }

    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:11:21: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   11 |         if (S.at(i) == "R"){
      |             ~~~~~~~~^~~~~~
a.cc:20:20: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   20 |         if(S.at(1) == "R"){
      |            ~~~~~~~~^~~~~~
a.cc:28:13: error: expected ';' before numeric constant
   28 |         cout 1;
      |             ^~
      |             ;
Language: C++

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


Compiler output:
a.cc: In function 'int main()':
a.cc:10:35: error: expected primary-expression before '||' token
   10 |   else if(a[0]=='R' && a[1]=='R') || (a[1]=='R' && a[2]=='R'))
      |                                   ^~
Language: C++

#include <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=="RRS" || s=="SRR")	cout<<2;
	else	cout<<1;
	return 0;aa
 } 

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

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

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

#include <bits/stdc++>

using namespace std;

int main()
{
        string s;
        cin >> s;
        int count = 0;

        for (int i = 0; i < (int)s.size(); ++i)
        {
                if (s == "RSR")
                {
                        count = 1;
                        break;
                }
                else if (s[i] == 'R')
                {
                        count++;
                }
        }
        cout << count << endl;
}


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

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

int main()
{
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    string w;
  	int r=0;
  	cin >> w;
    if(s[0]=='R' && s[1]=='R' && s[2]=='R')
       r=3;
    else if((s[0]=='R' && s[1]=='R')||(s[1]=='R' && s[2]=='R'))
      r=2;
   else if(s[0]=='R' || s[1]=='R' || s[2]=='R')
     r=1;
   cout << r;
    return 0;
}

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

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

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

Compiler output:
a.cc:10:59: warning: missing terminating " character
   10 |         if(s == "RSS" || s == "SRS" || s == "SSR" || s == "RSR) ans = 1;
      |                                                           ^
a.cc:10:59: error: missing terminating " character
   10 |         if(s == "RSS" || s == "SRS" || s == "SSR" || s == "RSR) ans = 1;
      |                                                           ^~~~~~~~~~~~~~
a.cc:11:41: warning: missing terminating " character
   11 |         else if(s == "RRS"" || s == "SRR") ans = 2;
      |                                         ^
a.cc:11:41: error: missing terminating " character
   11 |         else if(s == "RRS"" || s == "SRR") ans = 2;
      |                                         ^~~~~~~~~~~
a.cc: In function 'int main()':
a.cc:11:9: error: expected primary-expression before 'else'
   11 |         else if(s == "RRS"" || s == "SRR") ans = 2;
      |         ^~~~
a.cc:10:58: error: expected ')' before 'else'
   10 |         if(s == "RSS" || s == "SRS" || s == "SSR" || s == "RSR) ans = 1;
      |           ~                                              ^
      |                                                          )
   11 |         else if(s == "RRS"" || s == "SRR") ans = 2;
      |         ~~~~
Language: C++

#define DEB1 //output check function
#define DEB2 //input from input.txt

//#include <bits/stdc++.h>でもよい．なんとなく1つずつ．
#include <iostream>
#include <algorithm>
#include <string>
#include <fstream>
#include <vector>
#include <cstdio>
#include <cmath>
#include <queue>
#include <stack>
#include <cmath>
#include <cstdlib>
#include <cstring>
#include <string>
#include <set>
#include <map>
#include <thread>
#include <mutex>
#include <iomanip> //有効数字指定するときに使う．昔入れてなかった．

//打つのを省略するため．実際使うのはREP, pb, chmax, chminとか．
#define ZERO(a) memset(a, 0, sizeof(a))
#define MINUS(a) memset(a, 0xff, sizeof(a))
#define INF(a) memset(a, 0x3f, sizeof(a))
#define ALL(t) (t).begin(),(t).end()
#define FILL(a,c) fill(a, a+ sizeof(a)/sizeof(*a),c)
#define FILL2D(A,c) fill(A[0], A[0] +sizeof(A)/sizeof(**A),c)
#define FILL3D(A,c) fill(A[0][0], A[0][0] +sizeof(A)/sizeof(***A),c)
#define REP(i,m) for(int i=0;i<(m);++i)
#define REPN(i,m,in) for(int i=(in);i<(m);++i)
#define IN(a, x, b) (a<=x && x<b)
#define chmax(x,y) (x = max(x,y))
#define chmin(x,y) (x = min(x,y))
#define pb push_back

using namespace std;

// 型を宣言するときにうつのを省略する系
using ll = long long;
using PAIR = pair<int, int>;
using PAIRLL = pair<ll,ll>;
using vi = vector<int>;
using vvi = vector<vi>;



// DEB1が有効になっているときだけ出力される．error出力を使えばいいじゃんという考え方もある．
#ifdef DEB1
#define DPRINT(x) cout<< #x << "=" << (x) << endl; // print at debug mode
#else
#define DPRINT(x) ;
#endif
#ifdef DEB1
#define DCHECK(x) cout<< "debug check" << #x << endl;
#else
#define DCHECK(x) ;
#endif
 


/*
constant values
*/
const int NM = 101001; //ここを問題の制約を見ながらいじる．配列の確保に使う．

int A[NM];　//あまり褒められたことではないが関数の外側に配列を確保すると怒られにくい．


// Main program
void solve(){
  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;
  }
}



// ----------------------------------------------
int main() {

// 一番上の#define DEB2を有効にしていると，input.txtから標準入力を読み込む
#ifdef DEB2
    cout << "DEBUG MODE"  << endl;
    ifstream in("input.txt"); //for debug
    cin.rdbuf(in.rdbuf()); //for debug
#endif

    int T=1; 
    // Atcoderは親切だが，Google code jamとかだとテストケースの数Tを読み込まないといけなかったりする．
    for (int i = 0; i < T; ++i) {
        solve();
    }
}


Compiler output:
a.cc:69:11: error: extended character 　 is not valid in an identifier
   69 | int A[NM];　//あまり褒められたことではないが関数の外側に配列を確保すると怒られにくい．
      |           ^
a.cc:69:11: error: '\U00003000' does not name a type
   69 | int A[NM];　//あまり褒められたことではないが関数の外側に配列を確保すると怒られにくい．
      |           ^~
a.cc: In function 'int main()':
a.cc:117:9: error: 'solve' was not declared in this scope
  117 |         solve();
      |         ^~~~~
Language: C++

#define DEB1 //output check function
#define DEB2 //input from input.txt

//#include <bits/stdc++.h>でもよい．なんとなく1つずつ．
#include <iostream>
#include <algorithm>
#include <string>
#include <fstream>
#include <vector>
#include <cstdio>
#include <cmath>
#include <queue>
#include <stack>
#include <cmath>
#include <cstdlib>
#include <cstring>
#include <string>
#include <set>
#include <map>
#include <thread>
#include <mutex>
#include <iomanip> //有効数字指定するときに使う．昔入れてなかった．

//打つのを省略するため．実際使うのはREP, pb, chmax, chminとか．
#define ZERO(a) memset(a, 0, sizeof(a))
#define MINUS(a) memset(a, 0xff, sizeof(a))
#define INF(a) memset(a, 0x3f, sizeof(a))
#define ALL(t) (t).begin(),(t).end()
#define FILL(a,c) fill(a, a+ sizeof(a)/sizeof(*a),c)
#define FILL2D(A,c) fill(A[0], A[0] +sizeof(A)/sizeof(**A),c)
#define FILL3D(A,c) fill(A[0][0], A[0][0] +sizeof(A)/sizeof(***A),c)
#define REP(i,m) for(int i=0;i<(m);++i)
#define REPN(i,m,in) for(int i=(in);i<(m);++i)
#define IN(a, x, b) (a<=x && x<b)
#define chmax(x,y) (x = max(x,y))
#define chmin(x,y) (x = min(x,y))
#define pb push_back

using namespace std;

// 型を宣言するときにうつのを省略する系
using ll = long long;
using PAIR = pair<int, int>;
using PAIRLL = pair<ll,ll>;
using vi = vector<int>;
using vvi = vector<vi>;



// DEB1が有効になっているときだけ出力される．error出力を使えばいいじゃんという考え方もある．
#ifdef DEB1
#define DPRINT(x) cout<< #x << "=" << (x) << endl; // print at debug mode
#else
#define DPRINT(x) ;
#endif
#ifdef DEB1
#define DCHECK(x) cout<< "debug check" << #x << endl;
#else
#define DCHECK(x) ;
#endif
 


/*
constant values
*/
const int NM = 101001; //ここを問題の制約を見ながらいじる．配列の確保に使う．

int A[NM];　//あまり褒められたことではないが関数の外側に配列を確保すると怒られにくい．


// Main program
void solve(){
    cin >> N ;
    int ans;
    cout >> ans >> endl;
}



// ----------------------------------------------
int main() {
  string s;
  cin >> s;
  if(s == "RRR"){
cout << "3";
  }
  if(s == "RRS" || s == "SRR"){
    cout << "2";
  }
  if(s == "RSS" || s == "SRS" || s == "SSR" || s == "RSR"){
    cout << "1;
  }
  if(s == "SSS"){
    cout << "0";
  }
  
// 一番上の#define DEB2を有効にしていると，input.txtから標準入力を読み込む
#ifdef DEB2
    cout << "DEBUG MODE"  << endl;
    ifstream in("input.txt"); //for debug
    cin.rdbuf(in.rdbuf()); //for debug
#endif

    int T=1; 
    // Atcoderは親切だが，Google code jamとかだとテストケースの数Tを読み込まないといけなかったりする．
    for (int i = 0; i < T; ++i) {
        solve();
    }
}


Compiler output:
a.cc:69:11: error: extended character 　 is not valid in an identifier
   69 | int A[NM];　//あまり褒められたことではないが関数の外側に配列を確保すると怒られにくい．
      |           ^
a.cc:92:13: warning: missing terminating " character
   92 |     cout << "1;
      |             ^
a.cc:92:13: error: missing terminating " character
   92 |     cout << "1;
      |             ^~~
a.cc:69:11: error: '\U00003000' does not name a type
   69 | int A[NM];　//あまり褒められたことではないが関数の外側に配列を確保すると怒られにくい．
      |           ^~
a.cc: In function 'int main()':
a.cc:93:3: error: expected primary-expression before '}' token
   93 |   }
      |   ^
a.cc:108:9: error: 'solve' was not declared in this scope
  108 |         solve();
      |         ^~~~~
Language: C++

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

Compiler output:
a.cc:1:10: error: #include expects "FILENAME" or <FILENAME>
    1 | #include bits/stdc++.h
      |          ^~~~
a.cc: In function 'int main()':
a.cc:4:3: error: 'string' was not declared in this scope
    4 |   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 | #include bits/stdc++.h
a.cc:5:3: error: 'cin' was not declared in this scope
    5 |   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 | #include bits/stdc++.h
a.cc:5:8: error: 's' was not declared in this scope
    5 |   cin>>s;
      |        ^
a.cc:10:3: error: 'cout' was not declared in this scope
   10 |   cout<<count;
      |   ^~~~
a.cc:10:3: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'