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

#include<stdio.h>
int main()
{ char S[3];
 int i,count;
 scanf("%s",&S);
 while (i<3)
 { 
   {
    if (S[i]=='R')
    count = count +1;
    i = i+1;
   }
   if (i==0) 
   { 
     if S[0]=='S'
       i = i+1;
       continue;
   }
   else 
   {
     S[i]=='S'
     break;
   }
 }
 printf(count);
 return 0;
}
     
   


Compiler output:
main.c: In function 'main':
main.c:15:9: error: expected '(' before 'S'
   15 |      if S[0]=='S'
      |         ^
      |         (
main.c:21:15: error: expected ';' before 'break'
   21 |      S[i]=='S'
      |               ^
      |               ;
   22 |      break;
      |      ~~~~~     
main.c:25:9: error: passing argument 1 of 'printf' makes pointer from integer without a cast [-Wint-conversion]
   25 |  printf(count);
      |         ^~~~~
      |         |
      |         int
In file included from main.c:1:
/usr/include/stdio.h:363:43: note: expected 'const char * restrict' but argument is of type 'int'
  363 | extern int printf (const char *__restrict __format, ...);
      |                    ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~
Language: C

#include<stdio.h>
int main()
{ char S[3];
 int i,count;
 scanf("%s",&S);
 While i<3
 { 
   {
    if S[i]=='R'
    count = count +1;
    i = i+1;
   }
   if i==0 
   { 
     if S[0]=='S'
       i = i+1;
       continue;
   }
   else 
   {
     S[i]=='S'
     break;
   }
 }
 printf(count);
 return 0;
}
     
   

Compiler output:
main.c: In function 'main':
main.c:6:2: error: unknown type name 'While'
    6 |  While i<3
      |  ^~~~~
main.c:6:9: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token
    6 |  While i<3
      |         ^
main.c:25:9: error: passing argument 1 of 'printf' makes pointer from integer without a cast [-Wint-conversion]
   25 |  printf(count);
      |         ^~~~~
      |         |
      |         int
In file included from main.c:1:
/usr/include/stdio.h:363:43: note: expected 'const char * restrict' but argument is of type 'int'
  363 | extern int printf (const char *__restrict __format, ...);
      |                    ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~
Language: C++

#include<bits/stdc++.h>
#define ll              long long int
#define nl              '\n'
using namespace std;

int main(void){

    ll t,x,y,n,m,mx=0;
    string s;
        cin>>s;
    int cnt=0;
    for(int i=0; i<3; i++){
        if(s[i]=='R'){cnt++ };
        if(s[i+1]=='S'){break;}
    }
    cout<<cnt;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:13:28: error: expected ';' before '}' token
   13 |         if(s[i]=='R'){cnt++ };
      |                            ^~
      |                            ;
Language: C++

#include<bits/stdc++.h>
#define ll              long long int
#define nl              '\n'
using namespace std;

int main(void){

    ll t,x,y,n,m,mx=0;
    string s;
        cin>>s;
    int cnt=0;
    for(int i=0; i<3; i++){
        if(s[i]=='R'){cnt++ };
        if(s[i+1]=='S'){break};
    }
    cout<<cnt;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:13:28: error: expected ';' before '}' token
   13 |         if(s[i]=='R'){cnt++ };
      |                            ^~
      |                            ;
a.cc:14:30: error: expected ';' before '}' token
   14 |         if(s[i+1]=='S'){break};
      |                              ^
      |                              ;
Language: C++

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


Compiler output:
a.cc: In function 'int main()':
a.cc:12:165: error: expected ';' before 'c'
   12 |   if((s[0]=='R' && s[1]!='R' && s[2]=='R'|| (s[0]=='R' && s[1]!='R' && s[2]!='R') || (s[0]!='R' && s[1]=='R' && s[2]!='R') || (s[0]!='R' && s[1]!='R' && s[2]=='R'))
      |                                                                                                                                                                     ^
      |                                                                                                                                                                     ;
   13 |      c=1;
      |      ~                                                                                                                                                               
a.cc:14:3: error: expected primary-expression before 'if'
   14 |   if(s[0]!='R' && s[1]!='R' && s[2]!='R')
      |   ^~
a.cc:13:10: error: expected ')' before 'if'
   13 |      c=1;
      |          ^
      |          )
   14 |   if(s[0]!='R' && s[1]!='R' && s[2]!='R')
      |   ~~      
a.cc:12:5: note: to match this '('
   12 |   if((s[0]=='R' && s[1]!='R' && s[2]=='R'|| (s[0]=='R' && s[1]!='R' && s[2]!='R') || (s[0]!='R' && s[1]=='R' && s[2]!='R') || (s[0]!='R' && s[1]!='R' && s[2]=='R'))
      |     ^
Language: Java

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        final String S = sc.nextLine();
        if (S.equals("RRR")) {
            System.out.println(3);
        } else if (S.contains("RR")) {
            System.out.println(2);
        } else if (S.contains("R")) {
            System.out.println(1);
        } else {
            System.out.println(0);
        }
    }

}

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

#include<bits/stdc++.h>
#define ll          long long
#define pb          push_back
#define    endl        '\n'
#define pii         pair<ll int,ll int>
#define all(v) (v).begin(), (v).end()
using namespace std;
const int N = 1e6 + 5;
std::vector<ll> p(N);
ll get(std::vector<ll> &v, ll k)
{
    ll n = v.size(), ans = -2e14, c;
    if(n == 1)
        return max(v[0] * k, v[0]);
    p[0] = 0;
    for(int i = 1; i <= 2 * n; i++)
        p[i] = p[i - 1] + v[(i - 1) % n];
    c = max((k / n - 1) * p[n], 0ll);
    if(k > n)
        k - = (k / n - 1);
    for(int j = 1; j <= k; j++)
        for(int i = 1; i + j - 1 <= 2 * n; i++)
        {
            ans = max(ans, p[i + j - 1] - p[i - 1] + c);
        }
    return ans;

}
void solve()
{
    ll n, k, ans = -2e18;
    cin >> n >> k;
    std::vector<ll> a(n), b(n), vis(N);
    std::vector<std::vector<ll>> c;
    for(ll &i : a) cin >> i, i--;
    for(ll &i : b) cin >> i;

    for(int i = 0; i < n; i++)
    {
        if(vis[i]) continue;

        ll j = i;
        c.pb(std::vector<ll>());
        while(!vis[j])
        {
            vis[j] = 1;
            c.back().pb(b[j]);
            j = a[j];
        }
    }
    for(auto i : c)
    {
        ans = max(ans, get(i, k));
    }

    cout << ans;
}

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

 

    int TESTS = 1;
    // cin >> TESTS;
    while(TESTS--)
    {
        solve();
        cout << endl;

    }
    return 0;
}

Compiler output:
a.cc: In function 'long long int get(std::vector<long long int>&, long long int)':
a.cc:20:13: error: expected primary-expression before '=' token
   20 |         k - = (k / n - 1);
      |             ^
Language: C++

#include<bits/stdc++.h>
#define int long long
#define rep(i,a,b) for(int i=a;i<b;i+=1)
#define reps(i,a,b) for(int i=a;i>=b;i-=1)
#define vi vector<int>
#define vvi vector<vector<int>>
#define pb push_back
#define pi pair<int, int>
#define mp make_pair
#define ff first
#define ss second
#define in1(x) int x; cin>>x;
#define in2(x, y) int x, y; cin>>x>>y;
#define in3(x, y, z) int x, y, z; cin>>x>>y>>z;
#define in4(x, y, z, w) int x, y, z, w; cin>>x>>y>>z>>w;
#define mi unordered_map<int,int>
#define mem(x) memset(x, 0, sizeof(x))
#define IOS ios_base::sync_with_stdio(0); cin.tie(NULL); cout.tie(NULL);
#define mod 1000000007
using namespace std;
bool primes[1000001];vi prime; void seive(); int gcd(int a, int b); int power(int x, int y);

int32_t main(void){
	IOS;
	string s;
	cin>>s;
	int n = s.size();
	int ans = 0;
	int cnt = 0;
	rep(i, 0, n)
	{
		if(s[i] == "R") cnt += 1;
		else
		{
			ans = max(ans, cnt);
			ans = 0;
		}
	}
	ans = max(ans, cnt);
	cout<<ans<<endl;
}

void seive(){memset(primes, true, sizeof(primes));primes[0] = primes[1] = false;for(int i = 2; i*i<=1000000;i += 1){
if(primes[i]){for(int j = i*i; j <= 1000000;j += i) primes[j] = false;}}rep(i, 2, 1000001){if(primes[i]) prime.pb(i);}}
int gcd(int a, int b){return b==0 ? a : gcd(b, a%b);}
int power(int x, int y){ int res = 1;x = x % mod; if (x == 0) return 0;
while (y > 0){ if(y & 1) res = (res*x) % mod; y = y>>1; x = (x*x) % mod;} return res;}


Compiler output:
a.cc: In function 'int32_t main()':
a.cc:32:25: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   32 |                 if(s[i] == "R") cnt += 1;
Language: C++

#include<bits\stdc++.h>
#include<cstdlib>
#include<sstream>
using namespace std;

void solve(){
    string s;
    cin >> s;
    int cnt = 0;
    int mx = 0;
    int f = 0;
    for(int i = 0; i < s.size(); i++){
        if (s[i] == 'R') f = 1;
        if (i < s.size() - 1 && s[i] == 'R' &&  s[i + 1] == 'R') cnt += 1;
        mx = max(cnt , mx);
    }
    if (f) cout << mx + 1;
    else cout << 0;
}

int main()
{   
    ios::sync_with_stdio(0);
    cin.tie(0);
    // freopen("input.txt", "r", stdin);
    // freopen("output.txt", "w", stdout);
    solve();
}  

Compiler output:
a.cc:1:9: 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;
#define REP(i, n) for (int i = 0; i < (int)(n); i++)
#define REP1(i, n) for (int i = 1; i <= (int)(n); i++)
#define all(x) (x).begin(), (x).end()
#define SZ(x) ((int)(x).size())
using ll = long long;

int main() {
  string s;
  cin >> s;
  int ans;
  if (s == "SSS") {
    ans = 0;
  } else if (s = "RRR") {
    ans = 3;
  } else if (s.substr(0, 2) == "RR" || s.substr(1, 2) == "RR") {
    ans = 2;
  } else {
    ans = 1;
  }
  cout << ans << endl;
  return 0;
}

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

#include<bits/stdc++.h>
using namespace std;
#define ll long long
#define f first
#define s second
#define Fast ios_base::sync_with_stdio(false);cin.tie(NULL);
#define fo(a,b,c) for(int i=a;i<b;i+=c)  
typedef pair<ll , pair<ll, ll> > pi;
int pow(int x,int y){
    int res=1;
    while(y){
        if(y&1) res*=x;
        y>>=1;
        x*=x;
    }
    return res;
}   
struct Compare {
    constexpr bool operator()(pi const & a,
                              pi const & b) const noexcept
    { return a.first < b.first || (a.first == b.first && a.second.first > b.second.first); }
 
};
void prefix_function( string s,ll arr[] )
{
     long long border=0; arr[0]=0;
    for(long long i=1;i<s.size();i++)
    {
      while(border>0 && s[i]!=s[border])
        border=arr[border-1];
     
     if(s[i]==s[border])
         border++;
      else
       border=0;
      
      arr[i]=border;
    }
}
ll mod=998244353;
ll add( ll a , ll b)
{
    return (((a%mod)+(b%mod))%mod);
}
ll mul(ll a,ll b)
{
  return (((a%mod)*(b%mod))%mod);
}
//send mod-2 for a^-1 if mod is a prime number
ll binpow(ll a, ll b) {
    ll res = 1;
    while (b) {
        if (b & 1) res = mul(res, a);
        a = mul(a, a);
        b >>= 1;
    }
    return res;
}
ll dsu_arr[100000];
ll dsu_sz[100000];
void dsu(ll n)
{
    for(ll i=0;i<=n;i++)
    {
        dsu_arr[i]=i;
        dsu_sz[i]=1;
    }
}
ll find(ll x)
{
     ll root=x;
    while (root!=dsu_arr[root])
    {
        root=dsu_arr[root];
    }
    while(x!=dsu_arr[x])
    {
        dsu_arr[x]=root;
        x=dsu_arr[x];
    }
    return root;
}
ll merge(ll x,ll y)
{
    ll root1=find(x);
    ll root2=find(y);
    
    if(root1==root2)
    return 0ll;
 
    if(dsu_sz[x]>dsu_sz[y]){
    dsu_arr[root2]=root1;
    dsu_sz[x]+=dsu_sz[y];
    }
    else
    {
         dsu_sz[y]+=dsu_sz[x];
        dsu_arr[root1]=root2;
    }
    return 1ll;
}


int main()
{
string s;
cin>>s;
ll ans=0;
for(ll i=0;i<s.size();i++)
{
    ll cou=1;
    if(s[i]=='R')
    {
        while(s[i]==s[i+1] && i+1<s.size())
        {
            cou++;
            i++;
        }
        ans=max(ans,cou);
    }
}
cout<<ans<<endl;

}



   
      
    
        



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++

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

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


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

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

int main() {
  string s;
  cin >> s;
  int ans = 0;
  char prev = s[0];
  rep(i, 1, 3) {
    if (prev == s[i] && s[i] == 'R') ans++;
    prev = s[i];
  }
  int r_cnt = 0;
  for (char c : s)
    if (x == 'R') r_cnt++;
  if (r_cnt > 0)
    cout << ans + 1 << endl;
  else
    cout << ans << endl;
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:19:9: error: 'x' was not declared in this scope
   19 |     if (x == 'R') r_cnt++;
      |         ^
Language: C++

/*
 © 2020-08-15 21:07:12 Franco1010 All Rights Reserved
*/

#pragma GCC optimize("Ofast,no-stack-protector,unroll-loops,fast-math")
#pragma GCC target("avx,avx2,fma")
#include <bits/stdc++.h>
#define f first
#define s second
#define fore(i,a,b) for(int i = (a), ThxMK = (b); i < ThxMK; ++i)
#define pb push_back
#define all(s) begin(s), end(s)
#define _ ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);
#define sz(s) int(s.size())
#define ENDL '\n'
using namespace std;
typedef long double ld;
typedef long long lli;
typedef pair<lli,lli> ii;
typedef vector<lli> vi;
#define deb(x) cout << #x": " << (x) << endl;

int main(){ _
  string s; cin >> s;
  lli res = 0, cur = 0;
  fore(i, 0, sz(s)){
    if(s[i] == 'S'){
      res = max(res, cur);
      cur = 0;
    }else cur++;
  }
  cout << max(res, cur) << ENDL;
  return 0;
}


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

#include <bits/stdc++.h>
#define rep(i,n) for (int i = 0; i < (n); ++i)
using namespace std;
using ll = long long;
using P = pair<int,int>;
 
int main() {
    ll x, k ,d;
    cin >> x >> k >> d;
    ll ans =0;
    for (int i=1; i<=k; ++i) {
        if (abs(x) >= id) {
            ans =  abs(x) - id;
            continue;
        }
        if ((k-i+1)%2==1) {
            ans = abs(ans - abs(d));
        }
        break;
    }
    cout << ans << endl;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:23: error: 'id' was not declared in this scope; did you mean 'i'?
   12 |         if (abs(x) >= id) {
      |                       ^~
      |                       i
Language: C

#include <stdio.h>

int main()
{
  char str[3];
  scanf("%s", &str);
  int i, count = 0, result;
  
  for (i = 0;i < 3;i ++) {
    if (str[i] == "R") {
      count ++;
      result = count;
    } else if (str[i] == "S") {
      count = 0
    }
  }
  
  printf("%d", count);
}

Compiler output:
main.c: In function 'main':
main.c:10:16: warning: comparison between pointer and integer
   10 |     if (str[i] == "R") {
      |                ^~
main.c:13:23: warning: comparison between pointer and integer
   13 |     } else if (str[i] == "S") {
      |                       ^~
main.c:14:16: error: expected ';' before '}' token
   14 |       count = 0
      |                ^
      |                ;
   15 |     }
      |     ~
Language: C

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

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

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

Compiler output:
a.cc:7:49: warning: missing terminating " character
    7 |   if(s[0]=='R' && s[1]=='R' && s[2]=='R')printf("3\n);
      |                                                 ^
a.cc:7:49: error: missing terminating " character
    7 |   if(s[0]=='R' && s[1]=='R' && s[2]=='R')printf("3\n);
      |                                                 ^~~~~~
a.cc:8:100: warning: missing terminating " character
    8 |   else if((s[0]=='R' && s[1]=='R') || (s[0]=='R' && s[2]=='R') LL  (s[1]=='R' && s[2]=='R'))printf("2\n);
      |                                                                                                    ^
a.cc:8:100: error: missing terminating " character
    8 |   else if((s[0]=='R' && s[1]=='R') || (s[0]=='R' && s[2]=='R') LL  (s[1]=='R' && s[2]=='R'))printf("2\n);
      |                                                                                                    ^~~~~~
a.cc: In function 'int main()':
a.cc:8:3: error: expected primary-expression before 'else'
    8 |   else if((s[0]=='R' && s[1]=='R') || (s[0]=='R' && s[2]=='R') LL  (s[1]=='R' && s[2]=='R'))printf("2\n);
      |   ^~~~
Language: C

#include <iostream>
using namespace std ;
int main(){
int r = 0 ;
string a ;cin >> a ;
if(a[0] == 'R' && a[1] == 'R' && a[2] == 'R')
cout << 3 ;
else if((a[0] == 'R' && a[1] == 'R' ) || ( a[2] == 'R' && a[1] == 'R' ))
cout << 2 ;
else if(a[0] == 'R')
cout << 1 ;
else
cout << 0 ;
cout << endl ;
	return 0 ;
}


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

#include <iostream>
using namespace std ;
int main(){
int r = 0 ;
string a ;cin >> a ; 
if(a[0] == 'R' && a[1] == 'R' && a[2] == 'R')
cout << 3 ;
else if(a[0] == 'R' && a[1] == 'R')
cout << 2 ;
else if(a[0] == 'R')
cout << 1 ;
else 
cout << 0 ;
cout << endl ;
	return 0 ;
}

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

#incldue<iostream>
using namespace std;

int main()
{
  string str;
  cin >> str;
  
  int c = 0;
  for (int i = 0; i < str.length(); i++)
  {
    if (str[i] == str[i + 1]) c++;
  }
  
  if (c == 3) cout << "0" << endl;
  else cout << "c + 1" << endl;
  
  return 0;
}

Compiler output:
a.cc:1:2: error: invalid preprocessing directive #incldue; did you mean #include?
    1 | #incldue<iostream>
      |  ^~~~~~~
      |  include
a.cc: In function 'int main()':
a.cc:6:3: error: 'string' was not declared in this scope
    6 |   string str;
      |   ^~~~~~
a.cc:1:1: note: 'std::string' is defined in header '<string>'; this is probably fixable by adding '#include <string>'
  +++ |+#include <string>
    1 | #incldue<iostream>
a.cc:7:3: error: 'cin' was not declared in this scope
    7 |   cin >> str;
      |   ^~~
a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
  +++ |+#include <iostream>
    1 | #incldue<iostream>
a.cc:7:10: error: 'str' was not declared in this scope; did you mean 'std'?
    7 |   cin >> str;
      |          ^~~
      |          std
a.cc:15:15: error: 'cout' was not declared in this scope
   15 |   if (c == 3) cout << "0" << endl;
      |               ^~~~
a.cc:15:15: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:15:30: error: 'endl' was not declared in this scope
   15 |   if (c == 3) cout << "0" << endl;
      |                              ^~~~
a.cc:1:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
  +++ |+#include <ostream>
    1 | #incldue<iostream>
a.cc:16:8: error: 'cout' was not declared in this scope
   16 |   else cout << "c + 1" << endl;
      |        ^~~~
a.cc:16:8: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:16:27: error: 'endl' was not declared in this scope
   16 |   else cout << "c + 1" << endl;
      |                           ^~~~
a.cc:16:27: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
Language: C++

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


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

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

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

#include<bits/stdc++.h>
using namespace std;
int main(){
  string s;
  cin>>s;
  int i=0;
  int mx=0;
  while(i<n){
    if(s[i]=='R'){
      int cnt=0;
      while(s[i]=='R' && i<n){
        cnt++;
        i++;
      }
      mx=max(mx,cnt);
    }
    if(s[i]=='S'){
      while(s[i]=='S' && i<n){
        i++;
      }
    }
  }
  cout<<mx<<endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:11: error: 'n' was not declared in this scope
    8 |   while(i<n){
      |           ^
Language: C++

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

Compiler output:
a.cc:1:9: fatal error: isotream: No such file or directory
    1 | #include<isotream>
      |         ^~~~~~~~~~
compilation terminated.
Language: Java

import java.util.Scanner;

public class tri {

	public static void main(String[] args) {
		// TODO Auto-generated method stub
		
	    Scanner s = new Scanner(System.in);
	    String st = s.nextLine();
	    
	    int cnt = 0;
	    
	    for(int i = 0; i < st.length(); i++){
	    	
	     	if(st.charAt(i) == 'R')
	          cnt += 1;
	      	else
	          if(cnt != 0)
	            break;
	      
	    }  
	    
	    System.out.println(cnt);
	}

}

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

import java.util.*;

public class SOLVE{
 
  public static void main(String args[]){
   
    Scanner s = new Scanner(System.in);
    String st = s.nextLine();
    
    int cnt = 0;
    
    for(int i = 0; i < st.length(); i++){
    	
     	if(st.charAt(i) == 'R')
          cnt += 1;
      	else
          if(cnt != 0)
            break;
      
    }  
    
    System.out.println(cnt);
    
  }
  
}

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

#include<bits/stdc++.h>
#include<cstdio>
using namespace std;
int main()
{
    char s[3];
    int ans=0, cnt=0;
    gets(s);
    for(int i=0; i<3; i++){
        if(s[i]=='R') ++cnt;
        else cnt=0;
        ans = max(ans, cnt);
    }
    cout << ans << endl;
    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);
    int cnt=0;
    for(int i=0; i<3; i++){
        if(s[i]=='R') ++cnt;
        else cnt = 0;
    }
    cout << cnt << endl;
    return 0;
}


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

import java.util.*;

class Main {

    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        String s = in.nextLine();
        char[] arr = s.toCharArray();
        int max;
        int c;
        c = max = 0;
        for (int i = 0; i < arr.length; i++) {
            if (arr[i] == 'R') {
                c = c + 1;
            } else {
                c = 0;
            }
            if (c > max) {
                max = c;
            }
        }
        System.out.println(max);
    }
}

Compiler output:
a.cc:1:1: error: 'import' does not name a type
    1 | import java.util.*;
      | ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:5:11: error: expected ':' before 'static'
    5 |     public static void main(String[] args) {
      |           ^~~~~~~
      |           :
a.cc:5:29: error: 'String' has not been declared
    5 |     public static void main(String[] args) {
      |                             ^~~~~~
a.cc:5:38: error: expected ',' or '...' before 'args'
    5 |     public static void main(String[] args) {
      |                                      ^~~~
a.cc:24:2: error: expected ';' after class definition
   24 | }
      |  ^
      |  ;
a.cc: In static member function 'static void Main::main(int*)':
a.cc:6:9: error: 'Scanner' was not declared in this scope
    6 |         Scanner in = new Scanner(System.in);
      |         ^~~~~~~
a.cc:7:9: error: 'String' was not declared in this scope
    7 |         String s = in.nextLine();
      |         ^~~~~~
a.cc:8:13: error: structured binding declaration cannot have type 'char'
    8 |         char[] arr = s.toCharArray();
      |             ^~
a.cc:8:13: note: type must be cv-qualified 'auto' or reference to cv-qualified 'auto'
a.cc:8:13: error: empty structured binding declaration
a.cc:8:16: error: expected initializer before 'arr'
    8 |         char[] arr = s.toCharArray();
      |                ^~~
a.cc:12:29: error: 'arr' was not declared in this scope
   12 |         for (int i = 0; i < arr.length; i++) {
      |                             ^~~
a.cc:22:9: error: 'System' was not declared in this scope
   22 |         System.out.println(max);
      |         ^~~~~~
Language: C++

#include <bits/stdc++.h>
#define ff { ios_base::sync_with_stdio(false);cin.tie(NULL);}
using namespace std;

typedef long long ll;
 ll  pp=1e9+7; 
double pi=3.141592653589793238;
  
 int main() {
        ff;
        string s;
        cin>>s;
        int c=0;
        if(s[0]=='R || s[1]=='R' || s[2]=='R'){
            c++;
        }
        if(s[0]=='R' && s[1]=='R')c++;
        if(s[1]=='R' && s[2]=='R')c++;
        cout<<c<<endl;
		
    return 0;
}

            
		
        
           
  

Compiler output:
a.cc:14:18: warning: multi-character literal with 11 characters exceeds 'int' size of 4 bytes
   14 |         if(s[0]=='R || s[1]=='R' || s[2]=='R'){
      |                  ^~~~~~~~~~~~~~
a.cc:14:32: warning: multi-character literal with 10 characters exceeds 'int' size of 4 bytes
   14 |         if(s[0]=='R || s[1]=='R' || s[2]=='R'){
      |                                ^~~~~~~~~~~~~
a.cc:14:45: warning: missing terminating ' character
   14 |         if(s[0]=='R || s[1]=='R' || s[2]=='R'){
      |                                             ^
a.cc:14:45: error: missing terminating ' character
   14 |         if(s[0]=='R || s[1]=='R' || s[2]=='R'){
      |                                             ^~~
a.cc: In function 'int main()':
a.cc:14:18: error: unable to find character literal operator 'operator""R' with 'int' argument
   14 |         if(s[0]=='R || s[1]=='R' || s[2]=='R'){
      |                  ^~~~~~~~~~~~~~
a.cc:16:9: error: expected primary-expression before '}' token
   16 |         }
      |         ^
a.cc:15:17: error: expected ')' before '}' token
   15 |             c++;
      |                 ^
      |                 )
   16 |         }
      |         ~        
a.cc:14:11: note: to match this '('
   14 |         if(s[0]=='R || s[1]=='R' || s[2]=='R'){
      |           ^
a.cc:16:9: error: expected primary-expression before '}' token
   16 |         }
      |         ^
a.cc: At global scope:
a.cc:17:9: error: expected unqualified-id before 'if'
   17 |         if(s[0]=='R' && s[1]=='R')c++;
      |         ^~
a.cc:18:9: error: expected unqualified-id before 'if'
   18 |         if(s[1]=='R' && s[2]=='R')c++;
      |         ^~
a.cc:19:9: error: 'cout' does not name a type
   19 |         cout<<c<<endl;
      |         ^~~~
a.cc:21:5: 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() {
  stirng s;
  cin >> s;
  int ans = 0;
  if (s = "SSS") cout << 0 << endl;
  if (s = "RSS" || s = "SRS" || s = "SSR" || s = "RSR") cout << 1 << endl;
  if (s = "RRS" || s = "SRR") cout << 2 <<endl;
  if (s = "RRR") cout << 3 << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:3: error: 'stirng' was not declared in this scope
    5 |   stirng s;
      |   ^~~~~~
a.cc:6:10: error: 's' was not declared in this scope
    6 |   cin >> s;
      |          ^
Language: C++

int main() {
    ios_base::sync_with_stdio(false);
    cin.tie(nullptr);
    cout.tie(nullptr);

    string s;
    cin >> s;

    int count = 0, ans = 0;

    for (char c : s) {
        if (c == 'S') {
            count = 0;
        } else {
            ++count;
        }
        ans = max(ans, count);
    }

    cout << ans << endl;

    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:2:5: error: 'ios_base' has not been declared
    2 |     ios_base::sync_with_stdio(false);
      |     ^~~~~~~~
a.cc:3:5: error: 'cin' was not declared in this scope
    3 |     cin.tie(nullptr);
      |     ^~~
a.cc:4:5: error: 'cout' was not declared in this scope
    4 |     cout.tie(nullptr);
      |     ^~~~
a.cc:6:5: error: 'string' was not declared in this scope
    6 |     string s;
      |     ^~~~~~
a.cc:7:12: error: 's' was not declared in this scope
    7 |     cin >> s;
      |            ^
a.cc:17:15: error: 'max' was not declared in this scope
   17 |         ans = max(ans, count);
      |               ^~~
a.cc:20:20: error: 'endl' was not declared in this scope
   20 |     cout << ans << endl;
      |                    ^~~~
Language: C++

#include <bits/stdc++.h>

using namespace std;

int main(){
	
  	string s;
  	int ans=0,max=0;
  	cin>>s;
  	for(int i=0;i<3;i++){
    	if(s[i]=='R'){
          	ans++;
        }
      	else{
        	if(ans>max) max=ans;
          	ans=0;
        }
    }
  	
  	cout<<max(max,ans)<<"\n";
  	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:20:18: error: 'max' cannot be used as a function
   20 |         cout<<max(max,ans)<<"\n";
      |               ~~~^~~~~~~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
#define ll long long 
#define endl "\n"
#define pb push_back
#define f(i,n) for(i=0;i<n;i++)
#define F(i,a,b) for(i=a;a<=b;i++)
#define arr(a,n) for( i=0;i<n;i++)cin>>a[i];
#define fi first
#define se second
#define mp make_pair
#define mod 1000000007
#define YES cout<<"YES"<<endl;
#define Yes cout<<"Yes"<<endl;
#define NO cout<<"NO"<<endl;
#define No cout<<"No"<<endl;
#define yes cout<<"yes"<<endl;
#define no cout<<"no"<<endl;
#define vi vector<ll>
#define ed end()
#define bg begin()
#define sz size()
#define ln length()
#define s() sort(a,a+n);
#define sr() sort(a,a+n,greater<ll>());
#define v()  sort(v.begin(),v.end());
#define vr() sort(v.begin(),v.end(),greater<ll>());
#define mod 1000000007
#define fast() ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0)
ll gcd(ll a, ll b){if(!b)return a;return gcd(b, a % b);}
ll power(ll x,ll y,ll p){ll res=1;x%=p;while(y>0){if(y&1)res=(res*x)%p;y=y>>1;x=(x*x)%p;}return res;}
int main() {
    #ifndef ONLINE_JUDGE
        // for getting input from input.txt
        freopen("input.txt", "r", stdin);
        // for writing output to output.txt
        freopen("output.txt", "w", stdout);
    #endif
        

fast();
//ll t;cin>>t;while(t--)
{
  string s;
  cin>>s;
  //sort(s.begin(),s.end());
  if(s[0]==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: In function 'int main()':
a.cc:51:3: error: 'else' without a previous 'if'
   51 |   else
      |   ^~~~
Language: C++

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

int main() {
	string s;
  	cin>>s;
	int res = 0,total =0;
	for(int i =0;i<3;i++){
		if(s[i] == 'S'){
			res = max(res,total);
			total = 0;
		}
		else total++;
	}
	res = max(res,total);
	cout<<res<<endl;
	return 0;
}

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

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

int main() {
	string s;
	int res = 0,total =0;
	for(int i =0;i<3;i++){
		if(s[i] == 'S'){
			res = max(res,total);
			total = 0;
		}
		else total++;
	}
	res = max(res,total);
	cout<<res<<endl;
	return 0;
}

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

#include <iostream>
using namespace std;
int main(){
  string s;
  cin >> s;
  int a;
  if(s[0] == 'R') a++;
  if(s[1] == 'R') a++;
  if(s[2] == 'R') a++;
  if(a == 2 && s[1] = 'S') a--;
  cout << a << "\n"
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:13: error: lvalue required as left operand of assignment
   10 |   if(a == 2 && s[1] = 'S') a--;
a.cc:11:20: error: expected ';' before '}' token
   11 |   cout << a << "\n"
      |                    ^
      |                    ;
   12 | }
      | ~
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){string s;cin>>s;cout<<(s=="RSR"?:s.count('R'))<<endl;}

Compiler output:
a.cc: In function 'int main()':
a.cc:3:47: error: 'std::string' {aka 'class std::__cxx11::basic_string<char>'} has no member named 'count'
    3 | int main(){string s;cin>>s;cout<<(s=="RSR"?:s.count('R'))<<endl;}
      |                                               ^~~~~
Language: C++

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

int main()
{
     //freopen("input.txt", "r", stdin);
    //freopen("output.txt", "w", stdout);

    char s[3];
    gets(s);
    if(s[0]=='S' && s[1]=='S' && s[2]=='S')cout<<0<<endl;
    else if(s[0]=='R' && s[1]=='S' && s[2]=='R' || s[0]=='S' && s[1]=='R' && s[2]=='S' || s[0]=='S' && s[1]=='S' && s[2]=='R' || s[0]=='R' && s[1]=='S' && s[2]=='S')cout<<1<<endl;
    else if(s[0]=='R' && s[1]=='R' && s[2]=='S' || s[0]=='S' && s[1]=='R' && s[2]=='R')cout<<2<<endl;
    else if(s[0]=='R' && s[1]=='R' && s[2]=='R')cout<<3<<endl;
}


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

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

int main()
{
     //freopen("input.txt", "r", stdin);
    //freopen("output.txt", "w", stdout);

    char s[3];
    gets(s);
    if(s[0]=='S' && s[1]=='S' && s[2]=='S')cout<<0<<endl;
    else if(s[0]=='R' && s[1]=='S' && s[2]=='R' || s[0]=='S' && s[1]=='R' && s[2]=='S' || s[0]=='S' && s[1]=='S' && s[2]=='R' || s[0]=='R' && s[1]=='S' && s[2]=='S')cout<<1<<endl;
    else if(s[0]=='R' && s[1]=='R' && s[2]=='S' || s[0]=='S' && s[1]=='R' && s[2]=='R')cout<<2<<endl;
    else if(s[0]=='R' && s[1]=='R' && s[2]=='R')cout<<3<<endl;
}

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

#include <iostream>
#include <string>
#include <cmath>

using namespace std;

int main()
{
    long X, K, D;
    cin >> X >> K >> D;
    long result;
    long minimum_candidate1;
    long minimum_candidate2;

    X = abs(X)

    if (X / D >= K) {
        result = X - K * D;
    } else {
        minimum_candidate1 = X % D;
        minimum_candidate2 = abs(minimum_candidate1 - D);

        if ((K - (X / D)) % 2 == 0) {
            result = minimum_candidate1;
        } else {
            result = minimum_candidate2;
        }
    }



    std::cout << result << std::endl;
    
}

Compiler output:
a.cc: In function 'int main()':
a.cc:15:15: error: expected ';' before 'if'
   15 |     X = abs(X)
      |               ^
      |               ;
   16 | 
   17 |     if (X / D >= K) {
      |     ~~         
a.cc:19:7: error: 'else' without a previous 'if'
   19 |     } else {
      |       ^~~~
Language: Java

public class Main {

        public static int findMaxConsecutiveDays(String weatherString){
            int maxDays =0;
            char[] weatherChar = weatherString.toCharArray();
            int temporaryCount = 0;
            for(int i =0 ;i<weatherChar.length;i++){
                if(weatherChar[i] == 'R'){
                    temporaryCount++;
                }else{
                    if(temporaryCount>maxDays) {
                        maxDays = temporaryCount;
                    }
                    temporaryCount =0;
                }
            }
            return maxDays;
        }

        public static void main(String[] args) {
           Scanner scan = new Scanner(System.in);
            String str =scan.next();
            System.out.println(findMaxConsecutiveDays(str));
      scan.close();
        }
}

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

#include <bits/stdc++.h>
const double PI = acos(-1);
#define rep(i, n) for (int i = 0; i < (int)(n); i++ )
using namespace std;
int findSumOfDigits(int n) {
  int sum = 0;
  while (n > 0) { // n が 0 になるまで
    sum += n % 10;
    n /= 10;
  }
  return sum;
}
int main(){
  string s;
  cin >> s;
  int num = 0;
  int ans = 0;
  int n = s.size()
  rep(i,n){
    if(s.at(i) == 'R'){
      for(int j = i+1 j < n; j++){
        if(s.at(j) == 'R') num++;
        else break;
      }
      if(num > ans ) ans = num;
    }
  }
  cout << ans << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:3:19: error: expected ',' or ';' before 'for'
    3 | #define rep(i, n) for (int i = 0; i < (int)(n); i++ )
      |                   ^~~
a.cc:19:3: note: in expansion of macro 'rep'
   19 |   rep(i,n){
      |   ^~~
a.cc:19:7: error: 'i' was not declared in this scope
   19 |   rep(i,n){
      |       ^
a.cc:3:35: note: in definition of macro 'rep'
    3 | #define rep(i, n) for (int i = 0; i < (int)(n); i++ )
      |                                   ^
Language: Java

public class Rainy {

        public static int findMaxConsecutiveDays(String weatherString){
            int maxDays =0;
            char[] weatherChar = weatherString.toCharArray();
            int temporaryCount = 0;
            for(int i =0 ;i<weatherChar.length;i++){
                if(weatherChar[i] == 'R'){
                    temporaryCount++;
                }else{
                    if(temporaryCount>maxDays) {
                        maxDays = temporaryCount;
                    }
                    temporaryCount =0;
                }
            }
            return maxDays;
        }

        public static void main(String[] args) {
            System.out.println(findMaxConsecutiveDays(""));
        }
}

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

package com.company;

public class Rainy {

        public static int findMaxConsecutiveDays(String weatherString){
            int maxDays =0;
            char[] weatherChar = weatherString.toCharArray();
            int temporaryCount = 0;
            for(int i =0 ;i<weatherChar.length;i++){
                if(weatherChar[i] == 'R'){
                    temporaryCount++;
                }else{
                    if(temporaryCount>maxDays) {
                        maxDays = temporaryCount;
                    }
                    temporaryCount =0;
                }
            }
            return maxDays;
        }

        public static void main(String[] args) {
            System.out.println(findMaxConsecutiveDays(""));
        }
}




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

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

int main() {
	int X, K, D, L ,M, Y ;
	cin >> X >> K >> D;
  Y = abs(x);
		L = abs(Y + K * D);
	L = abs(Y + K * D);
	for (int i = 1; i < K+1; i++) {
		M =abs( Y + (K - 2 * i) * D);
		if (M < L) {
			L = M;
		}

	}
	cout << L << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:7:11: error: 'x' was not declared in this scope
    7 |   Y = abs(x);
      |           ^
Language: C++

#include<iostream>
using namespace std;
int main()
{
    char S[3];int c=0,I=0;
    for( i=0;i<3;i++)
    {
        cin>>S[i];
    }
    
    for( i=0;i<3;i++)
    {
        if(S[i]=='R')
        {
            c++;
        }
    }
    cout<<c;
    return 0;
}


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

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

    /**************************************
     Writter Torisuto 2020/8/15
     三文字の中で連続する'R'の最大個数を求める。
     全通りだすのもあり。
     私は、最初に出てくる'R'を基準としたコードに
     しました。もし四文字以上になった場合は、最大値
     を考える必要があります。
    ***************************************/

int main(){

  string s;
  cin >> s;
  int ans = 0;

  rep(i,3){
    if(ans == 0 && s[i]=='R') ans++;
    else if(s[i-1]=='R' && S[i]=='R'){
      ans++;
    }
  }

  cout << ans << endl;
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:22:28: error: 'S' was not declared in this scope
   22 |     else if(s[i-1]=='R' && S[i]=='R'){
      |                            ^
Language: Java

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


Compiler output:
Main.java:4: error: <identifier> expected
    Scanner scan = new.Scanner(System.in);
                      ^
1 error
Language: C++

#include <bits/stdc++.h>
#include <ext/pb_ds/tree_policy.hpp>
#include <ext/pb_ds/assoc_container.hpp>
using namespace std;
using namespace __gnu_pbds;

long long x, k, d;

int main(){
	ios_base::sync_with_stdio(false);
	cin.tie(NULL);
	cin >> x >> k >> d;
	x = abs(x);
	long long req;
	if(x % d){
		if()
	}
	if(req > k) cout << x - k * d << '\n';
	else{
		k -= req;
		long long cur = x - req * d;
		if(k % 2) cout << cur + d << '\n';
		else cout << abs(cur) << '\n';
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:16:20: error: expected primary-expression before ')' token
   16 |                 if()
      |                    ^
a.cc:17:9: error: expected primary-expression before '}' token
   17 |         }
      |         ^
Language: Java

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

Compiler output:
Main.java:4: error: <identifier> expected
    Scanner scan = new.Scanner(System.in);
                      ^
Main.java:19: error: ';' expected
      System.out.println(1):
                           ^
2 errors
Language: C++

#include <iostream>
#include <string>

int main() {
  	std::string s;
	std::cin>>s;
    int ans = 0, curr = 0;
    for(int i = 0; i < 3; ++i) {
    	if (s[i] == 'R' ) cur++;
        else ans = std::max(ans, curr);
    }
    std::cout << std::max(ans, curr) << std::endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:27: error: 'cur' was not declared in this scope; did you mean 'curr'?
    9 |         if (s[i] == 'R' ) cur++;
      |                           ^~~
      |                           curr
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
  string S;
  cin >> S;
  vector<int> vec(5);
  int now = 0;
  for (int i = 0; i < 3; i++){
    if (S.at(i) == 'R'){
      now++;
    }else{
      vec.push_back(now);
      now = 0
    }
  }
  sort(vec.begin(),vec.end());
  reverse(vec.begin(),vec.end());
  cout << vec.at(0) << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:14: error: expected ';' before '}' token
   13 |       now = 0
      |              ^
      |              ;
   14 |     }
      |     ~