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

using System;
using System.Collections.Generic;
using System.Linq;

namespace ProjectContest
{
    class Test
    {
        static void Main()
        {
            var v = Array.ConvertAll(Console.ReadLine().Split(), Convert.ToInt32);
            int a = v[0], b = v[1], c = v[2];
            Console.WriteLine(Math.Min(Math.Min(a, b) + c, a + b));
        }

    }
}

Compiler output:
a.cc:1:7: error: expected nested-name-specifier before 'System'
    1 | using System;
      |       ^~~~~~
a.cc:2:7: error: expected nested-name-specifier before 'System'
    2 | using System.Collections.Generic;
      |       ^~~~~~
a.cc:3:7: error: expected nested-name-specifier before 'System'
    3 | using System.Linq;
      |       ^~~~~~
a.cc:16:6: error: expected ';' after class definition
   16 |     }
      |      ^
      |      ;
a.cc: In static member function 'static void ProjectContest::Test::Main()':
a.cc:11:13: error: 'var' was not declared in this scope
   11 |             var v = Array.ConvertAll(Console.ReadLine().Split(), Convert.ToInt32);
      |             ^~~
a.cc:12:21: error: 'v' was not declared in this scope
   12 |             int a = v[0], b = v[1], c = v[2];
      |                     ^
a.cc:13:13: error: 'Console' was not declared in this scope
   13 |             Console.WriteLine(Math.Min(Math.Min(a, b) + c, a + b));
      |             ^~~~~~~
a.cc:13:31: error: 'Math' was not declared in this scope
   13 |             Console.WriteLine(Math.Min(Math.Min(a, b) + c, a + b));
      |                               ^~~~
a.cc:13:52: error: 'b' was not declared in this scope
   13 |             Console.WriteLine(Math.Min(Math.Min(a, b) + c, a + b));
      |                                                    ^
a.cc:13:57: error: 'c' was not declared in this scope
   13 |             Console.WriteLine(Math.Min(Math.Min(a, b) + c, a + b));
      |                                                         ^
Language: C

#include<stdio.h>

int main()
{
	int a, b, c,d;
	scanf_s("%d", &a);
	scanf_s("%d", &b);
	scanf_s("%d", &c);
	if (a >= b) {
		a = b;
	}
	if (b >= c) {
		b = c;
	}
	d = a + b;
	printf("%d\n", d);
    return 0;
}



Compiler output:
main.c: In function 'main':
main.c:6:9: error: implicit declaration of function 'scanf_s'; did you mean 'scanf'? [-Wimplicit-function-declaration]
    6 |         scanf_s("%d", &a);
      |         ^~~~~~~
      |         scanf
Language: C++

//JSD
#include<iostream>
#define ll long long 
using namespace std;
int main(){
  ll p,q,r;
  cin>>p>>q>>r;
  cout<<min(p+q,(min(q+r,p+r)));
  reutrn 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:3: error: 'reutrn' was not declared in this scope
    9 |   reutrn 0;
      |   ^~~~~~
Language: Java

import java.util.*;

public class main{
  public static void main(String[] args){
    Scanner sc =new Scanner(System.in);

    int n,i,t,min,s1,s2;
    int w[];

    n = sc.nextInt();

    w = new int[n];

    for(i=0;i<n;i++){
      w[i] = sc.nextInt();
    }
    min = 99999;
    for(t=1;t<n;t++){
      s1=0;
      s2=0;
      for(i=0;i<t;i++){
        s1 += w[i];
      }
      for(;i<n;i++){
        s2 += w[i];
      }
      if(s1>s2){
        min = s1-s2;
      }else{
        min = s2-s1;
      }

    }
    System.out.println(min);
  }
}


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

import java.util.*;

public class main{
  public static void main(String[] args){
    Scanner sc =new Scanner(System.in);

    int n,i,t,min,s1,s2;
    int w[];

    n = sc.nextInt();

    w = new int[n];

    for(i=0;i<n;i++){
      w[i] = sc.nextInt();
    }
    min = 99999;
    for(t=1;t<n,t++){
      s1=0;
      s2=0;
      for(i=0;i<t;i++){
        s1 += w[i];
      }
      for(;i<n;i++){
        s2 += w[i];
      }
      if(s1>s2){
        min = s1-s2;
      }else{
        min = s2-s1;
      }

    }
    System.out.println(min);
  }
}


Compiler output:
Main.java:18: error: ';' expected
    for(t=1;t<n,t++){
               ^
1 error
Language: Java

import java.util.*;

public class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    int i,j,min;
    int[] a = new int[3];

    for(i=0;i<3;i++){
      a[i] = sc.nextInt();    
    }
    
    min = 99999;

    for(i=o;i<3;i++){
      for(j=0;j<3;j++){
        if(i != j){
          if(min>a[i]+a[j]){
            min = a[i]+a[j];
          
          }
        }
      }
    }
    System.out.print(min);
  }
}

