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

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

Compiler output:
a.cc:1:3: error: 'cin' does not name a type
    1 |   cin >> S;
      |   ^~~
a.cc:2:3: error: expected unqualified-id before 'if'
    2 |   if(S=="RRR"){
      |   ^~
a.cc:4:4: error: expected unqualified-id before 'else'
    4 |   }else if(S=="RRS" || S=="RSR" || S=="SRR" ){
      |    ^~~~
a.cc:6:4: error: expected unqualified-id before 'else'
    6 |   }else if( S=="RSS" || S=="SRS" || S=="SSR"){
      |    ^~~~
a.cc:8:4: error: expected unqualified-id before 'else'
    8 |   }else{
      |    ^~~~
a.cc:12:3: error: expected unqualified-id before 'return'
   12 |   return 0;
      |   ^~~~~~
a.cc:13:1: error: expected declaration before '}' token
   13 | }
      | ^
Language: C++

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:5:17: error: expected initializer before 'S'
    5 |   string N      S;
      |                 ^
a.cc:6:10: error: 'S' was not declared in this scope
    6 |   cin >> S;
      |          ^
Language: C++

#include <iostream>
#include <vector>
#include <map>
#include <bitset>

using namespace std;

int main(){
    string w;
    cin>>w;;
    int result;

    if(w.at(0)=='S' && w.at(1)=='S' && w.at(2)=='S')){
        result = 0;
    }
    else if (w.at(0)=='R' && w.at(1)=='R' && w.at(2)=='R'){
        result = 3;
    }
    else if ((w.at(0)=='R' && w.at(1)=='R' && w.at(2)=='S')||(w.at(0)=='S' && w.at(1)=='R' && w.at(2)=='S')){
        result = 2;
    }
    else{
        result = 1;
    }
    cout<<result<<endl;


}








Compiler output:
a.cc: In function 'int main()':
a.cc:13:53: error: expected primary-expression before ')' token
   13 |     if(w.at(0)=='S' && w.at(1)=='S' && w.at(2)=='S')){
      |                                                     ^
Language: C++

#include <bits/stdc++.h>
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;
    if((p and q) or (q and r)){
      cout << 2 << endl;
      if (p or q or r){
        coutt << 1 << endl;
        else cout <<0 << endl;
      }}}

}

Compiler output:
a.cc: In function 'int main()':
a.cc:17:9: error: 'coutt' was not declared in this scope
   17 |         coutt << 1 << endl;
      |         ^~~~~
a.cc:18:9: error: expected '}' before 'else'
   18 |         else cout <<0 << endl;
      |         ^~~~
a.cc:16:23: note: to match this '{'
   16 |       if (p or q or r){
      |                       ^
a.cc: At global scope:
a.cc:21:1: error: expected declaration before '}' token
   21 | }
      | ^
Language: Java

import java.util.*;
public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
        char[] S = sc.next().toCharArray();
        
        int res;
        int count=0;
        for(int i=0; i<3; i++){
            if(S[i]=='R'){
                res++;
            }else{
                count = res;
                res = 0;
            }
        }
        
        System.out.println(Math.max(count,res));
                
            
        
        
        
        
        
        }
    }

Compiler output:
Main.java:11: error: variable res might not have been initialized
                res++;
                ^
Main.java:13: error: variable res might not have been initialized
                count = res;
                        ^
Main.java:18: error: variable res might not have been initialized
        System.out.println(Math.max(count,res));
                                          ^
3 errors
Language: Java

import java.util.*;
public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
        char[] S = sc.next().toCharArray();
        
        int res;
        int count;
        for(int i=0; i<3; i++){
            if(S[i]=='R'){
                res++;
            }else{
                count = res;
                res = 0;
            }
        }
        
        System.out.println(Math.max(count,res));
                
            
        
        
        
        
        
        }
    }

Compiler output:
Main.java:11: error: variable res might not have been initialized
                res++;
                ^
Main.java:13: error: variable res might not have been initialized
                count = res;
                        ^
Main.java:18: error: variable count might not have been initialized
        System.out.println(Math.max(count,res));
                                    ^
Main.java:18: error: variable res might not have been initialized
        System.out.println(Math.max(count,res));
                                          ^
4 errors
Language: C++

#include<bits/stdc++.h>

using namespace std;

int main(){

    char s[3];
    gets(s);

    if(s[0]=='S' && s[1]=='S' && s[2]=='S'){
        cout << "0" ;
    }

    else if(s[0]=='R' && s[1]=='R' && s[2]=='R'){
        cout << "3";
    }

    else if(s[0]=='R' && s[1]=='R' && s[2]=='S' || s[0]=='S' && s[1]=='R' && s[2]=='R'){
        cout << "2" ;
    }

    else  cout << "1" ;

     return 0;
}

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

#include<bits/stdc++.h>

using namespace std;

int main(){

    char s[3];
    gets(s);

    if(s[0]=='S' && s[1]=='S' && s[2]=='S'){
        cout << "0" ;
    }

    else if(s[0]=='R' && s[1]=='R' && s[2]=='R'){
        cout << "3";
    }

    else if(s[0]=='R' && s[1]=='R' && s[2]=='S' || s[0]=='S' && s[1]=='R' && s[2]=='R'){
        cout << "2" ;
    }

    else  cout << "1" ;

     return 0;
}


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

