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

#include <iostream>
using namespace std;

int main() {
    int P, Q, R;
    cin >> P >> Q >> R;

    cout << P + Q + R - max({P ,Q , R}) << endl;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:28: error: no matching function for call to 'max(<brace-enclosed initializer list>)'
    8 |     cout << P + Q + R - max({P ,Q , R}) << endl;
      |                         ~~~^~~~~~~~~~~~
In file included from /usr/include/c++/14/string:51,
                 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,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_algobase.h:257:5: note: candidate: 'template<class _Tp> constexpr const _Tp& std::max(const _Tp&, const _Tp&)'
  257 |     max(const _Tp& __a, const _Tp& __b)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:257:5: note:   candidate expects 2 arguments, 1 provided
/usr/include/c++/14/bits/stl_algobase.h:303:5: note: candidate: 'template<class _Tp, class _Compare> constexpr const _Tp& std::max(const _Tp&, const _Tp&, _Compare)'
  303 |     max(const _Tp& __a, const _Tp& __b, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:303:5: note:   candidate expects 3 arguments, 1 provided
Language: C++

#include<iostream>

using namespace std;

int main(){
  int P, Q, R;
  
  cin>>P>>Q>>R;
  cout<<min(P+Q,Q+R,R+P)<<endl;
  
  return 0;
}

Compiler output:
In file included from /usr/include/c++/14/string:51,
                 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,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_algobase.h: In instantiation of 'constexpr const _Tp& std::min(const _Tp&, const _Tp&, _Compare) [with _Tp = int; _Compare = int]':
a.cc:9:12:   required from here
    9 |   cout<<min(P+Q,Q+R,R+P)<<endl;
      |         ~~~^~~~~~~~~~~~~
/usr/include/c++/14/bits/stl_algobase.h:284:17: error: '__comp' cannot be used as a function
  284 |       if (__comp(__b, __a))
      |           ~~~~~~^~~~~~~~~~
Language: C++

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

int main() {
    int p, q, r;
    cin >> p >> q >> r;

    int a, b, c, d, e, f;
    a << p + q;
    b << p + r;
    c << q + p;
    d << q + r;
    e << r + p;
    f << r + q;

    int result << std::min({a,b,c,d,e,f});

    cout << result endl;
  }

Compiler output:
a.cc: In function 'int main()':
a.cc:18:16: error: expected initializer before '<<' token
   18 |     int result << std::min({a,b,c,d,e,f});
      |                ^~
a.cc:18:41: error: expected primary-expression before ')' token
   18 |     int result << std::min({a,b,c,d,e,f});
      |                                         ^
a.cc:20:13: error: 'result' was not declared in this scope
   20 |     cout << result endl;
      |             ^~~~~~
Language: C++

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

int main() {
    int p, q, r;
    cin >> p >> q >> r;

    int a, b, c, d, e, f;
    a << p + q;
    b << p + r;
    c << q + p;
    d << q + r;
    e << r + p;
    f << r + q;

    int result == std::min({a,b,c,d,e,f});
    

Compiler output:
a.cc: In function 'int main()':
a.cc:18:16: error: expected initializer before '==' token
   18 |     int result == std::min({a,b,c,d,e,f});
      |                ^~
a.cc:18:41: error: expected primary-expression before ')' token
   18 |     int result == std::min({a,b,c,d,e,f});
      |                                         ^
a.cc:18:43: error: expected '}' at end of input
   18 |     int result == std::min({a,b,c,d,e,f});
      |                                           ^
a.cc:6:12: note: to match this '{'
    6 | int main() {
      |            ^
Language: C++

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

int main() {
    int p, q, r;
    cin >> p >> q >> r;

    int a, b, c, d, e, f;
    a << p + q;
    b << p + r;
    c << q + p;
    d << q + r;
    e << r + p;
    f << r + q;

    int answer << min({a,b,c,d,e,f});
    return answer;


Compiler output:
a.cc: In function 'int main()':
a.cc:18:16: error: expected initializer before '<<' token
   18 |     int answer << min({a,b,c,d,e,f});
      |                ^~
a.cc:18:36: error: expected primary-expression before ')' token
   18 |     int answer << min({a,b,c,d,e,f});
      |                                    ^
a.cc:19:12: error: 'answer' was not declared in this scope
   19 |     return answer;
      |            ^~~~~~
a.cc:19:19: error: expected '}' at end of input
   19 |     return answer;
      |                   ^
a.cc:6:12: note: to match this '{'
    6 | int main() {
      |            ^
Language: C++

#include<iostream>
using namespace std;

int main() {
	int p, q, r, m, a, b, c;
	cin >> p >> q >> r;
	a = p + q;
	b = p + r;
	c = q + r;

	if (a > b && b > c) {
		cout << c;
	}
	else if (a > c && c > b) {
		cout << b;
	}
	else if (b > a && a > c) {
		cout << c;
	}
	else if (b > c && c > a) {
		cout << a;
	}
	else if (c > a && a > b) {
		cout << b
	}
	else if {
		cout << a;
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:24:26: error: expected ';' before '}' token
   24 |                 cout << b
      |                          ^
      |                          ;
   25 |         }
      |         ~                 
a.cc:26:17: error: expected '(' before '{' token
   26 |         else if {
      |                 ^
      |                 (
Language: C

#include <stdio.h>
#include <stdlib.h>
 
long int func(int n, int *a, int *b) {
    long int x;
 
    if (n == 1 && a[0] !=1)
        x = 1;
    else if (n == 1 && a[0] == 1)
        x = 0;
    else if (n == 2) {
        if (a[0] >= 3)  
            x = 2;
        else if (a[0] == 1 && a[1] >= 3)
            x = 1; 
        else if (a[0] == 2 || a[1] == 2)
            x = 0;
    }
    else {
        if (b[n] == 1)
            x = 0;
        else if (b[n-1] == 0 && b[n-2] == 0)
            x = func(n-1, a, b) + func(n-2, a, b);
        else if (b[n-1] == 0 && b[n-2] == 1) 
            x = func(n-1, a, b);
        else if (b[n-1] == 1 && b[n-2] == 0)
            x = func(n-2, a, b);
    }
 
    return x;
}
 
int main(void) {
    int n, m;
    int *a, *b;
    int i;
    long int x;
    int flag = 0;
 
    scanf("%d%d", &n, &m);
 
    a = calloc(m, sizeof(int));
    b = calloc(n, sizeof(int));
 
    for (i = 0; i < m; i++) {
        scanf("%d", &a[i]);
        b[a[i]] = 1;
    }
 
    for (i = 0; i < m; i++) {
        if (a[i]+1 == a[i+1]) {
            printf("0\n");
            flag += 1;
            break;
        }
    }
 
    if (flag == 0) {
        int x = func(n, a, b) % 1000000007;
 
        printf("%d\n", x);
    }
 
    return 0;
}
#include <stdio.h>
#include <stdlib.h>

long int func(int n, int *a, int *b) {
    long int x;

    if (n == 1 && a[0] !=1)
        x = 1;
    else if (n == 1 && a[0] == 1)
        x = 0;
    else if (n == 2) {
        if (a[0] >= 3)  
            x = 2;
        else if (a[0] == 1 && a[1] >= 3)
            x = 1; 
        else if (a[0] == 2 || a[1] == 2)
            x = 0;
    }
    else {
        if (b[n] == 1)
            x = 0;
        else if (b[n-1] == 0 && b[n-2] == 0)
            x = func(n-1, a, b) + func(n-2, a, b);
        else if (b[n-1] == 0 && b[n-2] == 1) 
            x = func(n-1, a, b);
        else if (b[n-1] == 1 && b[n-2] == 0)
            x = func(n-2, a, b);
    }

    return x;
}

int main(void) {
    int n, m;
    int *a, *b;
    int i;
    long int x;
    int flag = 0;

    scanf("%d%d", &n, &m);

    a = calloc(m, sizeof(int));
    b = calloc(n, sizeof(int));

    for (i = 0; i < m; i++) {
        scanf("%d", &a[i]);
        b[a[i]] = 1;
    }

    for (i = 0; i < m; i++) {
        if (a[i]+1 == a[i+1]) {
            printf("0\n");
            flag += 1;
            break;
        }
    }

    if (flag == 0) {
        int x = func(n, a, b) % 1000000007;

        printf("%d\n", x);
    }

    return 0;
}

Compiler output:
main.c:69:10: error: redefinition of 'func'
   69 | long int func(int n, int *a, int *b) {
      |          ^~~~
main.c:4:10: note: previous definition of 'func' with type 'long int(int,  int *, int *)'
    4 | long int func(int n, int *a, int *b) {
      |          ^~~~
main.c:98:5: error: redefinition of 'main'
   98 | int main(void) {
      |     ^~~~
main.c:33:5: note: previous definition of 'main' with type 'int(void)'
   33 | int main(void) {
      |     ^~~~
Language: C++

#include <iostream>
using namespace std;

int main(){
  int a,b,c;
  cin >> a >> b >> c;
  cout << a + b + c - max({a,b,c}) << endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:26: error: no matching function for call to 'max(<brace-enclosed initializer list>)'
    7 |   cout << a + b + c - max({a,b,c}) << endl;
      |                       ~~~^~~~~~~~~
In file included from /usr/include/c++/14/string:51,
                 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,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_algobase.h:257:5: note: candidate: 'template<class _Tp> constexpr const _Tp& std::max(const _Tp&, const _Tp&)'
  257 |     max(const _Tp& __a, const _Tp& __b)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:257:5: note:   candidate expects 2 arguments, 1 provided
/usr/include/c++/14/bits/stl_algobase.h:303:5: note: candidate: 'template<class _Tp, class _Compare> constexpr const _Tp& std::max(const _Tp&, const _Tp&, _Compare)'
  303 |     max(const _Tp& __a, const _Tp& __b, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:303:5: note:   candidate expects 3 arguments, 1 provided
Language: C++

#include<iostream>
#include<cmath>

using namespace std;

int main(){
  int a[3];
  cin >> a[0] >> a[1] >> a[2];
  sort(a, a+3);
  cout << a[0] + a[1] << "\n";
  return 0; 
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:3: error: 'sort' was not declared in this scope; did you mean 'sqrt'?
    9 |   sort(a, a+3);
      |   ^~~~
      |   sqrt
Language: C++

#include <iostream>
#include <iomanip>
#include <string>
#include <vector>
#include <map>
#include <set>
#include <algorithm>
#include <cmath>
#include <climits>
#include <math.h>
#include <bitset>

#define P pair
#define X first
#define Y second
#define VSORT(v) sort(v.begin(), v.end())
#define VREV(v) reverse(v.begin(), v.end())
#define VMAX_P(v) max_element(v.begin(), v.end())
#define VMIN_P(v) min_element(v.begin(), v.end())
#define VMAX_IDX(v) distance(v.begin(), VMAX_P(v))
#define VMIN_IDX(v) distance(v.begin(), VMIN_P(v))
#define VCOPY(src, dst) copy(src.begin(), src.end(), back_inserter(dst))
#define SUPPER(src, dst) transform(src.begin(), src.end(), dst.begin(), toupper);
#define SLOWER(src, dst) transform(src.begin(), src.end(), dst.begin(), tolower);

using namespace std;
using ll = long long;

void displayVec(vector<int> v)
{
    for (int i = 0; i < v.size(); i++)
    {
        cout << v[i] << endl;
    }
    cout << endl;
}

int binarySearch(vector<int> v, int target)
{
    int left = -1;
    int right = v.size();

    while (right - left > 1)
    {
        int mid = left + (right - left) / 2;

        if (v[mid] >= target)
        {
            right = mid;
        }
        else
        {
            left = mid;
        }
    }

    if (right < v.size() && v[right] == target)
    {
        return right;
    }
    return -1;
}

void solve(int n, string s)
{
    if (n == 0)
    {
        cout << s << endl;
    }
    else
    {
        char c[3] = {'a', 'b', 'c'};
        for (int i = 0; i < 3; i++)
        {
            solve(n - 1, s + c[i]);
        }
    }
}

int main(int argc, const char *argv[])
{
    vector<int> v(3);
    for (int i = 0; i < 3; i++)
    {
        cin >> v[i];
    }
    vsort(v);
    cout << v[0] + v[1] << endl;
}


Compiler output:
a.cc: In function 'int main(int, const char**)':
a.cc:87:5: error: 'vsort' was not declared in this scope; did you mean 'qsort'?
   87 |     vsort(v);
      |     ^~~~~
      |     qsort
Language: C

#include <stdio.h>
int main(){
  int a,b,c,d,e,f,ans = 0;
int ans[6] = 0;
scanf("%d",&a);
scanf("%d",&b);
scanf("%d",&c);

if(a>b){
  d = a;
  a = b;
  b = d;
}

if(c<a){
  e = c;
  c = a;
  a = e;
}

if(b>c){
  f = c;
  c = b;
  b = f;
}

ans = a + b;

printf("%d",ans);
}
  


  
  
  
  
  







      
      

Compiler output:
main.c: In function 'main':
main.c:4:5: error: conflicting types for 'ans'; have 'int[6]'
    4 | int ans[6] = 0;
      |     ^~~
main.c:3:19: note: previous definition of 'ans' with type 'int'
    3 |   int a,b,c,d,e,f,ans = 0;
      |                   ^~~
Language: C

#include <stdio.h>
int main(){
  int a,b,c,d,e,f,ans = 0;
int ans[6] = 0;
scanf("%d",&a);
scanf("%d",&b);
scanf("%d",&c);

if(a>b){
  d = a;
  a = b;
  b = d;
}

if(c<a){
  e = c;
  c = a;
  a = e;
}

if(b>c){
  f = c;
  c = b;
  b = f
}

ans = a + b;

printf("%d",b);
}
  


  
  
  
  
  







      
      

Compiler output:
main.c: In function 'main':
main.c:4:5: error: conflicting types for 'ans'; have 'int[6]'
    4 | int ans[6] = 0;
      |     ^~~
main.c:3:19: note: previous definition of 'ans' with type 'int'
    3 |   int a,b,c,d,e,f,ans = 0;
      |                   ^~~
main.c:24:8: error: expected ';' before '}' token
   24 |   b = f
      |        ^
      |        ;
   25 | }
      | ~
Language: C++

#include<stdio.h>
main()
  int P,Q,R;
printf("Please input number P\n");
scanf("%d",&P);
printf("Please input number Q\n");
scanf("%d",&Q);
printf("Please input number R\n");
scanf("%d",&R);
if(1<=P<=100,if(1<=Q<=100,if(1<=R<=100

Compiler output:
a.cc:3:3: error: expected constructor, destructor, or type conversion before 'int'
    3 |   int P,Q,R;
      |   ^~~
a.cc:4:7: error: expected constructor, destructor, or type conversion before '(' token
    4 | printf("Please input number P\n");
      |       ^
a.cc:5:6: error: expected constructor, destructor, or type conversion before '(' token
    5 | scanf("%d",&P);
      |      ^
a.cc:6:7: error: expected constructor, destructor, or type conversion before '(' token
    6 | printf("Please input number Q\n");
      |       ^
a.cc:7:6: error: expected constructor, destructor, or type conversion before '(' token
    7 | scanf("%d",&Q);
      |      ^
a.cc:8:7: error: expected constructor, destructor, or type conversion before '(' token
    8 | printf("Please input number R\n");
      |       ^
a.cc:9:6: error: expected constructor, destructor, or type conversion before '(' token
    9 | scanf("%d",&R);
      |      ^
a.cc:10:1: error: expected unqualified-id before 'if'
   10 | if(1<=P<=100,if(1<=Q<=100,if(1<=R<=100
      | ^~
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main()
{
  int a,b,c,s,min1,min2;
  scanf("%d %d %d",&a,&b,&c);
  if(a<b&&a<c)
  {
    min=a;
  }
  else if(b<a&&b<c)
  {
   min=b;
  }
  else if(c<a&&c<b)
  {
    min=c;
  }
  s=s+min+b;
  printf("%d",s);
  return 0;
}
  sum=

Compiler output:
a.cc: In function 'int main()':
a.cc:9:9: error: overloaded function with no contextual type information
    9 |     min=a;
      |         ^
a.cc:13:8: error: overloaded function with no contextual type information
   13 |    min=b;
      |        ^
a.cc:17:9: error: overloaded function with no contextual type information
   17 |     min=c;
      |         ^
a.cc:19:6: error: invalid operands of types 'int' and '<unresolved overloaded function type>' to binary 'operator+'
   19 |   s=s+min+b;
      |     ~^~~~
a.cc: At global scope:
a.cc:23:3: error: 'sum' does not name a type
   23 |   sum=
      |   ^~~
Language: C++

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

int main(){
  int P;
  int Q;
  int R;
  cin >> P >> Q >> R;
  int num[3]={P,Q,R};
  int min=1000;
  int next=1000;
  for(int i=0;i<3;i++){
    if(min>num[i]){
      next=min;
      min=num[i];
    }
    cout << min + next << endl;
  
}

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

package a0609;

import java.util.Scanner;

public class Airplane {
	public static void main(String[] args) {
		try (Scanner sc = new Scanner(System.in)) {
			// 整数の入力
			int a = sc.nextInt();
			int b = sc.nextInt();
			int c = sc.nextInt();
			
			int firstmin = 0;
			int secondmin = 0;
			
			if(a<b & b<c){
				firstmin = a;
				secondmin = b;
			}else if(b<c & c<a){
				firstmin = b;
				secondmin = c;
			}else if(c<a & a<b){
				firstmin = c;
				secondmin = a;
			}else if(a<c & c<b){
				firstmin = a;
				secondmin = c;
			}else if(b<a & a<c){
				firstmin = b;
				secondmin = a;
			}else if(c<b & b<a){
				firstmin = c;
				secondmin = b;
			}else if(a==b & b==c){
				firstmin = a;
				secondmin = b;
			}else if(a==b & a<c){
				firstmin = a;
				secondmin = b;
			}else if(b==c & b<a){
				firstmin = b;
				secondmin = c;
			}else if(a==c & a<b){
				firstmin = a;
				secondmin = c;
			}else if(a==b & a>c){
				firstmin = c;
				secondmin = b;
			}else if(b==c & b>a){
				firstmin = a;
				secondmin = c;
			}else if(a==c & a>b){
				firstmin = b;
				secondmin = c;
			}
			
			int sum = firstmin + secondmin;
			// 出力
			System.out.println(sum);
		}
	}
}

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

import java.io.*; 
import java.util.Scanner;
import java.lang.Math;

public class Main {
  
	public static void main(String[] args){
      	
      	Scanner in = new Scanner(System.in);
		int N = in.nextInt();
      	int M = in.nextInt();
      
      	int[] rotos = new int[M];
      	for(int i=0;i<M;i++){
        	rotos[i]= in.nextInt();
        }
        
      	if(N=0) System.out.println(0);
      	else System.out.println(ways(rotos, N));
      	
	}
  	
  	public static int ways(int[] rotos, int steeps){
    	return waysAux(rotos, steeps, 0, 1);
    }
  
  	public static int waysAux(int[] rotos, int steeps, int counter, int pos){
      	if(posRota(pos, rotos)) return 0;
      	else{
        	if(pos>=steeps) return 1;
          	else{
            	counter+= waysAux(rotos,steeps,counter,pos+1);
            	counter+= waysAux(rotos,steeps,counter,pos+2);
            }
        }
      	return counter;
     
    }
  
    public static boolean posRota(int pos, int[]rotos){
      	for(int i=0; i< rotos.length; i++){
        	if (pos == rotos[i]) return true;
          	else return false;
        }
      	return false;
    }
  
}

Compiler output:
Main.java:18: error: incompatible types: int cannot be converted to boolean
      	if(N=0) System.out.println(0);
      	    ^
1 error
Language: C++

#include <bits/stdc++.h>
#include <stdio.h>
using namespace std;
const int MOD = 1000000007;
int fib_memo[10000] = {0};
int fib(int x) {
    if(x==0)return 0;
    if(x==1)return 1;
    if(fib_memo[x] != 0) {
        return fib_memo[x];
    }
    return fib_memo[x] = fib(x-1)+fib(x-2);
}
int main(){
  int n,m;  
  cin>>n>>m;
  long long ans=1
  if(m==0){
    ans=fib(n);
    ans%=MOD;
    cout<<ans<<endl;
  }
  else{
    vector<int>vec1(m);
    for(int i=0;i<m;i++){
      int a; cin>>a;
      vec1[i]=a;
    }
    sort(vec1.begin(),vec1.end());
    vec1.erase(unique(vec1.begin(),vec1.end()),vec1.end());
    long long size=vec1.size();
    for(int i=0;i<size;i++){
    }
    vector<int>vec2;
    vec2.push_back(vec1[0]+1);
    for(int i=1;i<size;i++){
      vec2.push_back(vec1[i]-vec1[i-1]);
    }
    vec2.push_back(n-vec1[size-1]+1);
    int yes=1;
    //. #.....
    for(int i=0;i<size+1;i++){
      if(vec2[i]<=1){
        yes=0;
        break;
      }
      else{
        int y=vec2[i]-1;
        ans*=fib(y);
        ans%=MOD;
      }
    }
    if(yes==0) cout<<0<<endl;
    else cout<<ans<<endl;
  }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:18:3: error: expected ',' or ';' before 'if'
   18 |   if(m==0){
      |   ^~
a.cc:23:3: error: 'else' without a previous 'if'
   23 |   else{
      |   ^~~~
Language: C++

#define lld unsigned long long int
#define MAX 1000000
#define rep(i,x) for(int i=0;i<x;i++)
#define repn(i,x) for(int i=1;i<=x;i++)
using namespace std;

lld fib(int n)
{
  /* Declare an array to store Fibonacci numbers. */
  lld f[n+2];   // 1 extra to handle case, n = 0
  lld i;

  /* 0th and 1st number of the series are 0 and 1*/
  f[0] = 0;
  f[1] = 1;

  for (i = 2; i <= n; i++)
  {
      /* Add the previous 2 numbers in the series
         and store it */
      f[i] = f[i-1] + f[i-2];
  }

  return f[n];
}

int n, w[MAX], c=0, aux=1, q, f;

lld r=1;
int main(){
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    cin >> n >> q;
    for(int i = 1; i<=q; i++){
        cin>>w[i];
        if(i!=1 && w[i]==w[i-1]+1)r=0;
    }
    if(r!=0){
        for(int i = 0; i<=n; i++){
            c++;
            if(i==w[aux]){
                aux++;
                f++;
                if(c>1)c--;
                if(f==1)r=fib(c);
                else r*=fib(c);
                c=0;
            }
            r= r%1000000007;
        }
        r*=fib(c);

    }



    cout<<r%1000000007<<endl;



}


Compiler output:
a.cc: In function 'int main()':
a.cc:31:5: error: 'ios_base' has not been declared
   31 |     ios_base::sync_with_stdio(false);
      |     ^~~~~~~~
a.cc:32:5: error: 'cin' was not declared in this scope
   32 |     cin.tie(NULL);
      |     ^~~
a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
  +++ |+#include <iostream>
    1 | #define lld unsigned long long int
a.cc:32:13: error: 'NULL' was not declared in this scope
   32 |     cin.tie(NULL);
      |             ^~~~
a.cc:1:1: note: 'NULL' is defined in header '<cstddef>'; this is probably fixable by adding '#include <cstddef>'
  +++ |+#include <cstddef>
    1 | #define lld unsigned long long int
a.cc:57:5: error: 'cout' was not declared in this scope
   57 |     cout<<r%1000000007<<endl;
      |     ^~~~
a.cc:57:5: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:57:25: error: 'endl' was not declared in this scope
   57 |     cout<<r%1000000007<<endl;
      |                         ^~~~
a.cc:1:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
  +++ |+#include <ostream>
    1 | #define lld unsigned long long int
Language: C

#include<stdio.h>

int main(void){
	int P,Q,R;
  	int i,j,k;
  scanf("%d%d%d",&P,&Q,&R);
  
  i = P+Q:
  j = Q+R;
  k = R+P;
  if(i > j)
	i = j;
  if(i > k)
    i = k;
   
  printf("%d",k);
  
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:8:10: error: expected ';' before ':' token
    8 |   i = P+Q:
      |          ^
      |          ;
Language: C

#include<stdio.h>

int main(void){
	int P,Q,R;
  scanf("%d%d%d",&P,&Q,&R);
  
  i = P+Q:
  j = Q+R;
  k = R+P;
  if(i > j){
	i = j;
  }
  if(i > k){
    i = k;
  }
  printf("%d",k);
  
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:7:3: error: 'i' undeclared (first use in this function)
    7 |   i = P+Q:
      |   ^
main.c:7:3: note: each undeclared identifier is reported only once for each function it appears in
main.c:7:10: error: expected ';' before ':' token
    7 |   i = P+Q:
      |          ^
      |          ;
main.c:9:3: error: 'k' undeclared (first use in this function)
    9 |   k = R+P;
      |   ^
main.c:10:10: error: 'j' undeclared (first use in this function)
   10 |   if(i > j){
      |          ^
Language: C

＃include <stdio.h>
 
int main(){
 int p, q, r;
 int min;
 
 scanf("%d%d%d", p, q, r);
 
 min=p+q;
 
 if(min > p+r){
  min = p+r;
 }else if(min > q+r){
  min = q+r;
 }
 
 printf("%d", min);
 return 0;
}

Compiler output:
main.c:1:11: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token
    1 | ＃include <stdio.h>
      |           ^
Language: Java

import java.io.*; 
import java.util.Scanner;
import java.lang.Math;

public class Main {
  
	public static void main(String[] args){
      	
      	Scanner in = new Scanner(System.in);
		int N = in.nextInt();
      	int M = in.nextInt();
      
      	int[] rotos = new int[M];
      	for(int i=0;i<M;i++){
        	rotos[i]= in.nextInt();
        }
        
      	System.out.println(ways(rotos, N));
      	
	}
  	
  	public static int ways(int[] rotos, int steeps){
      	int counter=0;
    	return waysAux(rotos, steeps, counter, 1);
    }
  
  	public static int waysAux(int[] rotos, int steeps, int counter, int pos){
      	if(posRota(pos, rotos)) return 0;
      	else{
        	if(pos>=steeps) return 1;
          	else{
            	counter+= waysAux(rotos,steeps,counter,pos+1);
            	counter+= waysAux(rotos,steeps,counter,pos+2);
            }
        }
    }
  
    public static boolean posRota(int pos, int[]rotos){
      	for(int i=0; i< rotos.length; i++){
        	if (pos == rotos[i]) return true;
          	else return false;
        }
    }
  
}

Compiler output:
Main.java:36: error: missing return statement
    }
    ^
Main.java:43: error: missing return statement
    }
    ^
2 errors
Language: C

#include<stdio.h>

int main(void){
	int P,Q,R;
  scanf("%d%d%d",&P,&Q,&R);
  
  i = P+Q:
  j = Q+R;
  k = R+P;
  if(i > j)
	i = j;
  if(i > k)
    i = k;
   
  printf("%d",i);
  
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:7:3: error: 'i' undeclared (first use in this function)
    7 |   i = P+Q:
      |   ^
main.c:7:3: note: each undeclared identifier is reported only once for each function it appears in
main.c:7:10: error: expected ';' before ':' token
    7 |   i = P+Q:
      |          ^
      |          ;
main.c:9:3: error: 'k' undeclared (first use in this function)
    9 |   k = R+P;
      |   ^
main.c:10:10: error: 'j' undeclared (first use in this function)
   10 |   if(i > j)
      |          ^
Language: C

#include<stdio.h>

int main(void){
	int P,Q,R;
  scanf("%d%d%d",&P,&Q,&R);
  
  i = P+Q:
  j = Q+R;
  k = R+P;
  if(i > j)
	i = j;
  if(i > k)
    i = k;
   
  printf("%d",k);
  
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:7:3: error: 'i' undeclared (first use in this function)
    7 |   i = P+Q:
      |   ^
main.c:7:3: note: each undeclared identifier is reported only once for each function it appears in
main.c:7:10: error: expected ';' before ':' token
    7 |   i = P+Q:
      |          ^
      |          ;
main.c:9:3: error: 'k' undeclared (first use in this function)
    9 |   k = R+P;
      |   ^
main.c:10:10: error: 'j' undeclared (first use in this function)
   10 |   if(i > j)
      |          ^
Language: Java

import java.util.*;
import java.lang.Math;
 
class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    int min = 100;
    int[] data = new int[3];
    data[0] = sc.nextInt();
    data[1] = sc.nextInt();
    data[2] = sc.nextInt();
    int[] sumData = new int[3]
    for(int i = 1; i < sumData.length;i++){
      sumData[i - 1] = data[i - 1] + data[i];
    }
 
    for(int i = 0; i < sumData.length; i++)
      min = Math.min(min,sumData[i]);
    System.out.println(min);
  }
}

Compiler output:
Main.java:12: error: ';' expected
    int[] sumData = new int[3]
                              ^
1 error
Language: C

#include<stdio.h>

int main(void){
	int P,Q,R;
  scanf("%d %d %d",&P,&Q,&R);
  
  i = P+Q:
  j = Q+R;
  k = R+P;
  if(i > j)
	i = j
  if(i > k)
    i = k
   
  printf("%d",k);
  
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:7:3: error: 'i' undeclared (first use in this function)
    7 |   i = P+Q:
      |   ^
main.c:7:3: note: each undeclared identifier is reported only once for each function it appears in
main.c:7:10: error: expected ';' before ':' token
    7 |   i = P+Q:
      |          ^
      |          ;
main.c:9:3: error: 'k' undeclared (first use in this function)
    9 |   k = R+P;
      |   ^
main.c:10:10: error: 'j' undeclared (first use in this function)
   10 |   if(i > j)
      |          ^
main.c:11:14: error: expected ';' before 'if'
   11 |         i = j
      |              ^
      |              ;
   12 |   if(i > k)
      |   ~~
Language: C++

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





int main(){
	int N,M;
	
	cin>>N>>M;
	int ans=0;
	vector<int>a(M+1);

	for(int i =0;i<M;i++){
		cin>>a[i];
	}

	vector<int>F(101);
	F[0]=0;
	F[1]=1;
	F[2]=1;
	for(int i =3;i<100;i++){
		F[i]=F[i-1]+F[i-2];
	}



	for(int i =0;i<M;i++){
		if(i==0){
			ans=F[a[0]];
			
		}else if(i=M-1){			
				ans=ans*F[N-a[M-1]];
				
		}else{
				ans=ans*F[a[i]-a[i-1]-1];
			}
		}
	}

	
	cout<<ans%1000000007;

	
}


Compiler output:
a.cc:43:9: error: 'cout' does not name a type
   43 |         cout<<ans%1000000007;
      |         ^~~~
a.cc:46:1: error: expected declaration before '}' token
   46 | }
      | ^
Language: C

＃include <stdio.h>

int main(){
 int p, q, r;
 int min;
 
 scanf("%d%d%d", p, q, r);
 
 min=p+q;
 
 if(min > p+r){
  min = p+r;
 }else if(min > q+r){
  min = q+r;
 }
 
 printf("%d", min);
 return 0;
}

Compiler output:
main.c:1:11: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token
    1 | ＃include <stdio.h>
      |           ^
Language: C

#include<stdio.h>
int max(int a,int b,int c)
{
  if(a>=b||a>=c)
    return a;
  else
  {
    if(b>=a||b>=c)
    {
      return b;
      else
      {
        return c;
      }
    }
  }
}
int main(void)
{
  int  p,q,r;
  int a=0;
  
  scanf("%d %d %d",&p,&q,&r);
  
  printf("%d",p+q+r-max(p,q,r));
  return 0;
}

Compiler output:
main.c: In function 'max':
main.c:11:7: error: expected '}' before 'else'
   11 |       else
      |       ^~~~
main.c: At top level:
main.c:17:1: error: expected identifier or '(' before '}' token
   17 | }
      | ^
Language: C++

#include <iostream>
#include <cstdio>
#include <cmath>
#include <cstdlib>
#include <algorithm>
#include <string>
#include <vector>
#include <queue> 
using namespace std;
int main(void){
    inr data[3];
    cin>>data[0]>>data[1]>>data[2];
    sort(data,data+3);
    cout<<data[0]+data[1]<<endl;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:5: error: 'inr' was not declared in this scope; did you mean 'int'?
   11 |     inr data[3];
      |     ^~~
      |     int
a.cc:12:14: error: invalid types '<unresolved overloaded function type>[int]' for array subscript
   12 |     cin>>data[0]>>data[1]>>data[2];
      |              ^
a.cc:12:23: error: invalid types '<unresolved overloaded function type>[int]' for array subscript
   12 |     cin>>data[0]>>data[1]>>data[2];
      |                       ^
a.cc:12:32: error: invalid types '<unresolved overloaded function type>[int]' for array subscript
   12 |     cin>>data[0]>>data[1]>>data[2];
      |                                ^
a.cc:13:19: error: invalid operands of types '<unresolved overloaded function type>' and 'int' to binary 'operator+'
   13 |     sort(data,data+3);
      |               ~~~~^~
a.cc:14:15: error: invalid types '<unresolved overloaded function type>[int]' for array subscript
   14 |     cout<<data[0]+data[1]<<endl;
      |               ^
a.cc:14:23: error: invalid types '<unresolved overloaded function type>[int]' for array subscript
   14 |     cout<<data[0]+data[1]<<endl;
      |                       ^
Language: Java

import java.util.*;
 
class Main{
  public studic main(String[] args){
    Scanner sc = new Scanner(System.in);
    int min = 100;
    int[] data = new int[3];
    data[0] = sc.nextInt();
    data[1] = sc.nextInt();
    data[2] = sc.nextInt();
 
    for(int i = 0; i < data.length; i++)
      min = Math.min(min,data[i]);
    System.out.println(min);
  }
}

Compiler output:
Main.java:4: error: cannot find symbol
  public studic main(String[] args){
         ^
  symbol:   class studic
  location: class Main
1 error
Language: Java

import java.util.*;
import java.lang.Math;

class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    
    int[] data = new int[3];
    data[0] = sc.nextInt();
    data[1] = sc.nextInt();
    data[2] = sc.nextInt();

    for(int i = 0; i < data.length; i++)
      min = Math.min(min,data[i]);
    System.out.println(min);
  }
}
    

Compiler output:
Main.java:14: error: cannot find symbol
      min = Math.min(min,data[i]);
      ^
  symbol:   variable min
  location: class Main
Main.java:14: error: cannot find symbol
      min = Math.min(min,data[i]);
                     ^
  symbol:   variable min
  location: class Main
Main.java:15: error: cannot find symbol
    System.out.println(min);
                       ^
  symbol:   variable min
  location: class Main
3 errors
Language: Java

import java.util.*;
import java.lang.Math;

class Main{
  public static main(String[] args){
    Scanner sc = new Scanner(System.in);
    
    int[] data = new int[3];
    data[0] = sc.nextInt();
    data[1] = sc.nextInt();
    data[2] = sc.nextInt();

    for(int i = 0; i < data.length; i++)
      min = Math.min(min,data[i]);
    System.out.println(min);
  }
}
    

Compiler output:
Main.java:5: error: invalid method declaration; return type required
  public static main(String[] args){
                ^
1 error
Language: Java

import java.util.*;
import java.lang.Math;

class Main{
  public studic main(String[] args){
    Scanner sc = new Scanner(System.in);
    
    int[] data = new int[3];
    data[0] = sc.nextInt();
    data[1] = sc.nextInt();
    data[2] = sc.nextInt();

    for(int i = 0; i < data.length; i++)
      min = Math.min(min,data[i]);
    System.out.println(min);
  }
}
    

Compiler output:
Main.java:5: error: cannot find symbol
  public studic main(String[] args){
         ^
  symbol:   class studic
  location: class Main
Main.java:14: error: cannot find symbol
      min = Math.min(min,data[i]);
      ^
  symbol:   variable min
  location: class Main
Main.java:14: error: cannot find symbol
      min = Math.min(min,data[i]);
                     ^
  symbol:   variable min
  location: class Main
Main.java:15: error: cannot find symbol
    System.out.println(min);
                       ^
  symbol:   variable min
  location: class Main
4 errors
Language: Java

import java.util.*;

class Main{
  public studic main(String[] args){
    Scanner sc = new Scanner(System.in);
    
    int[] data = new int[3];
    data[0] = sc.nextInt();
    data[1] = sc.nextInt();
    data[2] = sc.nextInt();

    for(int i = 0; i < data.length; i++)
      min = Math.min(min,data[i]);
    System.out.println(min);
  }
}
    

Compiler output:
Main.java:4: error: cannot find symbol
  public studic main(String[] args){
         ^
  symbol:   class studic
  location: class Main
Main.java:13: error: cannot find symbol
      min = Math.min(min,data[i]);
      ^
  symbol:   variable min
  location: class Main
Main.java:13: error: cannot find symbol
      min = Math.min(min,data[i]);
                     ^
  symbol:   variable min
  location: class Main
Main.java:14: error: cannot find symbol
    System.out.println(min);
                       ^
  symbol:   variable min
  location: class Main
4 errors
Language: C++

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

int main() {
  int P,Q,R;
  cin >> P >> Q >> R;
  vector<int> vc(3);
  vec = { P, Q, R};
  sort(vec.begin(), vec.end());
  cout << vec.at(0) + vec.at(1) <<endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:8:3: error: 'vec' was not declared in this scope; did you mean 'vc'?
    8 |   vec = { P, Q, R};
      |   ^~~
      |   vc
Language: C

#include<stdio.h>
int main(void)
{
    int P, Q, R;
    scanf("%d %d %d",&P, &Q, &R);
    if(P + Q < Q + R < R + P){
        printf("%d",P + Q);
    }else if(Q + R < R + P < P + Q){
        printf("%d",Q + R);
    }else if(R + P < P + Q < R + Q)
        printf("%d",R + P);
    }
  return 0;
}

Compiler output:
main.c:13:3: error: expected identifier or '(' before 'return'
   13 |   return 0;
      |   ^~~~~~
main.c:14:1: error: expected identifier or '(' before '}' token
   14 | }
      | ^
Language: C++


#include <iostream>
#include <tuple>
#include <sstream>
#include <vector>
#include <cmath>
#include <ctime>
#include <cassert>
#include <cstdio>
#include <queue>
#include <set>
#include <map>
#include <fstream>
#include <cstdlib>
#include <string>
#include <cstring>
#include <algorithm>
#include <numeric>

using ll = long long;
using namespace std;

#define FOR(i,a,b) for(int i = (int)(a); i <= (int)(b); i++)
#define LFOR(i,a,b) for(ll i = (ll)(a); i <= (ll)(b); i++)
#define FORR(i,a,b) for(int i = (int)(a); i >= (int)(b); i--)
#define LFORR(i,a,b) for(ll i = (int)(a); i >= (ll)(b); i--)
#define REP(i,n) FOR(i,0,(int)(n)-1)
#define LREP(i,n) LFOR(i,0,(ll)(n)-1)
#define REPR(i,n) FORR(i,(int)(n)-1,0)
#define LREPR(i,n) LFORR(i,(ll)(n)-1,0)

#define SIZ(v) int(v.size())
const int INF = 1e8;
const ll LINF = 1e15;





int main(){
  cin.tie(0);
  ios::sync_with_stdio(false);
  int p,q,r;
  cin >> p >> q >> r;
  cout << max(p+q,q+r,r+p);

}


Compiler output:
In file included from /usr/include/c++/14/string:51,
                 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,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:2:
/usr/include/c++/14/bits/stl_algobase.h: In instantiation of 'constexpr const _Tp& std::max(const _Tp&, const _Tp&, _Compare) [with _Tp = int; _Compare = int]':
a.cc:45:14:   required from here
   45 |   cout << max(p+q,q+r,r+p);
      |           ~~~^~~~~~~~~~~~~
/usr/include/c++/14/bits/stl_algobase.h:306:17: error: '__comp' cannot be used as a function
  306 |       if (__comp(__a, __b))
      |           ~~~~~~^~~~~~~~~~
Language: C

#include<stdio.h>
int main(void){
    int P, Q, R;
    scanf("%d %d %d",&P, &Q, &R);
    if(P + Q < Q + R < R + P){
        printf("%d",P + Q);
    }else if(Q + R < R + P < P + Q){
        printf("%d",Q + R);
    }else if(R + P < P + Q < R + Q)
        printf("%d",R + P);
    }
  return 0;
}

Compiler output:
main.c:12:3: error: expected identifier or '(' before 'return'
   12 |   return 0;
      |   ^~~~~~
main.c:13:1: error: expected identifier or '(' before '}' token
   13 | }
      | ^
Language: Java

import java.util.*;
public class coder6{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    int[] a = new int[3];
    for(int i=0; i<3; i++){
      a[i] = Integer.parseInt(sc.next());
    }

    Arrays.sort(a);

    System.out.println(a[0]+a[1]);
  }
}

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

include <stdio.h>
 
int main()
{
    int n=0, sum = 0, X;
    int t[100];
    int i = 0;
    int sun = 0;
    for(n=0; n<100 ;n++)
    {
        printf("%d個目の数値を入力してください=",n+1);
        scanf("%d",&t[n]);
        sum = sum + t[n];
    }
    
    while{
    sun = sun + t[i];
    i = i + 1;
       if (sun > sum/2) {
                break;
        }
    }
  if(sum/2-sun > sun+t[i+1]-sum/2 ){
  i = i+1;
  }
 
 
    printf("%d\n",i);
    return 0;
}

Compiler output:
main.c:1:9: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token
    1 | include <stdio.h>
      |         ^
Language: C

#include<stdio.h>
int main(void){
    int P, Q, R;
    scanf("%d %d %d",&P, &Q, &R);
    if(P < Q < R){
        printf("%d",P + Q);
    }else if(Q < R < P){
        printf("%d",Q + R);
    }else if(R < P < Q){
        printf("%d",R + P);
    }else if(P = Q = R){
        pritf("%d",P + Q);
    }
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:12:9: error: implicit declaration of function 'pritf'; did you mean 'printf'? [-Wimplicit-function-declaration]
   12 |         pritf("%d",P + Q);
      |         ^~~~~
      |         printf
Language: Java

import java.util.Scanner;

class Main{
	public static void main(String[] args){
    	Scanner sc = new Scanner(System.in);
      	int P,Q,R;
      	int max;
      	P = sc.nextInt();
      	Q = sc.nextInt();
      	R = sc.nextInt();
      
      	if(P >= Q){
        	if(P >= R){
            	max = Q + R;
            }else{
            	max = P + R;
            }
        }else if(Q >= R){
        		max = P + R;
         	if(R >= Q){
						max = P + Q;
				}
			}
      
      	System.out.println(max);
    }
}


Compiler output:
Main.java:25: error: variable max might not have been initialized
      	System.out.println(max);
      	                   ^
1 error
Language: C

include <stdio.h>
 
int main()
{
    int n=0, sum = 0, X;
    int t[100];
    int i = 0;
    int sun = 0;
    for(n=0; n<100 ;n++)
    {
        printf("%d個目の数値を入力してください=",n+1);
        scanf("%d",&t[n]);
        sum = sum + t[n];
    }
    
    while{
    sun = sun + t[i];
    i = i + 1;
       if (sun > sum/2) {
                break;
        }
    }
  if(sum/2-sun > sun+t[i+1] ){
  i = i+1;
  }
 
 
    printf("%d\n",i);
    return 0;
}

Compiler output:
main.c:1:9: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token
    1 | include <stdio.h>
      |         ^
Language: C

#include <stdio.h>
 
int main()
{
    int n=0, sum = 0, X;
    int t[100];
    int i = 0;
    int sun = 0;
    for(n=0; n<100 ;n++)
    {
        printf("%d個目の数値を入力してください=",n+1);
        scanf("%d",&t[n]);
        sum = sum + t[n];
    }
    
    while{
    sun = sun + t[i];
    i = i + 1;
       if (sun > sum/2;) {
                break;
        }
    }
  if(sum/2-sun > sun+t[i+1] ){
  i = i+1;
  }
 
 
    printf("%d\n",i);
    return 0;
}

Compiler output:
main.c: In function 'main':
main.c:16:10: error: expected '(' before '{' token
   16 |     while{
      |          ^
      |          (
main.c:19:23: error: expected ')' before ';' token
   19 |        if (sun > sum/2;) {
      |           ~           ^
      |                       )
Language: C++

int main(){

    int a[3],ans=200;

    for(int i=0;i<3;i++){
        cin>>a[i];
    }

    for(int i=0;i<2;i++){
        for(int j=n+1;j<3;j++){
            if(a[i]+a[j]<ans){
                ans=a[i]+a[j];
            }
        }
    }

    cout<<ans<<endl;

    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:9: error: 'cin' was not declared in this scope
    6 |         cin>>a[i];
      |         ^~~
a.cc:10:19: error: 'n' was not declared in this scope
   10 |         for(int j=n+1;j<3;j++){
      |                   ^
a.cc:17:5: error: 'cout' was not declared in this scope
   17 |     cout<<ans<<endl;
      |     ^~~~
a.cc:17:16: error: 'endl' was not declared in this scope
   17 |     cout<<ans<<endl;
      |                ^~~~
Language: Java

import java.util.Scanner;

class Main{
	public static void main(String[] args){
    	Scanner sc = new Scanner(System.in);
      	int P,Q,R;
      	int max;
      	P = sc.nextInt();
      	Q = sc.nextInt();
      	R = sc.nextInt();
      
      	if(P >= Q){
        	if(P >= R){
            	max = Q + R;
            }else{
            	max = P + R;
            }
        }else if(Q >= R){
        		max = P + R;
        }else if(R >= Q){
						max = P + Q;
				}
      
      	System.out.println(max);
    }
}


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

import java.util.*;
public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int a = sc.nextInt();
		int b = sc.nextInt();
		int c = sc.nextInt();
		int d = a
      	if (b<=d){
          d = b;
        }
      	if (c<=d){
          d = c;
        }
		System.out.println(d);
	}
}

Compiler output:
Main.java:8: error: ';' expected
		int d = a
		         ^
1 error
Language: Java

import java.util.*;
public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int a = sc.nextInt();
		int b = sc.nextInt();
		int c = sc.nextInt();
		int d = a
      	if (b=<d){
          d = b;
        }
      	if (c=<d){
          d = c;
        }
		System.out.println(d);
	}
}

Compiler output:
Main.java:8: error: ';' expected
		int d = a
		         ^
Main.java:9: error: > or ',' expected
      	if (b=<d){
      	        ^
Main.java:12: error: > or ',' expected
      	if (c=<d){
      	        ^
3 errors
Language: C++

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

int main() {
  int p, q, r;
  cin >> p >> q >> r;

  if ( p+r <= p+q && p+r <= q+r) {
    cout << p+r << endl;
  }

  else if ( p+q <= p+r && p+q <= q+r) {
    cout << p+q << endl;
  }
  else if (q+r <= p+r && q+r <= p+q){
    cout << q+r << endl;
  }
  }
  
  
}

Compiler output:
a.cc:21:1: error: expected declaration before '}' token
   21 | }
      | ^
Language: C

#include<stdio.h>
int main(void)
{
  int  p,q,r;
  int a=0;
  
  scanf("%d %d %d",&p,&q,&r);
  a=p;
  if(a<=q)
    a=q;
  else
  {
    if(a<=r)
      a=r;
  }
  printf("%d",p+q+r-a);
  return 0;

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

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

const int mod=1e9+7;
const int N=100010;

int main()
{ 
int arr[3];
cin>>arr[0]>>arr[1]>>arr[2];
sort(arr,arr+3)
cout<<arr[0]+arr[1];
}



Compiler output:
a.cc: In function 'int main()':
a.cc:11:16: error: expected ';' before 'cout'
   11 | sort(arr,arr+3)
      |                ^
      |                ;
   12 | cout<<arr[0]+arr[1];
      | ~~~~
Language: Java

import java.util.*;
public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int a = sc.nextInt();
		int b = sc.nextInt();
		int c = sc.nextInt();
        int ab = a+b;
        int bc = b+c;
        int ca = c+a;
		int s = Math.min(ab,bc);
      	int w = Math.min(bc,ca)
		System.out.println(w);
	}
}

Compiler output:
Main.java:12: error: ';' expected
      	int w = Math.min(bc,ca)
      	                       ^
1 error
Language: Java

import java.util.*;
public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int a = sc.nextInt();
		int b = sc.nextInt();
		int c = sc.nextInt();
        int ab = a+b;
        int bc = b+c;
        int ca = c+a;
		int s = Math.min(ab,bc,ca);
		System.out.println(s);
	}
}

Compiler output:
Main.java:11: error: no suitable method found for min(int,int,int)
		int s = Math.min(ab,bc,ca);
		            ^
    method Math.min(int,int) is not applicable
      (actual and formal argument lists differ in length)
    method Math.min(long,long) is not applicable
      (actual and formal argument lists differ in length)
    method Math.min(float,float) is not applicable
      (actual and formal argument lists differ in length)
    method Math.min(double,double) is not applicable
      (actual and formal argument lists differ in length)
1 error
Language: Java


import java.util.*;
public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int a = sc.nextInt();
		int b = sc.nextInt();
		int c = sc.nextInt();
		int s = Math.min(a+b,b+c,c+a);
		System.out.println(s);
	}
}

Compiler output:
Main.java:9: error: no suitable method found for min(int,int,int)
		int s = Math.min(a+b,b+c,c+a);
		            ^
    method Math.min(int,int) is not applicable
      (actual and formal argument lists differ in length)
    method Math.min(long,long) is not applicable
      (actual and formal argument lists differ in length)
    method Math.min(float,float) is not applicable
      (actual and formal argument lists differ in length)
    method Math.min(double,double) is not applicable
      (actual and formal argument lists differ in length)
1 error