Compiler output:
Main.java:15: error: cannot find symbol
    for(i=o;i<3;i++){
          ^
  symbol:   variable o
  location: class Main
1 error
Language: Java

import java.util.*;

public class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    int i,j,min;
    int[] a = new [3];

    for(i=0;i<3;i++){
      a[i] = sc.nextInt();    
    }
    
    min = 99999;

    for(i=o;i<3;i++){
      for(j=0;j<3;j++){
        if(i != j){
          if(min>a[i]+a[j]){
            min = a[i]+a[j];
          
          }
        }
      }
    }
    System.out.print(min);
  }
}

Compiler output:
Main.java:7: error: <identifier> expected
    int[] a = new [3];
                 ^
1 error
Language: C++

#include<bits/stdc++.h>
using namespace std;
int ans;
int P;
int Q;
int R;
int main(){
  cin>>P>>Q>>R;
  ans=P+Q+R-max{(P,Q,R)};
  cout<<ans<<endl;
}
  

Compiler output:
a.cc: In function 'int main()':
a.cc:9:12: error: invalid operands of types 'int' and '<unresolved overloaded function type>' to binary 'operator-'
    9 |   ans=P+Q+R-max{(P,Q,R)};
      |       ~~~~~^~~~
Language: C++

#include<iostream>
using namespace std;
int ans;
int P;
int Q;
int R;
int main(){
  cin>>P>>Q>>R;
  ans=P+Q;
  if(ans>=Q+R)
  {ans=Q+R;
  }
   if(ans>=P+R)
   {ans=P+R;
   }
    if(ans>=Q+R)
    {ans=Q+R
    }
      if(ans>=R+P)
      {ans=R+P
      }
        if(ans<=Q+P)
        {ans=Q+P}
  cout<<ans<<endl;
}
  

Compiler output:
a.cc: In function 'int main()':
a.cc:17:13: error: expected ';' before '}' token
   17 |     {ans=Q+R
      |             ^
      |             ;
   18 |     }
      |     ~        
a.cc:20:15: error: expected ';' before '}' token
   20 |       {ans=R+P
      |               ^
      |               ;
   21 |       }
      |       ~        
a.cc:23:17: error: expected ';' before '}' token
   23 |         {ans=Q+P}
      |                 ^
      |                 ;
Language: C++

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

