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

#include<bits/stdc++.h>
using namespace std;
#define bitCount(num)  __builtin_popcount(num)
#define pb push_back
#define ll long long
#define bye return 0;
#define f(i,a,b) for( long long i=a;i<b;i++)
#define testCases long long t;cin>>t; while(t--)
#define fast ios_base::sync_with_stdio(false);cin.tie(NULL);
#define newLine <<"\n"
#define all(x) (x).begin(), (x).end()
#define vll vector<long long>

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

    bye
}

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

#include<stdio.h>
int main(void){
  printf("input wethear");
  char wethear[3];
  scanf(%c,&wethear[0]);
  scanf(%c,&wethear[1]);
  scanf(%c,&wethear[2]);
  int count=0;
  int max=0;
  for(i=0;i<3;i++){
    if(wethear[i]="R"){
      count++;
      if(max<count){
        max=count;
      }
    }else{
      count=0;
    }
  }
}

Compiler output:
main.c: In function 'main':
main.c:5:9: error: expected expression before '%' token
    5 |   scanf(%c,&wethear[0]);
      |         ^
main.c:6:9: error: expected expression before '%' token
    6 |   scanf(%c,&wethear[1]);
      |         ^
main.c:7:9: error: expected expression before '%' token
    7 |   scanf(%c,&wethear[2]);
      |         ^