include <bits/stdc++.h>

using namespace std;

int main()
{
  string s;
  cin>>s;
  int c = 0;
  for (char c1 : s) if (c1 == 'R') c++;
  if (c != 2) cout << c << '\n';
  else if (s[1] == 'S') cout << 1 << '\n';
  else cout << '2' << '\n';
  return 0;
}

Compiler output:
a.cc:1:1: error: 'include' does not name a type
    1 | include <bits/stdc++.h>
      | ^~~~~~~
a.cc: In function 'int main()':
a.cc:7:3: error: 'string' was not declared in this scope
    7 |   string s;
      |   ^~~~~~
a.cc:8:3: error: 'cin' was not declared in this scope
    8 |   cin>>s;
      |   ^~~
a.cc:8:8: error: 's' was not declared in this scope
    8 |   cin>>s;
      |        ^
a.cc:11:15: error: 'cout' was not declared in this scope
   11 |   if (c != 2) cout << c << '\n';
      |               ^~~~
a.cc:12:25: error: 'cout' was not declared in this scope
   12 |   else if (s[1] == 'S') cout << 1 << '\n';
      |                         ^~~~
a.cc:13:8: error: 'cout' was not declared in this scope
   13 |   else cout << '2' << '\n';
      |        ^~~~
Language: C++

#include <iostream>

using namespace std;

int main()
{
    string S;
    getline(cin,S);

        if(S.find("R",0)<3)
    {
        int count=1;
        int n=S.length();
        for(int i=0; i<n; i++)
        {


                if( i<n)
                {

                    if(S[i]=='R' && S[i+1]=='R')
                    {
                        count++;
                    }
                }

        }
        cout<<count;

    }
    else
    {
        cout<<count;
    }


    return 0;
}


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

#include<bits/stdc++.h>
using namespace std; 
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define length size()
#define int long long
template<typename T> string join(vector<T> &vec ,const string &sp){
    int si = vec.length;
    if(si==0){
        return "";
    }else{
        stringstream ss;
        rep(i,si-1){
            ss << vec[i] << sp;
        }
        ss << vec[si - 1];
        return ss.str();
    }
}
signed main(void){
    string n;
    cin >> n;
  if(n = "RRR"){
  cout << 3;
  }else if(n=="RRS"||n=="SRR"){
  cout << 2;
  }else if(n == "SSS"){
  cout << 0;
  }else{
  cout << 1;
  }
  cout << endl;
}


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

#include<bits/stdc++.h>
#define endl  "\n"
#define ll long long
#define PI acos(-1.0)
#define test cout<<"\n****\n"
#define precise fixed(cout);cout<<setprecision(12)
#define fast  ios_base :: sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL)
using  namespace  std;


int main(){


    string str;
    cin>>str;

     if(str[0]=='R' && str[1]=='R' && str[2]=='R'){
        cout<<"3\n";
    }
    else if((str[0]=='R' && str[1]=='R') || (str[1]=='R' && str[2]=='R')){
        cout<<"2\n";
    }
     else if(str[0]=='R' || str[1]=='R' || str[2]=='R'){
        cout<<"1\n";
    } else{
        cout<<"0\n";
    }
    return 0;
}


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

// This file is a "Hello, world!" in C++ language by GCC for wandbox.
#include <iostream>
#include <cstdlib>
using namespace std;

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

// GCC reference:
//   https://gcc.gnu.org/

// C++ language references:
//   https://cppreference.com/
//   https://isocpp.org/
//   http://www.open-std.org/jtc1/sc22/wg21/

// Boost libraries references:
//   https://www.boost.org/doc/


Compiler output:
a.cc:7:2: error: extended character 　 is not valid in an identifier
    7 | {　
      |  ^
a.cc: In function 'int main()':
a.cc:7:2: error: '\U00003000' was not declared in this scope
    7 | {　
      |  ^~
a.cc:9:12: error: 's' was not declared in this scope
    9 |     cin >> s;
      |            ^
a.cc:11:30: error: expected ';' before 'endl'
   11 |     if (s == "RRR"){cout << 3 endl;}
      |                              ^~~~~
      |                              ;
a.cc:13:30: error: expected ';' before 'endl'
   13 |     if (s == "SSS"){cout << 0 endl;}
      |                              ^~~~~
      |                              ;
a.cc:15:44: error: expected ';' before 'endl'
   15 |     else if (s == "RRS" or "SRR"){cout << 2 endl;}
      |                                            ^~~~~
      |                                            ;
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  string esoadat;
  cin >> esoadat;
  cout << esoadat[0];
  bool vaneS = false;
  for (int i = 0; i<esoadat.size(); i++); {
    if ( esoadat [i] == 'S'); {
      vaneS = true;
    }
  }
  
  if (vaneS == true); {
    cout << "van S betü, sütni fog a nap"
    } else {
      cout << "Nem fos sütni a nap"
  }
   return 0;
   
}
 
 

Compiler output:
a.cc: In function 'int main()':
a.cc:10:19: error: 'i' was not declared in this scope
   10 |     if ( esoadat [i] == 'S'); {
      |                   ^
a.cc:16:42: error: expected ';' before '}' token
   16 |     cout << "van S betü, sütni fog a nap"
      |                                          ^
      |                                          ;
   17 |     } else {
      |     ~                                     
a.cc:17:7: error: 'else' without a previous 'if'
   17 |     } else {
      |       ^~~~
a.cc:18:36: error: expected ';' before '}' token
   18 |       cout << "Nem fos sütni a nap"
      |                                    ^
      |                                    ;
   19 |   }
      |   ~
Language: Java

import java.util.*;

public class Main {
    public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        String line = sc.nextLine();
      	char[] work = new char[text.length()];
      	int count = 0;
      	int max = 0;
        for(int i = 0; i < line.length; i++){
			if(line.charAt(i) == 's'){
            	count++;
            }else{
				count = 0;
            }
       		if(count > max){
				count = max;
            }
    	}
      	System.out.println(max);
    }
}