int main(void)
{
  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:7:6: error: expected ';' before 'P'
    7 |   cin  P >> Q >> R;
      |      ^ ~
      |      ;
Language: C++

#include <iostream>
using namespace std;

int main(void)
{
  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:7:6: error: expected ';' before 'P'
    7 |   cin  P >> Q >> R;
      |      ^ ~
      |      ;
a.cc:9:28: error: no matching function for call to 'max(<brace-enclosed initializer list>)'
    9 |   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 <cstdio>
#include <algorithm>
using namespace std;
int main(){
  scanf("%d%d%d",&a,&b,&c);
  printf("%d\n",min(a+b,min(a+c,b+c)));
  return 0;
  }

Compiler output:
a.cc: In function 'int main()':
a.cc:5:19: error: 'a' was not declared in this scope
    5 |   scanf("%d%d%d",&a,&b,&c);
      |                   ^
a.cc:5:22: error: 'b' was not declared in this scope
    5 |   scanf("%d%d%d",&a,&b,&c);
      |                      ^
a.cc:5:25: error: 'c' was not declared in this scope
    5 |   scanf("%d%d%d",&a,&b,&c);
      |                         ^
Language: C++

#include <iostream>
using namespace std;

int main(){
	int a[3];
	for(int i=0; i<3; i++) cin >> a[i];
	sort(a, a+3);
	cout << a[0] + a[1] << endl;
}

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

#include <stdio.h>
using namespace std;
int SD(){int x; scanf("%d" , &x); return x;}
int main()
{
 	int a = SD() , b = SD() , c = SD();
  	printf("%d" , min(a + b , min(a + c , b + c)) );
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:35: error: 'min' was not declared in this scope; did you mean 'main'?
    7 |         printf("%d" , min(a + b , min(a + c , b + c)) );
      |                                   ^~~
      |                                   main
a.cc:7:23: error: 'min' was not declared in this scope; did you mean 'main'?
    7 |         printf("%d" , min(a + b , min(a + c , b + c)) );
      |                       ^~~
      |                       main
Language: C++

    #include <bits/stdc++.h>
    using namespace std;
    int main()
    {
      int arr[3];
      for(int i=0;i<3;i++)
        cin>>arr[i];
      sort(arr,arr+n);
      cout<<arr[0]+arr[1];
      return 0;
    }

Compiler output:
a.cc: In function 'int main()':
a.cc:8:20: error: 'n' was not declared in this scope; did you mean 'yn'?
    8 |       sort(arr,arr+n);
      |                    ^
      |                    yn
Language: C++

#include <bits/stdc++>
using namespace std;
int main()
{
  int arr[3];
  for(int i=0;i<3;i++)
    cin>>arr[i];
  sort(arr,arr+n);
  cout<<arr[0]+arr[1];
  return 0;
}

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

#include <bits/stdc++.h>

using namespace std;

int main(void){
  vector<int> v;
  int p, q, r;
  cin >> p >> q >> r;
  v.push_back(p), v.push_back(q), v_push_back(r);
  sort(v.begin(), v.end());
  cout << v[0] + v[1] << endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:35: error: 'v_push_back' was not declared in this scope
    9 |   v.push_back(p), v.push_back(q), v_push_back(r);
      |                                   ^~~~~~~~~~~
Language: C++

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

int main() {
  long long n, m, inf = 100000000000000;
  cin >> n >> m;
  vector<long long> a(m), f(n+1, inf);
  for(int i = 0; i < m; i++) {
    cin >> a.at(i);
    f.at(a.at(i)) = 0;
  }
  f.at(0) = 1;
  if(f.at(1) != 0) f.at(1) = 1;
  for(int i = 2; i <= n; i++) {
    if(f.at(i) == inf) {
      f.at(i) = f.at(i-1) + f.at(i-2);
    }
  }
  cout << f.at(n) % 1000000007(long long);
}


Compiler output:
a.cc: In function 'int main()':
a.cc:19:32: error: expected primary-expression before 'long'
   19 |   cout << f.at(n) % 1000000007(long long);
      |                                ^~~~
a.cc:19:41: error: expression cannot be used as a function
   19 |   cout << f.at(n) % 1000000007(long long);
      |                                         ^
Language: C++

#include <iostream>
using namespace std;
int main(void){
    // Your code here!
    int p,q,r;
    cin>>p>>q>>r;
    cout<<p+q+r-max({p,q,r})<<endl;
  
}


Compiler output:
a.cc: In function 'int main()':
a.cc:7:20: error: no matching function for call to 'max(<brace-enclosed initializer list>)'
    7 |     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>
#include<stdio.h>
using namespace std;

int main()
{
	cout << "P,Q,Rを入力してください"<<endl;
	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:11:32: error: no matching function for call to 'max(<brace-enclosed initializer list>)'
   11 |         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: Java

import java.util.Scanner;

class Main {
	public static void main(String[] args) {

		Scanner sc = new Scanner(System.in);
		int p = sc.nextInt();
		int q = sc.nextInt();
		int r = sc.nextInt();

		int time[] = new int[3];
		time[0] = p + q;
		time[1] = r + q;
		time[2] = p + r;

		Arrays.sort(time);

		System.out.println(time[0]);
	}
}


Compiler output:
Main.java:16: error: cannot find symbol
		Arrays.sort(time);
		^
  symbol:   variable Arrays
  location: class Main
1 error
Language: C++

import Data.List

main = do
  a <- (map read) . words <$> getLine
  putStrLn $ show $ (head (sort a) + head (tail (sort a)))


Compiler output:
a.cc:1:1: error: 'import' does not name a type
    1 | import Data.List
      | ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
Language: C

#include <stdio.h>
#include <math.h>
 
int main (){
  int n,i,j,k,m,sum1=0,sum2=0,sa,o;
  scanf("%d",&n);
  int a[100],b[100];
  
  for (i=0;i<n;i++){
    scanf("%d",&a[i]);
  }
  
  for (j=0;j<n-1;j++){
    for (k=0;k<=j;k++){
      sum1+=a[j];
    }
    for (m=j+1;m<n;m++){
      sum2+=a[m];
    }
    b[j]=sum1-sum2;
  }
  sa=abs(b[0]);
  for (o=0;o<n;o++){
    if (sa>abs(b[o]){
      sa=abs(b[o]);
    }
  }
  printf("%d",sa);
}

Compiler output:
main.c: In function 'main':
main.c:22:6: error: implicit declaration of function 'abs' [-Wimplicit-function-declaration]
   22 |   sa=abs(b[0]);
      |      ^~~
main.c:3:1: note: include '<stdlib.h>' or provide a declaration of 'abs'
    2 | #include <math.h>
  +++ |+#include <stdlib.h>
    3 | 
main.c:24:21: error: expected ')' before '{' token
   24 |     if (sa>abs(b[o]){
      |        ~            ^
      |                     )
main.c:27:3: error: expected expression before '}' token
   27 |   }
      |   ^
Language: C

#include <stdio.h>

void main() {

	int t[3];
	int p, q, r, i, a, b, c, min=300;

	scanf_s("%d", &p);
	scanf_s("%d", &q);
	scanf_s("%d", &r);

	t[0] = p + q;
	t[1] = q + r;
	t[2] = p + r;

	for (i = 0; i < 3; i++) {
		if (min > t[i])
			min = t[i];
	}

	printf("%d", min);

}

Compiler output:
main.c: In function 'main':
main.c:8:9: error: implicit declaration of function 'scanf_s'; did you mean 'scanf'? [-Wimplicit-function-declaration]
    8 |         scanf_s("%d", &p);
      |         ^~~~~~~
      |         scanf
Language: C++

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

int main(){
  
  int A , B , C;
  int ab , bc , ca;
  
  cin >> ab >> bc >> ca;
  vector<int> timeSum(6);
  int t = 0;
  for(int i=0;i<3;i++){
    int a;
    int b;
    int sumtime = 0;
    if(i ==0){
      a = bc;
      b = ca;
      sumtime = ab;
    } else if(i == 1){
      a= ca;
      b= ab;
      sumtime = bc;
    } else if(i == 2){
      a= ab;
      b= bc;
      sumtime = ca;
    }
    for(int i=0;i<2;i++){
      if(i=0){
        sumtime += a;
      } else if(i=1){
        sumtime += b;
      }
      timeSum.at(sumtime);
      t++;
    }
  }
  
  int mint = 0;
  for(i = 0;i<6;i++){
    if(mint < timeSum.at(i)){
      mint = timeSum.at(t);
    }
  }
  mint = timeSum.at(0);
  cout << mint << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:35:17: warning: ignoring return value of 'std::vector<_Tp, _Alloc>::reference std::vector<_Tp, _Alloc>::at(size_type) [with _Tp = int; _Alloc = std::allocator<int>; reference = int&; size_type = long unsigned int]', declared with attribute 'nodiscard' [-Wunused-result]
   35 |       timeSum.at(sumtime);
      |       ~~~~~~~~~~^~~~~~~~~
In file included from /usr/include/c++/14/vector:66,
                 from /usr/include/c++/14/functional:64,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:53,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_vector.h:1180:7: note: declared here
 1180 |       at(size_type __n)
      |       ^~
a.cc:41:7: error: 'i' was not declared in this scope
   41 |   for(i = 0;i<6;i++){
      |       ^
Language: C++

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

int main(){
  
  int A , B , C;
  int ab , bc , ca;
  
  cin >> ab >> bc >> ca;
  vector<int> timeSum(6);
  int t = 0;
  for(int i=0;i<3;i++){
    int a;
    int b;
    int sumtime = 0;
    if(i ==0){
      a = bc;
      b = ca;
      sumtime = ab;
    } else if(i == 1){
      a= ca;
      b= ab;
      sumtime = bc;
    } else if(i == 2){
      a= ab;
      b= bc;
      sumtime = ca;
    }
    for(int i=0;i<2;i++){
      if(i=0){
        sumtime += a;
      } else if(i=1){
        sumtime += b;
      }
      timeSum.at(sumtime);
      t++;
    }
  }
  
  int mint = 0;
    timeSum.sort();
  mint = timeSum.at(0);
  cout << mint << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:35:17: warning: ignoring return value of 'std::vector<_Tp, _Alloc>::reference std::vector<_Tp, _Alloc>::at(size_type) [with _Tp = int; _Alloc = std::allocator<int>; reference = int&; size_type = long unsigned int]', declared with attribute 'nodiscard' [-Wunused-result]
   35 |       timeSum.at(sumtime);
      |       ~~~~~~~~~~^~~~~~~~~
In file included from /usr/include/c++/14/vector:66,
                 from /usr/include/c++/14/functional:64,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:53,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_vector.h:1180:7: note: declared here
 1180 |       at(size_type __n)
      |       ^~
a.cc:41:13: error: 'class std::vector<int>' has no member named 'sort'
   41 |     timeSum.sort();
      |             ^~~~
Language: C++

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

int main() {
  int P;
  int Q;
  int R;
  cin >> P;
  cin >> Q;
  cin >> R;
  if ( P + Q << P + R && P + Q << R + Q )
    cout << P + Q << endl;
  if ( P + Q >> P + R && P + R << R + Q )
    cout << P + R << endl;
  if ( P + Q >> Q + R && P + R >> Q + R )
    cout << Q + R << endl;
  if ( P + Q == P + R && P + R >> Q + R )
    cout << Q + R << endl;
  if ( P + Q == P + R && P + R << Q + R )
    cout << P + Q << endl;
  if ( P + Q == Q + R && P + R << Q + R )
    cout << P + R << endl;
  if ( P + Q == Q + R && P + R >> Q + R )
    cout << P + Q << endl;
  if ( P + R == Q + R && P + Q >> P + R )
    cout << P + R << endl;
  if ( P + R == Q + R && P + Q << P + R )
    cout << P + Q << endl;


Compiler output:
a.cc: In function 'int main()':
a.cc:28:27: error: expected '}' at end of input
   28 |     cout << P + Q << endl;
      |                           ^
a.cc:4:12: note: to match this '{'
    4 | int main() {
      |            ^
Language: C++

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

int main(){
  
  int A , B , C;
  int ab , bc , ca;
  
  cin >> ab >> bc >> ca;
  vector<int> timeSum(6);
  int t = 0;
  for(int i=0;i<3;i++){
    int a;
    int b;
    int sumtime = 0;
    if(i ==0){
      a = bc;
      b = ca;
      sumtime = ab;
    } else if(i == 1){
      a= ca;
      b= ab;
      sumtime = bc;
    } else if(i == 2){
      a= ab;
      b= bc;
      sumtime = ca;
    }
    for(int i=0;i<2;i++){
      if(i=0){
        sumtime += a;
      } else if(i=1){
        sumtime += b;
      }
      timeSum.at(sumtime);
      t++;
    }
  }
  
  int mint = timeSum.min();
  cout << mint << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:35:17: warning: ignoring return value of 'std::vector<_Tp, _Alloc>::reference std::vector<_Tp, _Alloc>::at(size_type) [with _Tp = int; _Alloc = std::allocator<int>; reference = int&; size_type = long unsigned int]', declared with attribute 'nodiscard' [-Wunused-result]
   35 |       timeSum.at(sumtime);
      |       ~~~~~~~~~~^~~~~~~~~
In file included from /usr/include/c++/14/vector:66,
                 from /usr/include/c++/14/functional:64,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:53,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_vector.h:1180:7: note: declared here
 1180 |       at(size_type __n)
      |       ^~
a.cc:40:22: error: 'class std::vector<int>' has no member named 'min'
   40 |   int mint = timeSum.min();
      |                      ^~~
Language: Java

fun main(args:Array<String>){
  var (p,q,r) = readLine()!!.split(" ").map(String::toInt)
  var arr:List<Int> = listOf(p,q,r).sorted()
  println(arr[0]+arr[1])
}

Compiler output:
Main.java:1: error: unnamed classes are a preview feature and are disabled by default.
fun main(args:Array<String>){
^
  (use --enable-preview to enable unnamed classes)
Main.java:1: error: <identifier> expected
fun main(args:Array<String>){
             ^
Main.java:1: error: class, interface, enum, or record expected
fun main(args:Array<String>){
                   ^
3 errors
Language: Java

public class Main {

	public static void main(String[] args) {
		
		Scanner sc = new Scanner(System.in);
		
		List<Integer> list = new ArrayList<>();
		list.add(sc.nextInt());	// P
		list.add(sc.nextInt());	// Q
		list.add(sc.nextInt());	// R
		
		list.sort(Comparator.naturalOrder());
		
		System.out.println(list.get(0) + list.get(1));
	}
	
	
}

Compiler output:
Main.java:5: error: cannot find symbol
		Scanner sc = new Scanner(System.in);
		^
  symbol:   class Scanner
  location: class Main
Main.java:5: error: cannot find symbol
		Scanner sc = new Scanner(System.in);
		                 ^
  symbol:   class Scanner
  location: class Main
Main.java:7: error: cannot find symbol
		List<Integer> list = new ArrayList<>();
		^
  symbol:   class List
  location: class Main
Main.java:7: error: cannot find symbol
		List<Integer> list = new ArrayList<>();
		                         ^
  symbol:   class ArrayList
  location: class Main
Main.java:12: error: cannot find symbol
		list.sort(Comparator.naturalOrder());
		          ^
  symbol:   variable Comparator
  location: class Main
5 errors
Language: C++

#include<bits/stdc++.h>

using namespace std;

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

    cin >> p >> q >> r;

    int ans=0;
    ans = (p+q+r)-max(p,q,r)

    cout << ans << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:29: error: expected ';' before 'cout'
   12 |     ans = (p+q+r)-max(p,q,r)
      |                             ^
      |                             ;
   13 | 
   14 |     cout << ans << endl;
      |     ~~~~                     
In file included from /usr/include/c++/14/algorithm:60,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51,
                 from a.cc:1:
/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:12:22:   required from here
   12 |     ans = (p+q+r)-max(p,q,r)
      |                   ~~~^~~~~~~
/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<bits/stdc++.h>
#define ll long long
#define pb push_back
#define mp make_pair
#define all(v) v.begin(),v.end()
#define sort(v) sort(all(v))
#define ff first
#define ss second
#define pll pair<ll,ll>
#define pii pair<int,int>
#define MODE 1000000007
#define IOS ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL);
using namespace std;
int main()
{
    IOS
    int a[3];
    cin>>a[0]>>a[1]>>a[2];
    sort(a,a+3);
    cout<<a[0]+a[1];
    return 0;
}


Compiler output:
a.cc:19:15: error: macro "sort" passed 2 arguments, but takes just 1
   19 |     sort(a,a+3);
      |               ^
a.cc:6:9: note: macro "sort" defined here
    6 | #define sort(v) sort(all(v))
      |         ^~~~
a.cc: In function 'int main()':
a.cc:19:16: error: statement cannot resolve address of overloaded function
   19 |     sort(a,a+3);
      |                ^
Language: C++

#include <bits/stdc++.h>
#define li long int

li a, b, c;

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

Compiler output:
a.cc: In function 'int main()':
a.cc:7:9: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    7 |         cin >> a >> b >> c;
      |         ^~~
      |         std::cin
In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:146,
                 from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:8:9: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    8 |         cout << a+b+c-max(a, max(b, c));
      |         ^~~~
      |         std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:8:30: error: 'max' was not declared in this scope; did you mean 'std::max'?
    8 |         cout << a+b+c-max(a, max(b, c));
      |                              ^~~
      |                              std::max
In file included from /usr/include/c++/14/algorithm:61,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51:
/usr/include/c++/14/bits/stl_algo.h:5716:5: note: 'std::max' declared here
 5716 |     max(initializer_list<_Tp> __l, _Compare __comp)
      |     ^~~
a.cc:8:23: error: 'max' was not declared in this scope; did you mean 'std::max'?
    8 |         cout << a+b+c-max(a, max(b, c));
      |                       ^~~
      |                       std::max
/usr/include/c++/14/bits/stl_algo.h:5716:5: note: 'std::max' declared here
 5716 |     max(initializer_list<_Tp> __l, _Compare __comp)
      |     ^~~
Language: C++

#include<iostream>
#include<algorithm>
using namespace std;
int main(){
  int p,q,r;
  cin >> p >> q >> r;
  int m =  max(p,q,r);
  cout << p+q+r -m;
  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::max(const _Tp&, const _Tp&, _Compare) [with _Tp = int; _Compare = int]':
a.cc:7:15:   required from here
    7 |   int m =  max(p,q,r);
      |            ~~~^~~~~~~
/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<iostream>
#include<algorithm>
using namespace std;
int main(){
  int p,q,r;
  cin >> p >> q >> r;
  int m = int max(p,q,r);
  cout << p+q+r -m;
  return 0;
}  


Compiler output:
a.cc: In function 'int main()':
a.cc:7:11: error: expected primary-expression before 'int'
    7 |   int m = int max(p,q,r);
      |           ^~~
Language: C++

#include<iostream>
#include<algorithm>
using namespace std;
int main(){
  int p,q,r;
  cin >> p >> q >> r;
  cout << p+q+r -max([p,q,r]);
  return 0;
}  


Compiler output:
a.cc: In lambda function:
a.cc:7:29: error: expected '{' before ')' token
    7 |   cout << p+q+r -max([p,q,r]);
      |                             ^
a.cc: In function 'int main()':
a.cc:7:21: error: no matching function for call to 'max(main()::<lambda()>)'
    7 |   cout << p+q+r -max([p,q,r]);
      |                  ~~~^~~~~~~~~
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
In file included from /usr/include/c++/14/algorithm:61,
                 from a.cc:2:
/usr/include/c++/14/bits/stl_algo.h:5706:5: note: candidate: 'template<class _Tp> constexpr _Tp std::max(initializer_list<_Tp>)'
 5706 |     max(initializer_list<_Tp> __l)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5706:5: note:   template argument deduction/substitution failed:
a.cc:7:21: note:   'main()::<lambda()>' is not derived from 'std::initializer_list<_Tp>'
    7 |   cout << p+q+r -max([p,q,r]);
      |                  ~~~^~~~~~~~~
/usr/include/c++/14/bits/stl_algo.h:5716:5: note: candidate: 'template<class _Tp, class _Compare> constexpr _Tp std::max(initializer_list<_Tp>, _Compare)'
 5716 |     max(initializer_list<_Tp> __l, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5716:5: note:   candidate expects 2 arguments, 1 provided
Language: C++

#include<iostream>
#include<algorithm>
using namespace std;
int main(){
  int p,q,r;
  cin >> p >> q >> r;
  cout << p+q+r -max(p,q,r);
  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::max(const _Tp&, const _Tp&, _Compare) [with _Tp = int; _Compare = int]':
a.cc:7:21:   required from here
    7 |   cout << p+q+r -max(p,q,r);
      |                  ~~~^~~~~~~
/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<iostream>
#include<cmath>
using namespace std;
int main(){
  int p,q,r;
  cin >> p >> q >> r;
  cout << p+q+ r - max(p,q,r);
  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::max(const _Tp&, const _Tp&, _Compare) [with _Tp = int; _Compare = int]':
a.cc:7:23:   required from here
    7 |   cout << p+q+ r - max(p,q,r);
      |                    ~~~^~~~~~~
/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<bits/stdc++.h>
using namespace std;
int main(){
　int p,q,r;
  cin>>p>>q>>r;
  vector<int>vec={p,q,r};
  sort(vec.begin(),vec.end());
  cout<<vec.at(0)+vec.at(1)<<endl;
}


Compiler output:
a.cc:4:1: error: extended character 　 is not valid in an identifier
    4 | 　int p,q,r;
      | ^
a.cc: In function 'int main()':
a.cc:4:1: error: '\U00003000int' was not declared in this scope
    4 | 　int p,q,r;
      | ^~~~~
a.cc:5:8: error: 'p' was not declared in this scope
    5 |   cin>>p>>q>>r;
      |        ^
a.cc:5:11: error: 'q' was not declared in this scope
    5 |   cin>>p>>q>>r;
      |           ^
a.cc:5:14: error: 'r' was not declared in this scope
    5 |   cin>>p>>q>>r;
      |              ^
a.cc:6:24: error: could not convert '{p, q, r}' from '<brace-enclosed initializer list>' to 'std::vector<int>'
    6 |   vector<int>vec={p,q,r};
      |                        ^
      |                        |
      |                        <brace-enclosed initializer list>
Language: C++

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

int main(){
  int p,q,r;
  cin >> p >> q >> r;
  int partial_sum[] = {p+q, q+r, r+p};
  cout << min(partial_sum);
  return;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:14: error: no matching function for call to 'min(int [3])'
    9 |   cout << min(partial_sum);
      |           ~~~^~~~~~~~~~~~~
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:233:5: note: candidate: 'template<class _Tp> constexpr const _Tp& std::min(const _Tp&, const _Tp&)'
  233 |     min(const _Tp& __a, const _Tp& __b)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:233:5: note:   candidate expects 2 arguments, 1 provided
/usr/include/c++/14/bits/stl_algobase.h:281:5: note: candidate: 'template<class _Tp, class _Compare> constexpr const _Tp& std::min(const _Tp&, const _Tp&, _Compare)'
  281 |     min(const _Tp& __a, const _Tp& __b, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:281:5: note:   candidate expects 3 arguments, 1 provided
In file included from /usr/include/c++/14/algorithm:61,
                 from a.cc:2:
/usr/include/c++/14/bits/stl_algo.h:5686:5: note: candidate: 'template<class _Tp> constexpr _Tp std::min(initializer_list<_Tp>)'
 5686 |     min(initializer_list<_Tp> __l)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5686:5: note:   template argument deduction/substitution failed:
a.cc:9:14: note:   mismatched types 'std::initializer_list<_Tp>' and 'int*'
    9 |   cout << min(partial_sum);
      |           ~~~^~~~~~~~~~~~~
/usr/include/c++/14/bits/stl_algo.h:5696:5: note: candidate: 'template<class _Tp, class _Compare> constexpr _Tp std::min(initializer_list<_Tp>, _Compare)'
 5696 |     min(initializer_list<_Tp> __l, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5696:5: note:   candidate expects 2 arguments, 1 provided
a.cc:10:3: error: return-statement with no value, in function returning 'int' [-fpermissive]
   10 |   return;
      |   ^~~~~~
Language: Java

import java.util.*;

public class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);

    int P = sc.nextInt();
    int Q = sc.nextInt();
    int R = sc.nextInt();

    int min = =Math.min(P+Q,Math.min(Q+R,R+P));

    System.out.println(min);
  }
}


Compiler output:
Main.java:11: error: illegal start of expression
    int min = =Math.min(P+Q,Math.min(Q+R,R+P));
              ^
1 error
Language: Java

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:3: error: class Airplane is public, should be declared in a file named Airplane.java
public class Airplane {
       ^
1 error
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main(){
	int P,Q,R;
	vector<int> var(3,0);
for(int i= 0;i<3;i++)}{
	cin>>var[i];
}
	sort(var.begin(),var.end(),less<int>());
	cout<<var[0] + var[1]<<endl;
	
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:22: error: expected primary-expression before '}' token
    6 | for(int i= 0;i<3;i++)}{
      |                      ^
a.cc: At global scope:
a.cc:6:23: error: expected unqualified-id before '{' token
    6 | for(int i= 0;i<3;i++)}{
      |                       ^
a.cc:9:13: error: expected constructor, destructor, or type conversion before '(' token
    9 |         sort(var.begin(),var.end(),less<int>());
      |             ^
a.cc:10:9: error: 'cout' does not name a type
   10 |         cout<<var[0] + var[1]<<endl;
      |         ^~~~
a.cc:12:9: error: expected unqualified-id before 'return'
   12 |         return 0;
      |         ^~~~~~
a.cc:13:1: error: expected declaration before '}' token
   13 | }
      | ^
Language: C++

  #include <bits/stdc++.h>
  using namespace std;
  typedef long long int ll;
  #define mod 1000000007
  #define all(v)  v.begin(),v.end()
  #define pb push_back
  #define fast ios_base:: sync_with_stdio(false); cin.tie(NULL);cout.tie(NULL)
  ll power_mod(ll a,ll x){if(x==0) return 1;ll y=power_mod(a,x/2);ll ans=(y*y)%mod; if(x%2) ans=(ans*a)%mod;return ans;}
  ll inv(ll a){return power_mod(a,mod-2);}
  ll power(ll a, ll x){ if(x==0) return 1; ll y= power(a,x/2); ll ans=(y*y); if(x%2) ans*=a; return ans;}
  

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

            cout<<(p+q+r)-max(p+q+r)<<endl;

  }
  
  




Compiler output:
a.cc: In function 'int main()':
a.cc:16:23: error: expected unqualified-id before ';' token
   16 |             int p,q,r,;
      |                       ^
a.cc:19:30: error: no matching function for call to 'max(int)'
   19 |             cout<<(p+q+r)-max(p+q+r)<<endl;
      |                           ~~~^~~~~~~
In file included from /usr/include/c++/14/algorithm:60,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51,
                 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
In file included from /usr/include/c++/14/algorithm:61:
/usr/include/c++/14/bits/stl_algo.h:5706:5: note: candidate: 'template<class _Tp> constexpr _Tp std::max(initializer_list<_Tp>)'
 5706 |     max(initializer_list<_Tp> __l)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5706:5: note:   template argument deduction/substitution failed:
a.cc:19:30: note:   mismatched types 'std::initializer_list<_Tp>' and 'int'
   19 |             cout<<(p+q+r)-max(p+q+r)<<endl;
      |                           ~~~^~~~~~~
/usr/include/c++/14/bits/stl_algo.h:5716:5: note: candidate: 'template<class _Tp, class _Compare> constexpr _Tp std::max(initializer_list<_Tp>, _Compare)'
 5716 |     max(initializer_list<_Tp> __l, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5716:5: note:   candidate expects 2 arguments, 1 provided
Language: C

#include <stdio.h>
#include <stdlib.h>

int main() {
    char buffer[100];
    char duffer[100];
    char guffer[100];
    int number1;
    int number2;
    int number3;
    int a,b,c=0;
    scanf("%s%s%s",buffer,duffer,guffer);
    number1 = atoi(buffer);
    number2 = atoi(duffer);
    number3 = atoi(guffer);
if(1<=number1 && 1<=number2 && 1<=number3){
if(number1 <= number2){
    if(number2 <= number3){
    a=number1+number2;
}else{
    a=number1+number3;
}
    printf("%d",a);
}else{
    if(number1 <= number3){
        b=number1+number2;
    }else{
        b=number2+number3;
    }
    printf("%d",b);
}
}else{
    printf("error")
}
}

Compiler output:
main.c: In function 'main':
main.c:33:20: error: expected ';' before '}' token
   33 |     printf("error")
      |                    ^
      |                    ;
   34 | }
      | ~
Language: C++

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

int main(){
  int p,q,r;
  int >>p>>q>>r;
  cout << min(p+q,min(q+r,r+p))<<endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:7: error: expected unqualified-id before '>>' token
    7 |   int >>p>>q>>r;
      |       ^~
Language: C++

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

int main(){
  int n;
  cin >> n;
  vector<int> a(n);
  int sum = 0;
  for(int i = 0; i < n; i++){
    cin >> a[i];
    sum += a[i];
  }
  int mini = sum;
  int sum_sum = 0;
  for(int i = 0; i < n; i++){
    sum_sum +=a[i];
    mini = min(mini,abs(sum_sum - (sum - sum_sum)))
  }
  cout << mini << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:17:52: error: expected ';' before '}' token
   17 |     mini = min(mini,abs(sum_sum - (sum - sum_sum)))
      |                                                    ^
      |                                                    ;
   18 |   }
      |   ~
Language: C++

#include<iostream>
using namespace std;

int main(){
  int a[5];
  for(int i=;i<3;i++)cin>>a[i];
  sort(a,a+3);
  cout << a[0]+a[1]<<endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:13: error: expected primary-expression before ';' token
    6 |   for(int i=;i<3;i++)cin>>a[i];
      |             ^
a.cc:7:3: error: 'sort' was not declared in this scope; did you mean 'short'?
    7 |   sort(a,a+3);
      |   ^~~~
      |   short
Language: C++

#include<bits/stdc++.h>

#define LL long long
#define fi first
#define se second
#define mp make_pair
#define pb push_back

using namespace std;

LL gcd(LL a,LL b){return b?gcd(b,a%b):a;}
LL lcm(LL a,LL b){return a/gcd(a,b)*b;}
LL powmod(LL a,LL b,LL MOD){LL ans=1;while(b){if(b%2)ans=ans*a%MOD;a=a*a%MOD;b/=2;}return ans;}
const int N = 2e5 +11;
int main(){
	ios::sync_with_stdio(false);
	int p,q,r;
	cin>>p>>q>>r;
	cout<<min({p+q},{p+r},{q+r})<<endl;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:19:18: error: no matching function for call to 'min(<brace-enclosed initializer list>, <brace-enclosed initializer list>, <brace-enclosed initializer list>)'
   19 |         cout<<min({p+q},{p+r},{q+r})<<endl;
      |               ~~~^~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/14/algorithm:60,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_algobase.h:233:5: note: candidate: 'template<class _Tp> constexpr const _Tp& std::min(const _Tp&, const _Tp&)'
  233 |     min(const _Tp& __a, const _Tp& __b)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:233:5: note:   candidate expects 2 arguments, 3 provided
/usr/include/c++/14/bits/stl_algobase.h:281:5: note: candidate: 'template<class _Tp, class _Compare> constexpr const _Tp& std::min(const _Tp&, const _Tp&, _Compare)'
  281 |     min(const _Tp& __a, const _Tp& __b, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:281:5: note:   template argument deduction/substitution failed:
a.cc:19:18: note:   couldn't deduce template parameter '_Tp'
   19 |         cout<<min({p+q},{p+r},{q+r})<<endl;
      |               ~~~^~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/14/algorithm:61:
/usr/include/c++/14/bits/stl_algo.h:5686:5: note: candidate: 'template<class _Tp> constexpr _Tp std::min(initializer_list<_Tp>)'
 5686 |     min(initializer_list<_Tp> __l)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5686:5: note:   candidate expects 1 argument, 3 provided
/usr/include/c++/14/bits/stl_algo.h:5696:5: note: candidate: 'template<class _Tp, class _Compare> constexpr _Tp std::min(initializer_list<_Tp>, _Compare)'
 5696 |     min(initializer_list<_Tp> __l, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5696:5: note:   candidate expects 2 arguments, 3 provided