main.c:10:7: error: 'i' undeclared (first use in this function)
   10 |   for(i=0;i<3;i++){
      |       ^
main.c:10:7: note: each undeclared identifier is reported only once for each function it appears in
Language: C++

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


int main(){
    ll a,b,c,k;
    cin >> a >> b >> c >> k;
    if(k<=a) ans = k;
    else if(k <= a+b) ans = a;
    else ans = a-(k-a-b);
    cout << ans << endl;
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:10:14: error: 'ans' was not declared in this scope; did you mean 'abs'?
   10 |     if(k<=a) ans = k;
      |              ^~~
      |              abs
a.cc:11:23: error: 'ans' was not declared in this scope; did you mean 'abs'?
   11 |     else if(k <= a+b) ans = a;
      |                       ^~~
      |                       abs
a.cc:12:10: error: 'ans' was not declared in this scope; did you mean 'abs'?
   12 |     else ans = a-(k-a-b);
      |          ^~~
      |          abs
a.cc:13:13: error: 'ans' was not declared in this scope; did you mean 'abs'?
   13 |     cout << ans << endl;
      |             ^~~
      |             abs
Language: C++

#include <bits/stdc++.h>
#include <iostream>
using namespace std;
FILE *fi = freopen("1.txt", "r", stdin);
FILE *fo = freopen("1", "w", stdout);
stirng s;
int main()
{
    cin >> s;
    int cur = 0;
    int ans = 0;
    for (auto x : s)
    {
        if (x == 'R')
            cur++;
        else
        {
            cur = 0;
        }
        ans = max(ans, cur);
    }
    cout << ans;
    return 0;
}

Compiler output:
a.cc:6:1: error: 'stirng' does not name a type
    6 | stirng s;
      | ^~~~~~
a.cc: In function 'int main()':
a.cc:9:12: error: 's' was not declared in this scope
    9 |     cin >> s;
      |            ^
Language: C

#include<string.h>
#include<stdio.h>
int main(void)
{
	char S[4];

	scanf("%s", S);

	if(strcmp(S, "SSS") == 0)
	{
		printf("0");
	}
	else if(strcmp(S, "SSR") == 0 || strcmp(S, "RSS") == 0)
	{
		printf("1");
	}
	else if(strcmp(S, "SRR") == 0 || strcmp(S, "RRS") == 0 || strcmp(S, "RSR"))
	{
		printf("2");
	}
	else
	{
		printf("3");
	}
	return 0;

Compiler output:
main.c: In function 'main':
main.c:25:9: error: expected declaration or statement at end of input
   25 |         return 0;
      |         ^~~~~~
Language: C++

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

int main() {
  string s;
  cin >> s;
  
  int res = 0;
  if(s.at(0) == 'R' && s.at(1) == 'R' && s.at(2) == 'R')
    res = 3;
  elseif((s.at(0) == 'R' && s.at(1) == 'R') || (s.at(1) == 'R' && s.at(2) == 'R'))
    res = 2;
  elseif(s.at(0) == 'R' || s.at(1) == 'R' || s.at(2) == 'R')
    res = 1;

  cout << res << endl;
}

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

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

int main() {
  string s;
  cin >> s;
  
  int res = 0;
  if(s.at(0) == 'R' && s.at(1) == 'R' && s.at(2) == 'R')
    res = 3;
  elseif((s.at(0) == 'R' && s.at(1) == 'R') || s.at(1) == 'R' && s.at(2) == 'R')
    res = 2;
  elseif(s.at(0) == 'R' || s.at(1) == 'R' || s.at(2) == 'R')
    res = 1;

  cout << res << endl;
}

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

#include<iostream>
#include<string>

int main(void)
{
	string S;
  	int ans = 0;
  	cin >> S;
  	for (int i = 0; i<3; i++)
    {
      if (ans > 0 && S[i] == 'S')
        break;
      if (S[i] == 'R')
        ans++;
    }
  	cout << ans;
  	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:9: error: 'string' was not declared in this scope
    6 |         string S;
      |         ^~~~~~
a.cc:6:9: note: suggested alternatives:
In file included from /usr/include/c++/14/iosfwd:41,
                 from /usr/include/c++/14/ios:40,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:1:
/usr/include/c++/14/bits/stringfwd.h:77:33: note:   'std::string'
   77 |   typedef basic_string<char>    string;
      |                                 ^~~~~~
In file included from /usr/include/c++/14/bits/locale_classes.h:40,
                 from /usr/include/c++/14/bits/ios_base.h:41,
                 from /usr/include/c++/14/ios:44:
/usr/include/c++/14/string:76:11: note:   'std::pmr::string'
   76 |     using string    = basic_string<char>;
      |           ^~~~~~
a.cc:8:9: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    8 |         cin >> S;
      |         ^~~
      |         std::cin
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:8:16: error: 'S' was not declared in this scope
    8 |         cin >> S;
      |                ^
a.cc:16:9: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   16 |         cout << ans;
      |         ^~~~
      |         std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
Language: C++

#include<iostream>

int main(void)
{
	string S;
  	int ans = 0;
  	cin >> S;
  	for (int i = 0; i<3; i++)
    {
      if (ans > 0 && S[i] == 'S')
        break;
      if (S[i] == 'R')
        ans++;
    }
  	cout << ans;
  	return 0;
}
    

Compiler output:
a.cc: In function 'int main()':
a.cc:5:9: error: 'string' was not declared in this scope
    5 |         string S;
      |         ^~~~~~
a.cc:5:9: note: suggested alternatives:
In file included from /usr/include/c++/14/iosfwd:41,
                 from /usr/include/c++/14/ios:40,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:1:
/usr/include/c++/14/bits/stringfwd.h:77:33: note:   'std::string'
   77 |   typedef basic_string<char>    string;
      |                                 ^~~~~~
In file included from /usr/include/c++/14/bits/locale_classes.h:40,
                 from /usr/include/c++/14/bits/ios_base.h:41,
                 from /usr/include/c++/14/ios:44:
/usr/include/c++/14/string:76:11: note:   'std::pmr::string'
   76 |     using string    = basic_string<char>;
      |           ^~~~~~
a.cc:7:9: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    7 |         cin >> S;
      |         ^~~
      |         std::cin
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:7:16: error: 'S' was not declared in this scope
    7 |         cin >> S;
      |                ^
a.cc:15:9: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   15 |         cout << ans;
      |         ^~~~
      |         std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
Language: Java

import java.util.*;
public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		// 文字列の入力
		String s = sc.next();
		// 出力
		if(s.indexof("RRR") != -1){
		    System.out.println(3);
		}
		else if(s.indexof("RR") != -1){
		    System.out.println(2);
		}
		else if(s.indexof("R") != -1){
		    System.out.println(1);
		}
		else{
		    System.out.println(0);
		}
	}
}

Compiler output:
Main.java:8: error: cannot find symbol
		if(s.indexof("RRR") != -1){
		    ^
  symbol:   method indexof(String)
  location: variable s of type String
Main.java:11: error: cannot find symbol
		else if(s.indexof("RR") != -1){
		         ^
  symbol:   method indexof(String)
  location: variable s of type String
Main.java:14: error: cannot find symbol
		else if(s.indexof("R") != -1){
		         ^
  symbol:   method indexof(String)
  location: variable s of type String
3 errors
Language: Java

import java.util.*;
public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		// 文字列の入力
		String s = sc.next();
		// 出力
		if(s.indexof("RRR") != -1){
		    System.out.println(3);
		}
		else if(s.indexof("RR") != -1){
		    System.out.println(2);
		}
		else if(s.indexof("RRR") != -1){
		    System.out.println(1);
		}
		else{
		    System.out.println(0);
		}
	}
}

Compiler output:
Main.java:8: error: cannot find symbol
		if(s.indexof("RRR") != -1){
		    ^
  symbol:   method indexof(String)
  location: variable s of type String
Main.java:11: error: cannot find symbol
		else if(s.indexof("RR") != -1){
		         ^
  symbol:   method indexof(String)
  location: variable s of type String
Main.java:14: error: cannot find symbol
		else if(s.indexof("RRR") != -1){
		         ^
  symbol:   method indexof(String)
  location: variable s of type String
3 errors
Language: Java

import java.util.*;
public class Main {
	public static void main(String[] args){
		// 文字列の入力
		Scanner someString = new Scanner(System.in);
		char rChar = 'R';
        int rCount = 0;
      
		for (int i = 0; i < someString.length(); i++) {
        if(rCount==0 && someString.charAt(i) == rChar){
          rCount = 1;
        }
        if (someString.charAt(i) == rChar) {
          if(i>0 && someString.charAt(i-1) == rChar){
           rCount++;
          }
        }         
        }
      
      System.out.println(rCount);
      
	}
}

Compiler output:
Main.java:9: error: cannot find symbol
		for (int i = 0; i < someString.length(); i++) {
		                              ^
  symbol:   method length()
  location: variable someString of type Scanner
Main.java:10: error: cannot find symbol
        if(rCount==0 && someString.charAt(i) == rChar){
                                  ^
  symbol:   method charAt(int)
  location: variable someString of type Scanner
Main.java:13: error: cannot find symbol
        if (someString.charAt(i) == rChar) {
                      ^
  symbol:   method charAt(int)
  location: variable someString of type Scanner
Main.java:14: error: cannot find symbol
          if(i>0 && someString.charAt(i-1) == rChar){
                              ^
  symbol:   method charAt(int)
  location: variable someString of type Scanner
4 errors
Language: Java

import java.util.*;
public class Main {
	public static void main(String[] args){
		// 文字列の入力
		Scanner sc = new Scanner(System.in);
		char rChar = 'R';
        int rCount = 0;
      
		for (int i = 0; i < someString.length(); i++) {
        if(rCount==0 && someString.charAt(i) == rChar){
          rCount = 1;
        }
        if (someString.charAt(i) == rChar) {
          if(i>0 && someString.charAt(i-1) == rChar){
           rCount++;
          }
        }         
        }
      
      System.out.println(rCount);
      
	}
}

Compiler output:
Main.java:9: error: cannot find symbol
		for (int i = 0; i < someString.length(); i++) {
		                    ^
  symbol:   variable someString
  location: class Main
Main.java:10: error: cannot find symbol
        if(rCount==0 && someString.charAt(i) == rChar){
                        ^
  symbol:   variable someString
  location: class Main
Main.java:13: error: cannot find symbol
        if (someString.charAt(i) == rChar) {
            ^
  symbol:   variable someString
  location: class Main
Main.java:14: error: cannot find symbol
          if(i>0 && someString.charAt(i-1) == rChar){
                    ^
  symbol:   variable someString
  location: class Main
4 errors
Language: Java

public class Main {
    public static void main(String[] args) {
        int num = 5;
        if (s.indexOf("RRR") != -1){
          System.out.println(3);
        } else if (s.indexOf("RR") != -1){
          System.out.println(2);
        } else if (s.indexOf("R") != -1){
          System.out.println(1);
        } else {
          System.out.println(0);
        }
    }
}

Compiler output:
Main.java:4: error: cannot find symbol
        if (s.indexOf("RRR") != -1){
            ^
  symbol:   variable s
  location: class Main
Main.java:6: error: cannot find symbol
        } else if (s.indexOf("RR") != -1){
                   ^
  symbol:   variable s
  location: class Main
Main.java:8: error: cannot find symbol
        } else if (s.indexOf("R") != -1){
                   ^
  symbol:   variable s
  location: class Main
3 errors
Language: C++

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

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


Compiler output:
a.cc: In function 'int main()':
a.cc:8:41: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
    8 |   if(S[1] == 'R' && S[2] == 'R' && S[3] == "R"){
Language: C++

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

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


Compiler output:
a.cc: In function 'int main()':
a.cc:8:11: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
    8 |   if(S[1] == "R" && S[2] == "R" && S[3] == "R"){
a.cc:8:26: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
    8 |   if(S[1] == "R" && S[2] == "R" && S[3] == "R"){
a.cc:8:41: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
    8 |   if(S[1] == "R" && S[2] == "R" && S[3] == "R"){
a.cc:11:16: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   11 |   else if(S[1] == "R" && S[2] == "R"){
a.cc:11:31: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   11 |   else if(S[1] == "R" && S[2] == "R"){
a.cc:14:14: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   14 | else if(S[2] == "R" && S[3] == "R"){
a.cc:14:29: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   14 | else if(S[2] == "R" && S[3] == "R"){
a.cc:17:16: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   17 |   else if(S[1] == "S" && S[2] == "S" && S[2] == "S"){
a.cc:17:31: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   17 |   else if(S[1] == "S" && S[2] == "S" && S[2] == "S"){
a.cc:17:46: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   17 |   else if(S[1] == "S" && S[2] == "S" && S[2] == "S"){
Language: Java

import java.util.*;
public class Main {
	public static void main(String[] args){
		// 文字列の入力
		Scanner sc = new Scanner(System.in);
		char rChar = 'R';
        int rCount = 0;
      
		for (int i = 0; i < someString.length(); i++) {
        if (someString.charAt(i) == rChar) {
        rCount++;
        }         
        }
      
      System.out.println(rCount);
      
	}
}

Compiler output:
Main.java:9: error: cannot find symbol
		for (int i = 0; i < someString.length(); i++) {
		                    ^
  symbol:   variable someString
  location: class Main
Main.java:10: error: cannot find symbol
        if (someString.charAt(i) == rChar) {
            ^
  symbol:   variable someString
  location: class Main
2 errors
Language: Java

package beginner.contest_175;

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

public class A {

  public static void main(String[] args) {
    FastScanner fs = new FastScanner();
    String s = fs.next();
    int maxCount = 0;
    int idx = 0;
    while (idx < 3) {
      int start = idx;
      while (idx < 3 && s.charAt(idx) == 'R') {
        idx++;
      }
      maxCount = Math.max(maxCount, idx - start);
      idx++;
    }
    System.out.println(maxCount);
  }

  static class FastScanner {

    BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
    StringTokenizer st = new StringTokenizer("");

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

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

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

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


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

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

public class A {

  public static void main(String[] args) {
    FastScanner fs = new FastScanner();
    String s = fs.next();
    int maxCount = 0;
    int idx = 0;
    while (idx < 3) {
      int start = idx;
      while (idx < 3 && s.charAt(idx) == 'R') {
        idx++;
      }
      maxCount = Math.max(maxCount, idx - start);
      idx++;
    }
    System.out.println(maxCount);
  }

  static class FastScanner {

    BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
    StringTokenizer st = new StringTokenizer("");

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

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

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

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


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

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

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

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

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


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

    int strings(string s){
        
        int n = s.length();
        int ct=0;
        
        for(int i=0; i<n; i++){
            
            if(s[i]=='R')
                ct++;
            
            if(s[i]=='R' && s[i+1]=='R')
                ct+1;
            
        }
        
        
        if(ct>0)
            return ct;
        
        else return 0;
        
    }
    
    int main() {
        
        string s;
        cin >> s;
        
        cout << strings(s) << "\n";
        
        return 0;
        }
#include <bits/stdc++.h>
using namespace std;

    int strings(string s){
        
        int n = s.length();
        int ct=0;
        
        for(int i=0; i<n; i++){
            
            if(s[i]=='R')
                ct++;
            
            if(s[i]=='R' && s[i+1]=='R')
                ct+1;
            
        }
        
        
        if(ct>0)
            return ct;
        
        else return 0;
        
    }
    
    int main() {
        
        string s;
        cin >> s;
        
        cout << strings(s) << "\n";
        
        return 0;
        }

Compiler output:
a.cc:40:9: error: redefinition of 'int strings(std::string)'
   40 |     int strings(string s){
      |         ^~~~~~~
a.cc:5:9: note: 'int strings(std::string)' previously defined here
    5 |     int strings(string s){
      |         ^~~~~~~
a.cc:63:9: error: redefinition of 'int main()'
   63 |     int main() {
      |         ^~~~
a.cc:28:9: note: 'int main()' previously defined here
   28 |     int main() {
      |         ^~~~
Language: Java

public class Main {
  public static void main(String[] args) {
    String S = new java.util.Scanner(System.in).nextLine();
    switch (S) {
      case "SSS":
        System.out.println("0");
        break;
      case "SSR":
      case "SRS";
      case "RSS":
        System.out.println("1");
        break;
      case "SRR":
      case "RRS":
        System.out.println("2");
        break;
      case "RRR":
        System.out.println("3");
    }
  }
}


Compiler output:
Main.java:9: error: : or -> expected
      case "SRS";
                ^
1 error
Language: C++

#include<cstdio>
#include<iostream>
using namespace std;
int main(){
	int cnt=0;RRRR
	char s[4];
	scanf("%s",s+1);
	if(s[1]=='R'&&s[2]=='R')
	{
		cnt=2;
	}
	else if(s[3]=='R'&&s[2]=='R')
	{
		cnt=2;
	}
	else if(s[1]=='R'&&s[2]=='R'&&s[3]=='R')
	{
		cnt=3;
	}
	else if(s[1]=='R'||s[2]=='R'||s[3]=='R')
	{
		cnt=1;
	}
	printf("%d\n",cnt);
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:19: error: 'RRRR' was not declared in this scope
    5 |         int cnt=0;RRRR
      |                   ^~~~
a.cc:7:20: error: 's' was not declared in this scope
    7 |         scanf("%s",s+1);
      |                    ^
Language: C++

#include<iostream>
using namesapce std;
int main( )
{
 	string str;
  	cin>>str;
  	int count=0;
  	int len=str.length();
    for(int i=0;i<len;i++)
    {
     if(str[i]=='R' && (str[i+1]=='R' || str[i-1]=='R')) 
       count++;
      cout<<count;
    } 
  
  
  
}


Compiler output:
a.cc:2:7: error: expected nested-name-specifier before 'namesapce'
    2 | using namesapce std;
      |       ^~~~~~~~~
a.cc: In function 'int main()':
a.cc:5:9: error: 'string' was not declared in this scope
    5 |         string str;
      |         ^~~~~~
a.cc:5:9: note: suggested alternatives:
In file included from /usr/include/c++/14/iosfwd:41,
                 from /usr/include/c++/14/ios:40,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:1:
/usr/include/c++/14/bits/stringfwd.h:77:33: note:   'std::string'
   77 |   typedef basic_string<char>    string;
      |                                 ^~~~~~
In file included from /usr/include/c++/14/bits/locale_classes.h:40,
                 from /usr/include/c++/14/bits/ios_base.h:41,
                 from /usr/include/c++/14/ios:44:
/usr/include/c++/14/string:76:11: note:   'std::pmr::string'
   76 |     using string    = basic_string<char>;
      |           ^~~~~~
a.cc:6:9: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    6 |         cin>>str;
      |         ^~~
      |         std::cin
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:6:14: error: 'str' was not declared in this scope; did you mean 'std'?
    6 |         cin>>str;
      |              ^~~
      |              std
a.cc:13:7: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   13 |       cout<<count;
      |       ^~~~
      |       std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
Language: C++

#include<bits/stdc++.h>

using namespace std;

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


Compiler output:
a.cc:11:26: warning: missing terminating ' character
   11 |                 if(s[i]=='R)
      |                          ^
a.cc:11:26: error: missing terminating ' character
   11 |                 if(s[i]=='R)
      |                          ^~~
a.cc: In function 'int main()':
a.cc:13:17: error: expected primary-expression before 'else'
   13 |                 else
      |                 ^~~~
a.cc:12:25: error: expected ')' before 'else'
   12 |                 count++;
      |                         ^
      |                         )
   13 |                 else
      |                 ~~~~     
a.cc:11:19: note: to match this '('
   11 |                 if(s[i]=='R)
      |                   ^
Language: Java

package d;

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

public class RainyDay {

	public static void main(String[] args) throws IOException {
		BufferedReader f = new BufferedReader(new InputStreamReader(System.in));
		PrintWriter out = new PrintWriter(System.out);
		
		String line = f.readLine();
		int R_num = 0;
		for(char character: line.toCharArray()) {
			if(character  == 'R') {
				R_num++;
			}else if(character  == 'S') {
				R_num = 0;
			}
		}
		out.print(R_num);
		out.close();
	}
}


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

package d;

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

public class RainyDay {

	public static void main(String[] args) throws IOException {
		BufferedReader f = new BufferedReader(new InputStreamReader(System.in));
		PrintWriter out = new PrintWriter(System.out);
		
		String line = f.readLine();
		int R_num = 0;
		for(char character: line.toCharArray()) {
			if(character  == 'R') {
				R_num++;
			}else if(character  == 'S') {
				R_num = 0;
			}
		}
		out.print(R_num);	
	}
}


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

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

#define ll long long int
#define pb push_back
#define RONALDO              \
    ios::sync_with_stdio(0); \
    cin.tie(0);              \
    cout.tie(0);
#define endl "\n"
#define pii pair<ll, ll>
#define ff first
#define ss second
#define mod 1000000007
#define vi vector<ll>
#define mi map<ll, ll>

//LOVE U MESSI && CRistiano !!

//MY STAR MICHAEL PHELPS && USAIN BOLT !!

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


Compiler output:
a.cc: In function 'int main()':
a.cc:29:30: error: expected ')' before 's'
   29 |     if(s[0]=='R' && s[1]=='R' s[0]=='R')
      |       ~                      ^~
      |                              )
Language: C++

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

#define ll long long int
#define pb push_back
#define RONALDO              \
    ios::sync_with_stdio(0); \
    cin.tie(0);              \
    cout.tie(0);
#define endl "\n"
#define pii pair<ll, ll>
#define ff first
#define ss second
#define mod 1000000007
#define vi vector<ll>
#define mi map<ll, ll>

//LOVE U MESSI && CRistiano !!

//MY STAR MICHAEL PHELPS && USAIN BOLT !!

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

Compiler output:
a.cc: In function 'int main()':
a.cc:29:30: error: expected ')' before 's'
   29 |     if(s[0]=='R' && s[1]=='R' s[0]=='R')
      |       ~                      ^~
      |                              )
Language: C

 #include <stdio.h>
  2
  3 int main(){
  4         char day[3];
  5         int i, max_len = 0, len = 0;
  6         for(i = 0; i < 3; i++){
  7                 scanf("%c", &day[i]);
  8         }
  9         for(i = 0; i < 3; i++){
 10                 if(day[i] == 'R'){
 11                         len++;
 12                 }else{
 13                         if(max_len < len){
 14                                 max_len = len;
 15                         }
 16                         len = 0;
 17                 }
 18         }
 19         printf("%d\n", max_len);
 20         return 0;
 21 }

Compiler output:
main.c:2:3: error: expected identifier or '(' before numeric constant
    2 |   2
      |   ^
Language: C

#include<stdio.h>
int main(){
  int S=0,R=0;
  char w=0;
  scanf("%s",w);
  if(w==SSS){
   printf("3");
  }
  if(w=="SSR"){
    printf("2");
  }
  if(w=="SRR"){
    printf("1");
  }
  if(w=="SRS"){
    printf("1");
  }
  if(w=="RRR"){
    printf("0");
  }
  if(w=="RRS"){
    printf("1");
  }
  if(w=="RSS"){
    printf("2");
  }
  if(w=="RSR"){
    printf("1");
  }
  return 0;
}


Compiler output:
main.c: In function 'main':
main.c:6:9: error: 'SSS' undeclared (first use in this function)
    6 |   if(w==SSS){
      |         ^~~
main.c:6:9: note: each undeclared identifier is reported only once for each function it appears in
main.c:9:7: warning: comparison between pointer and integer
    9 |   if(w=="SSR"){
      |       ^~
main.c:12:7: warning: comparison between pointer and integer
   12 |   if(w=="SRR"){
      |       ^~
main.c:15:7: warning: comparison between pointer and integer
   15 |   if(w=="SRS"){
      |       ^~
main.c:18:7: warning: comparison between pointer and integer
   18 |   if(w=="RRR"){
      |       ^~
main.c:21:7: warning: comparison between pointer and integer
   21 |   if(w=="RRS"){
      |       ^~
main.c:24:7: warning: comparison between pointer and integer
   24 |   if(w=="RSS"){
      |       ^~
main.c:27:7: warning: comparison between pointer and integer
   27 |   if(w=="RSR"){
      |       ^~
Language: C

#include<stdio.h>
int main(){
  int S=0,R=0;
  char w=0;
  scanf("%s",w);
  if(w==SSS){
   printf("3");
  }
  if(w==SSR){
    printf("2");
  }
  if(w==SRR){
    printf("1");
  }
  if(w==SRS){
    printf("1");
  }
  if(w==RRR){
    printf("0");
  }
  if(w==RRS){
    printf("1");
  }
  if(w==RSS){
    printf("2");
  }
  if(w==RSR){
    printf("1");
  }
  return 0;
}


Compiler output:
main.c: In function 'main':
main.c:6:9: error: 'SSS' undeclared (first use in this function)
    6 |   if(w==SSS){
      |         ^~~
main.c:6:9: note: each undeclared identifier is reported only once for each function it appears in
main.c:9:9: error: 'SSR' undeclared (first use in this function)
    9 |   if(w==SSR){
      |         ^~~
main.c:12:9: error: 'SRR' undeclared (first use in this function)
   12 |   if(w==SRR){
      |         ^~~
main.c:15:9: error: 'SRS' undeclared (first use in this function)
   15 |   if(w==SRS){
      |         ^~~
main.c:18:9: error: 'RRR' undeclared (first use in this function)
   18 |   if(w==RRR){
      |         ^~~
main.c:21:9: error: 'RRS' undeclared (first use in this function)
   21 |   if(w==RRS){
      |         ^~~
main.c:24:9: error: 'RSS' undeclared (first use in this function)
   24 |   if(w==RSS){
      |         ^~~
main.c:27:9: error: 'RSR' undeclared (first use in this function)
   27 |   if(w==RSR){
      |         ^~~
Language: C

#include<stdio.h>
int main(){
  int S=0,R=0;
  char w={};
  scanf("%s",w);
  if(w==SSS){
   printf("3");
  }
  if(w==SSR){
    printf("2");
  }
  if(w==SRR){
    printf("1");
  }
  if(w==SRS){
    printf("1");
  }
  if(w==RRR){
    printf("0");
  }
  if(w==RRS){
    printf("1");
  }
  if(w==RSS){
    printf("2");
  }
  if(w==RSR){
    printf("1");
  }
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:6:9: error: 'SSS' undeclared (first use in this function)
    6 |   if(w==SSS){
      |         ^~~
main.c:6:9: note: each undeclared identifier is reported only once for each function it appears in
main.c:9:9: error: 'SSR' undeclared (first use in this function)
    9 |   if(w==SSR){
      |         ^~~
main.c:12:9: error: 'SRR' undeclared (first use in this function)
   12 |   if(w==SRR){
      |         ^~~
main.c:15:9: error: 'SRS' undeclared (first use in this function)
   15 |   if(w==SRS){
      |         ^~~
main.c:18:9: error: 'RRR' undeclared (first use in this function)
   18 |   if(w==RRR){
      |         ^~~
main.c:21:9: error: 'RRS' undeclared (first use in this function)
   21 |   if(w==RRS){
      |         ^~~
main.c:24:9: error: 'RSS' undeclared (first use in this function)
   24 |   if(w==RSS){
      |         ^~~
main.c:27:9: error: 'RSR' undeclared (first use in this function)
   27 |   if(w==RSR){
      |         ^~~
Language: C++

#include <bits/stdc++.h>
#define vc vector<int>
#define um unordered_map<int,int>
#define ll long long 
#define rep(i,a,b) for(__typeof(a) i=a; i<b; i++)
#define si(a) a.size()
#define all(a) a.begin(),a.end()
#define ss(a) a.second
#define ff(a) a.first
#define M 1000000
#define pb push_back
#define repit(i,a) for(auto i=a.begin(); i!=a.end(); i++)
#define take(arr,n) for(int i=0;i<n;i++)cin>>arr[i]
#define out(arr,n) for(int i=0;i<n;i++)cout<<arr[i]<<' '
#define yes cout<<"YES"<<endl
#define no cout<<"NO"<<endl
#define reprev(i,b,a) for(__typeof(b) i=b; i>=a; i--)
#define fastio ios_base::sync_with_stdio(false); cin.tie(NULL);cout.tie(NULL)
#define doublearray vector<vector<int>>
#define mod 1000000007
using namespace std;
ll max(ll a, ll b){ return a>b?a:b; }
ll min(ll a, ll b){ return a<b?a:b; }
ll gcd(ll a, ll b){
    if(b==0) return a;
    return gcd(b,a%b);
}
ll lcm(ll a, ll b){
    return (a*b)/gcd(a,b);
}
int main(){
    fastio;
    string s; cin>>s; bool t = false;
  	int c=0; rep(i,0,3){ if(s[i]=='R'){ c++; if(i<2&&s[i]==s[i+1]) t=true;}}
  	if(c==3) cout<<3<<endl;
  	else if(c==2){ if(t) cout<<2<<endl; else cout<<1<<endl; }
     else cout<<1<<endl;
    }
    return 0;
}





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

#include <bits/stdc++.h>
#define vc vector<int>
#define um unordered_map<int,int>
#define ll long long 
#define rep(i,a,b) for(__typeof(a) i=a; i<b; i++)
#define si(a) a.size()
#define all(a) a.begin(),a.end()
#define ss(a) a.second
#define ff(a) a.first
#define M 1000000
#define pb push_back
#define repit(i,a) for(auto i=a.begin(); i!=a.end(); i++)
#define take(arr,n) for(int i=0;i<n;i++)cin>>arr[i]
#define out(arr,n) for(int i=0;i<n;i++)cout<<arr[i]<<' '
#define yes cout<<"YES"<<endl
#define no cout<<"NO"<<endl
#define reprev(i,b,a) for(__typeof(b) i=b; i>=a; i--)
#define fastio ios_base::sync_with_stdio(false); cin.tie(NULL);cout.tie(NULL)
#define doublearray vector<vector<int>>
#define mod 1000000007
using namespace std;
ll max(ll a, ll b){ return a>b?a:b; }
ll min(ll a, ll b){ return a<b?a:b; }
ll gcd(ll a, ll b){
    if(b==0) return a;
    return gcd(b,a%b);
}
ll lcm(ll a, ll b){
    return (a*b)/gcd(a,b);
}
ll power(ll a, ll n)
{
    ll res = 1;
    while(n){
        if(n&1)
            res = (res*a)%mod;
            a = (a*a)%mod;
            n/=2;
    }
    return (res);
}
ll ncr(ll n, ll r){
    return (fact[n]*power((fact[n-r]*fact[r])%mod,mod-2)%mod)%mod;
}
ll ncrSum(ll n, ll x){
    ll ans = 0;
    rep(i,0,x+1) ans = (ans+ncr(n,i))%mod;
    return ans;
}
int main(){
    fastio;
    string s; cin>>s; bool t = false;
  	int c=0; rep(i,0,3){ if(s[i]=='R'){ c++; if(i<2&&s[i]==s[i+1]) t=true;}}
  	if(c==3) cout<<3<<endl;
  	else if(c==2){ if(t) cout<<2<<endl; else cout<<1<<endl; }
     else cout<<1<<endl;
    }
    return 0;
}





Compiler output:
a.cc: In function 'long long int ncr(long long int, long long int)':
a.cc:43:13: error: 'fact' was not declared in this scope
   43 |     return (fact[n]*power((fact[n-r]*fact[r])%mod,mod-2)%mod)%mod;
      |             ^~~~
a.cc: At global scope:
a.cc:58:5: error: expected unqualified-id before 'return'
   58 |     return 0;
      |     ^~~~~~
a.cc:59:1: error: expected declaration before '}' token
   59 | }
      | ^
Language: C

#include<stdio.h>
#define N 3
int main(){
    char str[N+1]={0};
    int mxchain=0,i=0,j=0;
    scanf("%s",str);
    for(i=0;i<N){
        if(str[i]=='R')j++;
        if(str[i]=='S'){
            if(j>mxchain)mxchain=j;
            j=0;
        }
    }
    return 0;
}


Compiler output:
main.c: In function 'main':
main.c:7:16: error: expected ';' before ')' token
    7 |     for(i=0;i<N){
      |                ^
Language: C++

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


void solve(){
	

	string s ;
	cin>>s ;

	int count=0 ;
	for(int i=0;i<s.length();i++){
		if(s[i]=='R' && count==0)
			count++ ;

		else if(s[i]=='R' && s[i-1]=='R')
			count++ ;
		else
			count=0 ;
	}

	cout<<count ;

}	

int main(){


	
	int y ;

	y=1 ;
	//cin>>y ;

	while(y--)
	{	
		solve() ;
	}

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


void solve(){
	

	string s ;
	cin>>s ;

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

		else if(s[i]=='R' && s[i-1]=='R')
			count++ ;
		else
			count=0 ;
	}

	cout<<count ;

}	

int main(){


	
	int y ;

	y=1 ;
	//cin>>y ;

	while(y--)
	{	
		solve() ;
	}

}


Compiler output:
a.cc:47:6: error: redefinition of 'void solve()'
   47 | void solve(){
      |      ^~~~~
a.cc:6:6: note: 'void solve()' previously defined here
    6 | void solve(){
      |      ^~~~~
a.cc:68:5: error: redefinition of 'int main()'
   68 | int main(){
      |     ^~~~
a.cc:27:5: note: 'int main()' previously defined here
   27 | int main(){
      |     ^~~~
Language: C

#include studio.h
 
int main(){
char s[4];
int result=0;
 
scanf("%s",s);
 
if(s[0]=='R'){
  if(s[1]=='R'){
    if(s[2]=='R'){
      result=3;
    }
    result=2;
  }else if(s[1]=='S'){
    result=1;
  }
}
 
if(s[0]=='S'){
  if(s[1]=='S'){
    if(s[2]=='S'){
      result=0;
    }else{
      result=1;
    }    
  }else{
    if(s[1]=='R'){
      if(s[2]=='R'){
        result=2;
      }
      result=1;
    }
  }
}
 
printf("%d",result);
}

Compiler output:
main.c:1:10: error: #include expects "FILENAME" or <FILENAME>
    1 | #include studio.h
      |          ^~~~~~
main.c: In function 'main':
main.c:7:1: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
    7 | scanf("%s",s);
      | ^~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
  +++ |+#include <stdio.h>
    1 | #include studio.h
main.c:7:1: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
    7 | scanf("%s",s);
      | ^~~~~
main.c:7:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:37:1: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
   37 | printf("%d",result);
      | ^~~~~~
main.c:37:1: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:37:1: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
main.c:37:1: note: include '<stdio.h>' or provide a declaration of 'printf'
Language: C

#include stdio.h

int main(){
char s[4];
int result=0;

scanf("%s",s);

if(s[0]=='R'){
  if(s[1]=='R'){
    if(s[2]=='R'){
      result=3;
    }
    result=2;
  }else if(s[1]=='S'){
    result=1;
  }
}

if(s[0]=='S'){
  if(s[1]=='S'){
    if(s[2]=='S'){
      result=0;
    }else{
      result=1;
    }    
  }else{
    if(s[1]=='R'){
      if(s[2]=='R'){
        result=2;
      }
      result=1;
    }
  }
}

printf("%d",result);
}

Compiler output:
main.c:1:10: error: #include expects "FILENAME" or <FILENAME>
    1 | #include stdio.h
      |          ^~~~~
main.c: In function 'main':
main.c:7:1: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
    7 | scanf("%s",s);
      | ^~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
  +++ |+#include <stdio.h>
    1 | #include stdio.h
main.c:7:1: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
    7 | scanf("%s",s);
      | ^~~~~
main.c:7:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:37:1: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
   37 | printf("%d",result);
      | ^~~~~~
main.c:37:1: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:37:1: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
main.c:37:1: note: include '<stdio.h>' or provide a declaration of 'printf'
Language: C

main(){int i,c=0;char s[3];scanf("%s",s);
 for(i=0;i<3;i++){if(s[i]==s[i+1]&&s[i]=='R')c++;}
      printf("%d",c)}


Compiler output:
main.c:1:1: error: return type defaults to 'int' [-Wimplicit-int]
    1 | main(){int i,c=0;char s[3];scanf("%s",s);
      | ^~~~
main.c: In function 'main':
main.c:1:28: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
    1 | main(){int i,c=0;char s[3];scanf("%s",s);
      |                            ^~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
  +++ |+#include <stdio.h>
    1 | main(){int i,c=0;char s[3];scanf("%s",s);
main.c:1:28: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
    1 | main(){int i,c=0;char s[3];scanf("%s",s);
      |                            ^~~~~
main.c:1:28: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:3:7: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
    3 |       printf("%d",c)}
      |       ^~~~~~
main.c:3:7: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:3:7: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
main.c:3:7: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:3:21: error: expected ';' before '}' token
    3 |       printf("%d",c)}
      |                     ^
      |                     ;
Language: C

main(){int i,c;char s;scanf("%s",s);
  for(i=0;i<3;i++){if(s[i]='R')c++;}printf("%d",c);}


Compiler output:
main.c:1:1: error: return type defaults to 'int' [-Wimplicit-int]
    1 | main(){int i,c;char s;scanf("%s",s);
      | ^~~~
main.c: In function 'main':
main.c:1:23: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
    1 | main(){int i,c;char s;scanf("%s",s);
      |                       ^~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
  +++ |+#include <stdio.h>
    1 | main(){int i,c;char s;scanf("%s",s);
main.c:1:23: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
    1 | main(){int i,c;char s;scanf("%s",s);
      |                       ^~~~~
main.c:1:23: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:2:24: error: subscripted value is neither array nor pointer nor vector
    2 |   for(i=0;i<3;i++){if(s[i]='R')c++;}printf("%d",c);}
      |                        ^
main.c:2:37: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
    2 |   for(i=0;i<3;i++){if(s[i]='R')c++;}printf("%d",c);}
      |                                     ^~~~~~
main.c:2:37: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:2:37: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
main.c:2:37: note: include '<stdio.h>' or provide a declaration of 'printf'
Language: C

main(){int i,c;char s;scanf("%d",s);
  for(i=0;i<3;i++){if(s[i]='R')c++;}printf("%d",c);}

Compiler output:
main.c:1:1: error: return type defaults to 'int' [-Wimplicit-int]
    1 | main(){int i,c;char s;scanf("%d",s);
      | ^~~~
main.c: In function 'main':
main.c:1:23: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
    1 | main(){int i,c;char s;scanf("%d",s);
      |                       ^~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
  +++ |+#include <stdio.h>
    1 | main(){int i,c;char s;scanf("%d",s);
main.c:1:23: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
    1 | main(){int i,c;char s;scanf("%d",s);
      |                       ^~~~~
main.c:1:23: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:2:24: error: subscripted value is neither array nor pointer nor vector
    2 |   for(i=0;i<3;i++){if(s[i]='R')c++;}printf("%d",c);}
      |                        ^
main.c:2:37: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
    2 |   for(i=0;i<3;i++){if(s[i]='R')c++;}printf("%d",c);}
      |                                     ^~~~~~
main.c:2:37: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:2:37: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
main.c:2:37: note: include '<stdio.h>' or provide a declaration of 'printf'
Language: C

#include<iostream>
#include<stdio.h>
using namespace std;

int main(){
    int N,L[100];
    int j,k,l,ans;
    cin>>N;
    for(int i=0;i<N;i++)cin>>L[i];
    for(j=0;j<N-2;j++){
        for(k=j+1;k<N-1;k++){
            for(l=k+1;l<N;l++){
                if(L[j]+L[k]>L[l]&&L[k]+L[l]>L[j]&&L[l]+L[j]>L[k]){
                    ans++;
                }
            }
        }
    }
    cout<<ans<<endl;

    return 0;
}

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