Compiler output:
Main.java:7: error: cannot find symbol
      	char[] work = new char[text.length()];
      	                       ^
  symbol:   variable text
  location: class Main
Main.java:10: error: cannot find symbol
        for(int i = 0; i < line.length; i++){
                               ^
  symbol:   variable length
  location: variable line of type String
2 errors
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;
}
posted: 17 days ago
last update: 17 days ago

Compiler output:
a.cc:22:1: error: 'posted' does not name a type
   22 | posted: 17 days ago
      | ^~~~~~
Language: C++

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

    cout<<ma<<endl;
}
f

Compiler output:
a.cc:22:1: error: 'f' does not name a type
   22 | f
      | ^
Language: C++

#include <iostream>
using namespace std;

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

	if (S == "SSS") {
		cout << 0 << endl;
	}

	else if (S == "SSR") {
		cout << 1 << endl;
	}

	else if (S == "SRS") {
		cout << 1 << endl;
	}

	else if (S == "RSS") {
		cout << 1 << endl;
	}

	else if (S == "SRR") {
		cout << 2 << endl;
	}

	else if (S == "RRS") {
		cout << 2 << endl;
	}

	else if (S == "RSR") {
		cout << 1 << endl;
	}

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

	else cout << "error" << endl;
}

Compiler output:
a.cc: In function 'int maina()':
a.cc:41:1: warning: no return statement in function returning non-void [-Wreturn-type]
   41 | }
      | ^
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/Scrt1.o: in function `_start':
(.text+0x17): undefined reference to `main'
collect2: error: ld returned 1 exit status
Language: C++

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

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

    for(int i = 0; i < 3; i++){
        if(S.at(i) == 'R'){
            if(i == 0){
                if(S.at(1) == 'R' && S.at(2) == 'R'){
                    cout << 3 << endl;
                    return 0;
                }
                else if(S.at(1) == 'R'){
                    cout << 2 << endl;
                    return 0;
                }
                else{
                    cout << 1 << endl;
                    return 0;
                }
            }
            else if(i == 1){
                if(S.at(2) == 'R'){
                    cout << 2 << endl;
                    return 0;
                }
                else{
                    cout << 1 << endl;
                    return 0;
                }
            }
            else{
                cout << 1 << endl;
                return 0;
            }
            
        }
        else if(i == 2 && S.at(i) == 'S'){
            cout << 0 << endl;
            return 0
        }
    } 
}

Compiler output:
a.cc: In function 'int main()':
a.cc:42:21: error: expected ';' before '}' token
   42 |             return 0
      |                     ^
      |                     ;
   43 |         }
      |         ~
Language: C++

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

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

    for(int i = 0; i < 3; i++){
        if(S.at(i) == 'R'){
            if(i == 0){
                if(S.at(1) == "R" && S.at(2) == "R"){
                    cout << 3 << endl;
                }
                else if(S.at(1) == "R"){
                    cout << 2 << endl;
                }
                else{
                    cout << 1 << endl;
                }
            }
            else if(i == 1){
                if(S.at(2) == "R"){
                    cout << 2 << endl;
                }
                else{
                    cout << 1 << endl;
                }
            }
            else{
                cout << 1 << endl;
            }
            
        }
        else if(S.at(2) == "S"){
            cout << 0 << endl;
        }
    } 
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:28: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   11 |                 if(S.at(1) == "R" && S.at(2) == "R"){
      |                    ~~~~~~~~^~~~~~
a.cc:11:46: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   11 |                 if(S.at(1) == "R" && S.at(2) == "R"){
      |                                      ~~~~~~~~^~~~~~
a.cc:14:33: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   14 |                 else if(S.at(1) == "R"){
      |                         ~~~~~~~~^~~~~~
a.cc:22:28: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   22 |                 if(S.at(2) == "R"){
      |                    ~~~~~~~~^~~~~~
a.cc:34:25: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   34 |         else if(S.at(2) == "S"){
      |                 ~~~~~~~~^~~~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
#define int long long int
#define pb  push_back
int32_t main()
{
     string m;
     getline (cin,m);
     if(m==RRR)
     cout<<3;
     else if(m==RRS)
     cout<<2;
     else if (m==RSS)
     cout<<1;
     else
     cout<<0;

     return 0;
    

}


Compiler output:
a.cc: In function 'int32_t main()':
a.cc:9:12: error: 'RRR' was not declared in this scope
    9 |      if(m==RRR)
      |            ^~~
a.cc:11:17: error: 'RRS' was not declared in this scope
   11 |      else if(m==RRS)
      |                 ^~~
a.cc:13:18: error: 'RSS' was not declared in this scope
   13 |      else if (m==RSS)
      |                  ^~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
#define vi vector<ll>
#define pb push_back
#define ff first
#define ss second
#define inf 2e18
#define ull unsigned long long
#define pi acos(-1.0)
#define mod 1000000007
#define lop0(n) for(ll i=0;i<n;i++)
#define lopj(n) for(ll j=0;j<n;j++)
#define lop1(n) for(ll i=1;i<=n;i++)
#define all(v) v.begin(),v.end()
ll Set(ll N,ll pos){ return N=N | (1LL<<pos); }
ll reset(ll N,ll pos){ return N= N & ~(1LL<<pos); }
bool check(ll N,ll pos){ return (bool)(N & (1LL<<pos)); }
#define fastio ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL)

main()
{
    ll ans=0,flag=0;
    string s,k;
    k="SSR"
    cin>>s;
    if(s==k)
    {
        cout<<1;
        return 0;
    }
    lop0(s.size()-1)
    {
       if(s[i]==s[i+1] and s[i]=='R') ans+=1;
       if(s[i]=='R') flag=1;
    }
    
    if(flag) ans+=1;
    cout<<ans;
}



Compiler output:
a.cc:21:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
   21 | main()
      | ^~~~
a.cc: In function 'int main()':
a.cc:25:12: error: expected ';' before 'cin'
   25 |     k="SSR"
      |            ^
      |            ;
   26 |     cin>>s;
      |     ~~~
Language: C++

#include<iostream>
#include<string>
#include<vector>
using namespace std;
int main(){
  string s;
  cin>>s;
  vector<int> v(3,0);
  for(int i=0;i<3;i++){
    if(s[i]=='R')  ans++;
    else v.push_back(ans);
  }
  int ans=0;
  for(int i=0;i<3;i++){
    if(v[i]>ans) ans=v[i];
  }
  cout<<ans<<endl;
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:10:20: error: 'ans' was not declared in this scope; did you mean 'abs'?
   10 |     if(s[i]=='R')  ans++;
      |                    ^~~
      |                    abs
a.cc:11:22: error: 'ans' was not declared in this scope; did you mean 'abs'?
   11 |     else v.push_back(ans);
      |                      ^~~
      |                      abs
Language: C++

#include<iostream>
#include<string>
using namespace std;
int main(){
  string s;
  cin>>s;
  vector<int> v(3,0);
  for(int i=0;i<3;i++){
    if(s[i]=='R')  ans++;
    else v.push_back(ans);
  }
  int ans=0;
  for(int i=0;i<3;i++){
    if(v[i]>ans) ans=v[i];
  }
  cout<<ans<<endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:3: error: 'vector' was not declared in this scope
    7 |   vector<int> v(3,0);
      |   ^~~~~~
a.cc:2:1: note: 'std::vector' is defined in header '<vector>'; this is probably fixable by adding '#include <vector>'
    1 | #include<iostream>
  +++ |+#include <vector>
    2 | #include<string>
a.cc:7:10: error: expected primary-expression before 'int'
    7 |   vector<int> v(3,0);
      |          ^~~
a.cc:9:20: error: 'ans' was not declared in this scope; did you mean 'abs'?
    9 |     if(s[i]=='R')  ans++;
      |                    ^~~
      |                    abs
a.cc:10:10: error: 'v' was not declared in this scope
   10 |     else v.push_back(ans);
      |          ^
a.cc:10:22: error: 'ans' was not declared in this scope; did you mean 'abs'?
   10 |     else v.push_back(ans);
      |                      ^~~
      |                      abs
a.cc:14:8: error: 'v' was not declared in this scope
   14 |     if(v[i]>ans) ans=v[i];
      |        ^
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:10:115: error: 'S' was not declared in this scope
   10 |   else if((s[i]=='R' && s[i+1]!='R' && s[i+2]!='R') || (s[i]!='R' && s[i+1]=='R' && s[i+2]!='R') || (s[i]=='R' && S[i+1]!='R' && s[i+2]=='R')||(s[i]!='R' && s[i+1]!='R' && s[i+2]=='R'))
      |                                                                                                                   ^
a.cc: At global scope:
a.cc:20:5: error: redefinition of 'int main()'
   20 | int main()
      |     ^~~~
a.cc:3:5: note: 'int main()' previously defined here
    3 | int main()
      |     ^~~~
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:10:115: error: 'S' was not declared in this scope
   10 |   else if((s[i]=='R' && s[i+1]!='R' && s[i+2]!='R') || (s[i]!='R' && s[i+1]=='R' && s[i+2]!='R') || (s[i]=='R' && S[i+1]!='R' && s[i+2]=='R')||(s[i]!='R' && s[i+1]!='R' && s[i+2]=='R'))
      |                                                                                                                   ^
a.cc: At global scope:
a.cc:20:5: error: redefinition of 'int main()'
   20 | int main()
      |     ^~~~
a.cc:3:5: note: 'int main()' previously defined here
    3 | int main()
      |     ^~~~
Language: C++

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


Compiler output:
a.cc: In function 'int main()':
a.cc:10:115: error: 'S' was not declared in this scope
   10 |   else if((s[i]=='R' && s[i+1]!='R' && s[i+2]!='R') || (s[i]!='R' && s[i+1]=='R' && s[i+2]!='R') || (s[i]=='R' && S[i+1]!='R' && s[i+2]=='R')||(s[i]!='R' && s[i+1]!='R' && s[i+2]=='R'))
      |                                                                                                                   ^
a.cc: At global scope:
a.cc:20:5: error: redefinition of 'int main()'
   20 | int main()
      |     ^~~~
a.cc:3:5: note: 'int main()' previously defined here
    3 | int main()
      |     ^~~~
a.cc: In function 'int main()':
a.cc:27:115: error: 'S' was not declared in this scope
   27 |   else if((s[i]=='R' && s[i+1]!='R' && s[i+2]!='R') || (s[i]!='R' && s[i+1]=='R' && s[i+2]!='R') || (s[i]=='R' && S[i+1]!='R' && s[i+2]=='R')||(s[i]!='R' && s[i+1]!='R' && s[i+2]=='R'))
      |                                                                                                                   ^
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:10:115: error: 'S' was not declared in this scope
   10 |   else if((s[i]=='R' && s[i+1]!='R' && s[i+2]!='R') || (s[i]!='R' && s[i+1]=='R' && s[i+2]!='R') || (s[i]=='R' && S[i+1]!='R' && s[i+2]=='R')||(s[i]!='R' && s[i+1]!='R' && s[i+2]=='R'))
      |                                                                                                                   ^
Language: C++

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

int main() {
  string S;
  cin >> S;
  int ame=0
  for(int i=0;i<3;i++) {
    if(S.at(i)=='R') {
      if(i<=1) {
        if(S.at(i+1)=='R') {
          if(i==0) {
            if(S.at(i+2)=='R') {
              ame==3;
              break;
            }
          } else {
            ame=2;
            break;
          }
        } else {
          ame=1;
          break;
        }
      } else {
        ame=1;
        break;
      }
    }
  }
  cout << ame << endl;
}

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

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


Compiler output:
a.cc:21:6: error: expected unqualified-id before 'return'
   21 |      return 0;
      |      ^~~~~~
a.cc:22:1: error: expected declaration before '}' token
   22 | }
      | ^
Language: C++

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

Compiler output:
a.cc:7:12: warning: missing terminating ' character
    7 |   if(s[i]=='R)
      |            ^
a.cc:7:12: error: missing terminating ' character
    7 |   if(s[i]=='R)
      |            ^~~
a.cc: In function 'int main()':
a.cc:7:8: error: 'i' was not declared in this scope
    7 |   if(s[i]=='R)
      |        ^
a.cc:8:3: error: expected primary-expression before '{' token
    8 |   {
      |   ^
a.cc:23:6: error: expected primary-expression before 'return'
   23 |      return 0;
      |      ^~~~~~
a.cc:21:4: error: expected ')' before 'return'
   21 |   }
      |    ^
      |    )
   22 | 
   23 |      return 0;
      |      ~~~~~~
a.cc:7:5: note: to match this '('
    7 |   if(s[i]=='R)
      |     ^
Language: C++

#include<iostream>
using namespace std;
int main()
{
  char S;
  S='S'or'R';
   length(S=3);
  cin>>S;
  int count=0;
  while(S='S')
  {
    count+=1;
  }
  S++;
  cout<<count<<endl;
  return 0;
}
  

Compiler output:
a.cc: In function 'int main()':
a.cc:6:5: error: unable to find character literal operator 'operator""or' with 'char' argument
    6 |   S='S'or'R';
      |     ^~~~~
a.cc:7:4: error: 'length' was not declared in this scope
    7 |    length(S=3);
      |    ^~~~~~
Language: C++

#include<iostream>
using namespace std;
int main()
{
  char S;
  S='S' || 'R';
   length(S=3);
  cin>>S;
  count=0;
  while(S='S')
  {
    count+=1;
  }
  cout<<count<<endl;
  return 0;
}
  

Compiler output:
a.cc: In function 'int main()':
a.cc:7:4: error: 'length' was not declared in this scope
    7 |    length(S=3);
      |    ^~~~~~
a.cc:9:3: error: 'count' was not declared in this scope
    9 |   count=0;
      |   ^~~~~
Language: C++

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:10:13: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   10 |     if(S[i] == "R") count++;
Language: C

#include<stdio.h>

int main(void){
  char c[5];
  scanf("%s",c);
  int w=0;
  if(c[0]=='R'){
    w++;
  }
  if(c[1]=='R'){
    w += 2;
  }
  if(c[2]=='R'){
    w +=4;
  }
  if(w=0){
    printf("0\n");
  }else if(w=1 || w=2 || w=4 || w=5){
    printf("1\n");
  }else if(w=3 || w=6){
    printf("2"\n);
  }else{
    printf("3\n");
  }
  return 0;
}
  

Compiler output:
main.c: In function 'main':
main.c:18:34: error: lvalue required as left operand of assignment
   18 |   }else if(w=1 || w=2 || w=4 || w=5){
      |                                  ^
main.c:20:20: error: lvalue required as left operand of assignment
   20 |   }else if(w=3 || w=6){
      |                    ^
main.c:21:15: error: stray '\' in program
   21 |     printf("2"\n);
      |               ^
main.c:21:15: error: expected ')' before 'n'
   21 |     printf("2"\n);
      |           ~   ^~
      |               )
Language: C++

#include <iostream>
using namespace std;

int main() {
  string esoadat;
  cin >> esoadat;
  cout << esoadat[0];
  bool vaneS = false;
  for [int 1 = 0; i<esoadat.size(); i++] {
    if (esoadat[i] == 'S') {
      vaneS = true;
    }
  }
  
  if (vaneS == true) {
    cout << 'van S betü, sütni fog a nap' 
    } else {
      cout << 'Nem fos sütni a nap'
  }
   return 0;
   
}

 

  

Compiler output:
a.cc:16:13: warning: multi-character literal with 29 characters exceeds 'int' size of 4 bytes
   16 |     cout << 'van S betü, sütni fog a nap'
      |             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
a.cc:18:15: warning: multi-character literal with 20 characters exceeds 'int' size of 4 bytes
   18 |       cout << 'Nem fos sütni a nap'
      |               ^~~~~~~~~~~~~~~~~~~~~
a.cc: In function 'int main()':
a.cc:9:7: error: expected '(' before '[' token
    9 |   for [int 1 = 0; i<esoadat.size(); i++] {
      |       ^
      |       (
a.cc:9:8: error: expected identifier before 'int'
    9 |   for [int 1 = 0; i<esoadat.size(); i++] {
      |        ^~~
a.cc:9:17: error: expected ']' before ';' token
    9 |   for [int 1 = 0; i<esoadat.size(); i++] {
      |                 ^
      |                 ]
a.cc: In lambda function:
a.cc:9:17: error: expected '{' before ';' token
a.cc: In function 'int main()':
a.cc:9:19: error: 'i' was not declared in this scope
    9 |   for [int 1 = 0; i<esoadat.size(); i++] {
      |                   ^
a.cc:9:40: error: expected ')' before ']' token
    9 |   for [int 1 = 0; i<esoadat.size(); i++] {
      |       ~                                ^
      |                                        )
a.cc:9:40: error: expected primary-expression before ']' token
a.cc:16:42: error: expected ';' before '}' token
   16 |     cout << 'van S betü, sütni fog a nap'
      |                                          ^
      |                                          ;
   17 |     } else {
      |     ~                                     
a.cc:18:36: error: expected ';' before '}' token
   18 |       cout << 'Nem fos sütni a nap'
      |                                    ^
      |                                    ;
   19 |   }
      |   ~
Language: C++

#include <iostream>
using namespace std;

int main() {
 string s;
cin >> s;
if (s[0] == 'R') {
  cout << Will rains in the next 3 days;
}
}else{
  cout << Sunny;

    {return 0;}
}


Compiler output:
a.cc: In function 'int main()':
a.cc:8:11: error: 'Will' was not declared in this scope
    8 |   cout << Will rains in the next 3 days;
      |           ^~~~
a.cc: At global scope:
a.cc:10:2: error: expected unqualified-id before 'else'
   10 | }else{
      |  ^~~~
Language: C

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

int main(){
	
char s[3];
cin >> s;
int count = 0;

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

if(count == 2){

if(s[0] == 'R' && s[1] == 'R') { cout << '2'; }

if(s[1] == 'R' && s[2] == 'R') { cout << '2'; }


if(s[0] == 'R' && s[2] == 'R') { cout << '1'; }
}

else if(count == 1) {cout << '1';}
else if(count == 0) {cout << '0';}



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>
using namespace std;
 
int main(){
	char a, b, c;
  cin >> a >> b >> c;
  if(a == "S" && b == "S" || b == "S" && c == "S" || a == "S" && c == "S" ){
  	cout << 1 << endl;
  }
  if(a == "R" && b == "R" || b == "R" && c == "R" ) cout << 2 << endl;
  if(a == "R" && b == "R" && c == "R") cout << 3 << endl;
  else cout << 0 << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:8: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
    7 |   if(a == "S" && b == "S" || b == "S" && c == "S" || a == "S" && c == "S" ){
      |      ~~^~~~~~
a.cc:7:20: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
    7 |   if(a == "S" && b == "S" || b == "S" && c == "S" || a == "S" && c == "S" ){
      |                  ~~^~~~~~
a.cc:7:32: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
    7 |   if(a == "S" && b == "S" || b == "S" && c == "S" || a == "S" && c == "S" ){
      |                              ~~^~~~~~
a.cc:7:44: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
    7 |   if(a == "S" && b == "S" || b == "S" && c == "S" || a == "S" && c == "S" ){
      |                                          ~~^~~~~~
a.cc:7:56: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
    7 |   if(a == "S" && b == "S" || b == "S" && c == "S" || a == "S" && c == "S" ){
      |                                                      ~~^~~~~~
a.cc:7:68: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
    7 |   if(a == "S" && b == "S" || b == "S" && c == "S" || a == "S" && c == "S" ){
      |                                                                  ~~^~~~~~
a.cc:10:8: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   10 |   if(a == "R" && b == "R" || b == "R" && c == "R" ) cout << 2 << endl;
      |      ~~^~~~~~
a.cc:10:20: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   10 |   if(a == "R" && b == "R" || b == "R" && c == "R" ) cout << 2 << endl;
      |                  ~~^~~~~~
a.cc:10:32: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   10 |   if(a == "R" && b == "R" || b == "R" && c == "R" ) cout << 2 << endl;
      |                              ~~^~~~~~
a.cc:10:44: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   10 |   if(a == "R" && b == "R" || b == "R" && c == "R" ) cout << 2 << endl;
      |                                          ~~^~~~~~
a.cc:11:8: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   11 |   if(a == "R" && b == "R" && c == "R") cout << 3 << endl;
      |      ~~^~~~~~
a.cc:11:20: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   11 |   if(a == "R" && b == "R" && c == "R") cout << 3 << endl;
      |                  ~~^~~~~~
a.cc:11:32: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   11 |   if(a == "R" && b == "R" && c == "R") cout << 3 << endl;
      |                              ~~^~~~~~
Language: C++

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

int main(){
	char a, b, c;
  cin >> a >> b >> c
  if(a == "S" && b == "S" || b == "S" && c == "S" || a == "S" && c == "S" ){
  	cout << 1 << endl;
  }
  if(a == "R" && b == "R" || b == "R" && c == "R" ) cout << 2 << endl;
  if(a == "R" && b == "R" && c == "R") cout << 3 << endl;
  else cout << 0 << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:21: error: expected ';' before 'if'
    6 |   cin >> a >> b >> c
      |                     ^
      |                     ;
    7 |   if(a == "S" && b == "S" || b == "S" && c == "S" || a == "S" && c == "S" ){
      |   ~~                 
a.cc:10:8: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   10 |   if(a == "R" && b == "R" || b == "R" && c == "R" ) cout << 2 << endl;
      |      ~~^~~~~~
a.cc:10:20: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   10 |   if(a == "R" && b == "R" || b == "R" && c == "R" ) cout << 2 << endl;
      |                  ~~^~~~~~
a.cc:10:32: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   10 |   if(a == "R" && b == "R" || b == "R" && c == "R" ) cout << 2 << endl;
      |                              ~~^~~~~~
a.cc:10:44: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   10 |   if(a == "R" && b == "R" || b == "R" && c == "R" ) cout << 2 << endl;
      |                                          ~~^~~~~~
a.cc:11:8: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   11 |   if(a == "R" && b == "R" && c == "R") cout << 3 << endl;
      |      ~~^~~~~~
a.cc:11:20: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   11 |   if(a == "R" && b == "R" && c == "R") cout << 3 << endl;
      |                  ~~^~~~~~
a.cc:11:32: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   11 |   if(a == "R" && b == "R" && c == "R") cout << 3 << endl;
      |                              ~~^~~~~~
Language: C++

#include<bits/stdc++.h>

#define EB emplace_back
#define int long long
#define F first
#define S second
#define N 500005
#define all(x) x.begin(),x.end()
#define endl '\n'
#define IOS ios::sync_with_stdio(0); cin.tie(0); cout.tie(0)

using namespace std;

//#define rt return

void test_case(){
  string s; cin >> s;
  int cnt = 0;
  int ans = 0;
  for(int i = 0; i < 3; i++){
    if(s[i] == 'R') cnt++;
    else{
      cnt = 0;
      ans = max(ans, cnt);
    }
  }
  ans = max(cnt, ans);
  
  
  
  cout << ans;
  
  rt;
  int n; 
  cin >> n;
  
  string yy, nn;
  yy = "Yes";
  nn = "No";
  
  if(n ){
    cout << yy;
  }
  else cout << nn;
  
}

int32_t main(){
	IOS;
	int tt = 1; 
	cin >> tt;
	while(tt--){
    test_case();
    cout << endl;
	}
	return 0;
}


Compiler output:
a.cc: In function 'void test_case()':
a.cc:33:3: error: 'rt' was not declared in this scope
   33 |   rt;
      |   ^~
Language: C++

#include<bits/stdc++.h>

#define EB emplace_back
#define int long long
#define F first
#define S second
#define N 500005
#define all(x) x.begin(),x.end()
#define endl '\n'
#define IOS ios::sync_with_stdio(0); cin.tie(0); cout.tie(0)

using namespace std;

#define rt return

void test_case(){
  string s; cin >> s;
  int cnt = 0;
  int ans = 0;
  for(int i = 0; i < 3; i++){
    if(s[i] == 'R') cnt++;
    else{
      cnt = 0;
      ans = max(ans, cnt);
    }
  }
  ans = max(cnt, ans);
  
  
  
  cout << ans;
  
  rt 0;
  int n; 
  cin >> n;
  
  string yy, nn;
  yy = "Yes";
  nn = "No";
  
  if(n ){
    cout << yy;
  }
  else cout << nn;
  
}

int32_t main(){
	IOS;
	int tt = 1; 
	cin >> tt;
	while(tt--){
    test_case();
    cout << endl;
	}
	return 0;
}


Compiler output:
a.cc: In function 'void test_case()':
a.cc:33:6: error: return-statement with a value, in function returning 'void' [-fpermissive]
   33 |   rt 0;
      |      ^
Language: C++

#include <iostream>
#include <vector>
#include <algorithm>
#include <math.h>
#include <string>
#include <deque>
#include <tuple>
#include <map> 
#include <set>
#include <stack>
#include <functional>
#define ll long long
using namespace std;

int main() {
	string s;
	cin >> s;
	int rCnt = 0;
	for (int i = 0; i < s.size(); i++) {
		if (s[i] == 'R') rCnt++;
	}

	if (rCnt == 1) {
		cout << rCnt << endl;
		return;
	}
    if (rCnt == 2 && s[1] == 'R') {
		cout << rCnt << endl;
		return;
	}
	else {
		cout << 1 << endl;
		return;
	}
	cout << rCnt << endl;
	return;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:25:17: error: return-statement with no value, in function returning 'int' [-fpermissive]
   25 |                 return;
      |                 ^~~~~~
a.cc:29:17: error: return-statement with no value, in function returning 'int' [-fpermissive]
   29 |                 return;
      |                 ^~~~~~
a.cc:33:17: error: return-statement with no value, in function returning 'int' [-fpermissive]
   33 |                 return;
      |                 ^~~~~~
a.cc:36:9: error: return-statement with no value, in function returning 'int' [-fpermissive]
   36 |         return;
      |         ^~~~~~
Language: C++

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

int main()
{
  int now=0, old=0;
  
  char s;
  
  for(int i=1; i<=3; i++)
  {
    s=getchar();
    
    if(s=='R' && now!=0)
    {
      now++;
    }
    else
    {
      if(now>=old)
        old=now;
    }
  }
  
  cout<<old<<endl;
}

Compiler output:
a.cc:2:7: error: expected nested-name-specifier before 'nmaespace'
    2 | using nmaespace std;
      |       ^~~~~~~~~
a.cc: In function 'int main()':
a.cc:25:3: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   25 |   cout<<old<<endl;
      |   ^~~~
      |   std::cout
In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:146,
                 from a.cc:1:
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:25:14: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   25 |   cout<<old<<endl;
      |              ^~~~
      |              std::endl
In file included from /usr/include/c++/14/istream:41,
                 from /usr/include/c++/14/sstream:40,
                 from /usr/include/c++/14/complex:45,
                 from /usr/include/c++/14/ccomplex:39,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:127:
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
Language: C

#include<stdio.h>
int buble(int a,int b[200]){
  int j,i,tmp;
  for(i=0;i<a;i++){
    for(j=0;j<a;j++){
      if(b[i]>b[j]){
        tmp=b[i];
        b[i]=b[j];
        b[j]=tmp;
      }
    }
  }
  return b;
}

int main()

Compiler output:
main.c: In function 'buble':
main.c:13:10: error: returning 'int *' from a function with return type 'int' makes integer from pointer without a cast [-Wint-conversion]
   13 |   return b;
      |          ^
main.c: In function 'main':
main.c:17: error: expected '{' at end of input
Language: Java

class Main{
  public static void main(String[] args){
    String w=new java.util.Scanner(System.in).next();
    int a=0;
    if(w.equals("SSS")){}
    else if(w.equals("SRR")||w.equals("RRS")){a=2}
    else if(w.equals("RRR")){a=3}
    else{a=1}
    System.out.println(a);
  }
}

Compiler output:
Main.java:6: error: ';' expected
    else if(w.equals("SRR")||w.equals("RRS")){a=2}
                                                 ^
Main.java:7: error: ';' expected
    else if(w.equals("RRR")){a=3}
                                ^
Main.java:8: error: ';' expected
    else{a=1}
            ^
3 errors
Language: C++

#include <iostream>
#include <string>
// #include <vector>
#define rep(i,n) for(int i = 0 ; i < (n); ++i)
using namespace std;
using ll = long long;
int main(){
  string s;
  int count=0;
  cin >> s;
  rep(i,s.size()if(s[i] == "R") count++;
  cout << count;
  return 0;
}

Compiler output:
a.cc:14:2: error: unterminated argument list invoking macro "rep"
   14 | }
      |  ^
a.cc: In function 'int main()':
a.cc:11:3: error: 'rep' was not declared in this scope
   11 |   rep(i,s.size()if(s[i] == "R") count++;
      |   ^~~
a.cc:11:6: error: expected '}' at end of input
   11 |   rep(i,s.size()if(s[i] == "R") count++;
      |      ^
a.cc:7:11: note: to match this '{'
    7 | int main(){
      |           ^