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

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

int main()
{   int a,b,c,p,q,r;
 
    scanf("%d",&p);
   scanf("%d",&q);
    scanf("%d",&r);
    
a=p+q;
b=q+r;
c=r+p;
 
if(a<=b && a<=c){
	printf("%d",a);
	}
else if(b<=a && b<=c){
	printf("%d",b);
	}
else pintf("%d",c);

    return 0;

}

Compiler output:
main.c: In function 'main':
main.c:22:6: error: implicit declaration of function 'pintf'; did you mean 'printf'? [-Wimplicit-function-declaration]
   22 | else pintf("%d",c);
      |      ^~~~~
      |      printf
Language: C

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

int main()
{   int a,b,c,p,q,r;
 
    scanf("%d",&p);
   scanf("%d",&q);
    scanf("%d",&r);
    
a=p+q:
b=q+r;
c=r+p;
 
if(a<=b && a<=c){
	printf("%d",a);}
else if(b<=a && b<=c){
	printf("%d",b);}
else pintf("%d",c);


   
    return 0;

}

Compiler output:
main.c: In function 'main':
main.c:12:6: error: expected ';' before ':' token
   12 | a=p+q:
      |      ^
      |      ;
main.c:20:6: error: implicit declaration of function 'pintf'; did you mean 'printf'? [-Wimplicit-function-declaration]
   20 | else pintf("%d",c);
      |      ^~~~~
      |      printf
Language: C

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

int main()
{   int a,b,c,p,q,r;
 
    scanf("%d",&p);
   scanf("%d",&q);
    scanf("%d",&r);
 a=p+q:
 b=q+r;
 c=r+p;
 
if(a<=b && a<=c){
	printf("%d",a);}
else if(b<=a && b<=c){
	printf("%d",b);}
else pintf("%d",c);


   
    return 0;

}

Compiler output:
main.c: In function 'main':
main.c:11:7: error: expected ';' before ':' token
   11 |  a=p+q:
      |       ^
      |       ;
main.c:19:6: error: implicit declaration of function 'pintf'; did you mean 'printf'? [-Wimplicit-function-declaration]
   19 | else pintf("%d",c);
      |      ^~~~~
      |      printf
Language: C

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

int main()
{   int a,b,c,p,q,r;
 
    scanf("%d",&p);
   scanf("%d",&q);
    scanf("%d",&r);
 a=p+q:
 b=q+r;
 c=r+p;
 
if(a<=b && a<=c);{
	printf("%d",a);}
else if(b<=a && b<=c){
	printf("%d",b);}
else pintf("%d",c);


   
    return 0;

}

Compiler output:
main.c: In function 'main':
main.c:11:7: error: expected ';' before ':' token
   11 |  a=p+q:
      |       ^
      |       ;
main.c:17:1: error: 'else' without a previous 'if'
   17 | else if(b<=a && b<=c){
      | ^~~~
main.c:19:6: error: implicit declaration of function 'pintf'; did you mean 'printf'? [-Wimplicit-function-declaration]
   19 | else pintf("%d",c);
      |      ^~~~~
      |      printf
Language: C

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

int main()
{   int a,b,c,p,q,r;
 
    scanf("%d",&p);
   scanf("%d",&q);
    scanf("%d",&r);
 a=p+q:
 b=q+r;
 c=r+p;
 
if(a<=b && a<=c);{
	printf("%d",a);}
else if(b<=a && b<=c){
	printf("%d",b);};
else printf("%d",c);


   
    return 0;

}

Compiler output:
main.c: In function 'main':
main.c:11:7: error: expected ';' before ':' token
   11 |  a=p+q:
      |       ^
      |       ;
main.c:17:1: error: 'else' without a previous 'if'
   17 | else if(b<=a && b<=c){
      | ^~~~
main.c:19:1: error: 'else' without a previous 'if'
   19 | else printf("%d",c);
      | ^~~~
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 ans = Math.min(p + q, q + r);
    int ans = Math.min(ans, p + r);
    
    System.out.println(ans);
  }
}


Compiler output:
Main.java:12: error: variable ans is already defined in method main(String[])
    int ans = Math.min(ans, p + r);
        ^
1 error
Language: C++

#include<iostream>
#include<vector>
#include<algorithm>
using namespace std;
int main() {
	int a, b, c, d;
	cin >> a >> b >> c;
	d = a + b + c - max(a, b, c);
	cout << d << endl;
}

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:8:21:   required from here
    8 |         d = a + b + c - max(a, b, c);
      |                         ~~~^~~~~~~~~
/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;
  int a,b,c;
  int ans;
  
  scanf("%d",&P);
  scanf("%d",&Q);
  scanf("%d",&R);
  P+Q = a;
  P+R = b;
  Q+R = c;
  if(a>b && a>c){
    a-0;
  }else if(b>a && b>c){
    b=0;
  }else if(c>a && c>b){
    c=0;
  }
  ans= a+b+c;
  printf("%d",ans);
  
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:11:7: error: lvalue required as left operand of assignment
   11 |   P+Q = a;
      |       ^
main.c:12:7: error: lvalue required as left operand of assignment
   12 |   P+R = b;
      |       ^
main.c:13:7: error: lvalue required as left operand of assignment
   13 |   Q+R = c;
      |       ^
Language: C

#include <stdio.h>

int main(void){
  int P,Q,R;
  int a,b,c;
  int ans;
  
  scanf("%d",&P);
  scanf("%d",&Q);
  scanf("%d",&R);
  P+Q=a;
  P+R=b;
  Q+R=c;
  if(a>b && a>c){
    max = a;
    a-0;
  }else if(b>a && b>c){
    b=0;
  }else if(c>a && c>b){
    c=0;
  }
  ans= a+b+c;
  printf("%d",ans);
  
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:11:6: error: lvalue required as left operand of assignment
   11 |   P+Q=a;
      |      ^
main.c:12:6: error: lvalue required as left operand of assignment
   12 |   P+R=b;
      |      ^
main.c:13:6: error: lvalue required as left operand of assignment
   13 |   Q+R=c;
      |      ^
main.c:15:5: error: 'max' undeclared (first use in this function)
   15 |     max = a;
      |     ^~~
main.c:15:5: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include <stdio.h>

int main(void){
  int P,Q,R;
  int ans;
  scanf("%d",%P);
  scanf("%d",%Q);
  scanf("%d",%R);
  P+Q=a;
  P+R=b;
  Q+R=c;
  if(a>b && a>c){
    max = a;
    a-0;
  }else if(b>a && b>c){
    b=0;
  }else if(c>a && c>b){
    c=0;
  }
  ans= a+b+c;
  printf("%d",ans);
  
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:6:14: error: expected expression before '%' token
    6 |   scanf("%d",%P);
      |              ^
main.c:7:14: error: expected expression before '%' token
    7 |   scanf("%d",%Q);
      |              ^
main.c:8:14: error: expected expression before '%' token
    8 |   scanf("%d",%R);
      |              ^
main.c:9:7: error: 'a' undeclared (first use in this function)
    9 |   P+Q=a;
      |       ^
main.c:9:7: note: each undeclared identifier is reported only once for each function it appears in
main.c:10:7: error: 'b' undeclared (first use in this function)
   10 |   P+R=b;
      |       ^
main.c:11:7: error: 'c' undeclared (first use in this function)
   11 |   Q+R=c;
      |       ^
main.c:13:5: error: 'max' undeclared (first use in this function)
   13 |     max = a;
      |     ^~~
Language: C++

#include<iostream>
using namespace std;
int main(void){
    int a,b,c;
    
    cin >> a >> b >> c;
    cout << a + b + c - max({a,b,c});
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:28: error: no matching function for call to 'max(<brace-enclosed initializer list>)'
    7 |     cout << a + b + c - max({a,b,c});
      |                         ~~~^~~~~~~~~
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(void){
    int a,b,c;
    
    cin >> a >> b >> c;
    cout << a+b+c-max(a,b,c);
}

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:22:   required from here
    7 |     cout << a+b+c-max(a,b,c);
      |                   ~~~^~~~~~~
/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 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 prefix_sum = 0;
 for (int i = 0; i < N; ++i) {
 cin >> a[i];
 prefix_sum += a[i];
 mini = min(mini, abs(prefix_sum - (sum - prefix_sum)));
 }
 
 cout << mini << endl;
 return 0;
 }
#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 prefix_sum = 0;
 for (int i = 0; i < N; ++i) {
 prefix_sum += a[i];
 mini = min(mini, abs(prefix_sum - (sum - prefix_sum)));
 }

 cout << mini << endl;
 return 0;
 }
提出情報


Compiler output:
a.cc:26:5: error: redefinition of 'int main()'
   26 | int main() {
      |     ^~~~
a.cc:3:5: note: 'int main()' previously defined here
    3 | int main() {
      |     ^~~~
a.cc:46:1: error: '\U000063d0\U000051fa\U000060c5\U00005831' does not name a type
   46 | 提出情報
      | ^~~~~~~~
Language: C++

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:9:26: error: 'c' was not declared in this scope
    9 |   cout << min(p+r, min(r+c, q+r)) << endl;
      |                          ^
Language: C++

int main (){
    int N, K, R;
    cin>>N>>K>>R;
    int maxim=max(N,K);
    maxim=max(maxim, R);
    cout<<N+K+R-maxim<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:3:5: error: 'cin' was not declared in this scope
    3 |     cin>>N>>K>>R;
      |     ^~~
a.cc:4:15: error: 'max' was not declared in this scope; did you mean 'maxim'?
    4 |     int maxim=max(N,K);
      |               ^~~
      |               maxim
a.cc:6:5: error: 'cout' was not declared in this scope
    6 |     cout<<N+K+R-maxim<<endl;
      |     ^~~~
a.cc:6:24: error: 'endl' was not declared in this scope
    6 |     cout<<N+K+R-maxim<<endl;
      |                        ^~~~
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:
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:6:26:   required from here
    6 |   cout << p + q + r - max(p,q,r) << endl;
      |                       ~~~^~~~~~~
/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;
using ll= long long;
using vi= vector<int>;
using vvi= vector<vi>;
using vd= vector<double>;
using vc= vector<char>;
#define REP(i,x,n) for(int i=x; i<n; i++)
#define rep(i,n) REP(i,0,n)
#define all(x) x.begin(), x.end()


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

  ans= min(p+q,min(q+r,p+r))

  cout << ans << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:17:29: error: expected ';' before 'cout'
   17 |   ans= min(p+q,min(q+r,p+r))
      |                             ^
      |                             ;
   18 | 
   19 |   cout << ans << endl;
      |   ~~~~
Language: C++

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

int main() {
  int a,b.c;
 
  cin >> a>>b >>c ;
  
  
   vector <int> vec ={a,b,c};
  sort (vec.begin(),vec.end());
  
  cout << vec[0]+vec[1] <<endl;
}
  




Compiler output:
a.cc: In function 'int main()':
a.cc:5:10: error: expected initializer before '.' token
    5 |   int a,b.c;
      |          ^
a.cc:7:13: error: 'b' was not declared in this scope
    7 |   cin >> a>>b >>c ;
      |             ^
a.cc:7:17: error: 'c' was not declared in this scope
    7 |   cin >> a>>b >>c ;
      |                 ^
a.cc:10:28: error: could not convert '{a, b, c}' from '<brace-enclosed initializer list>' to 'std::vector<int>'
   10 |    vector <int> vec ={a,b,c};
      |                            ^
      |                            |
      |                            <brace-enclosed initializer list>
Language: C++

#include <iostream>
using namespace std;
int main(){
  int a,b,c;
  cin >> a >> b >> c;
  if(a >= b && a >= c){
	cout << b + c;
  }if else(b >= a && b >= c){
	cout << a + c;
  }else{
	cout << a + b;
  }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:8:7: error: expected '(' before 'else'
    8 |   }if else(b >= a && b >= c){
      |       ^~~~
      |       (
a.cc:10:4: error: 'else' without a previous 'if'
   10 |   }else{
      |    ^~~~
Language: C++

#include <iostream>
using namespace std;
int main()
{
	int a,b,c;
	cin >> a >> b >> c;
  if(a >= b && a >= c){
	cout << b + c;
  }if else(b >= a && b >= c){
	cout << a + c;
  }else{
	cout << a + b;
  }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:9:7: error: expected '(' before 'else'
    9 |   }if else(b >= a && b >= c){
      |       ^~~~
      |       (
a.cc:11:4: error: 'else' without a previous 'if'
   11 |   }else{
      |    ^~~~
Language: C++

#include <iostream>
using namespace std;
int main()
{
	int a,b,c;
	cin >> a >> b >> c;
	if(a >= b && a >= c){
	cout << b + c;
    }if else(b >= a && b >= c){
	cout << a + c;
    }else{
	cout << a + b;
    }
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:9:9: error: expected '(' before 'else'
    9 |     }if else(b >= a && b >= c){
      |         ^~~~
      |         (
a.cc:11:6: error: 'else' without a previous 'if'
   11 |     }else{
      |      ^~~~
Language: C++

#include<iostream>
#include<vector>
#include<algorithm>

int main(void)
{
  std::vector<int> ans(3);
  std::cin >> ans[0];
  std::cin >> ans[1];
  std::cin >> ans[2];
  
  std::sort(ans.begin(), ans.end());
  std::cout << ans[1] + ans[2]; std::endl;
  
  return 0;
}
  
  

Compiler output:
a.cc: In function 'int main()':
a.cc:13:42: error: statement cannot resolve address of overloaded function
   13 |   std::cout << ans[1] + ans[2]; std::endl;
      |                                          ^
Language: C++

#include<iostream>
#include<vector>
include<alga>

int main(void)
{
  std::vector<int> ans(3);
  std::cin >> ans[0];
  std::cin >> ans[1];
  std::cin >> ans[2];
  
  std::sort(ans.begin(), ans.end());
  std::cout << ans[1] + ans[2]; std::endl;
  
  return 0;
}
  
  

Compiler output:
a.cc:3:1: error: 'include' does not name a type
    3 | include<alga>
      | ^~~~~~~
Language: C++

#include<iostream>
#include<vector>

int main(void)
{
  std::vector<int> ans(3);
  std::cin >> ans[0];
  std::cin >> ans[1];
  std::cin >> ans[2];
  
  std::sort(ans.begin(), ans.end());
  std::cout << ans[1] + ans[2]; std::endl;
  
  return 0;
}
  
  

Compiler output:
a.cc: In function 'int main()':
a.cc:11:8: error: 'sort' is not a member of 'std'; did you mean 'qsort'?
   11 |   std::sort(ans.begin(), ans.end());
      |        ^~~~
      |        qsort
a.cc:12:42: error: statement cannot resolve address of overloaded function
   12 |   std::cout << ans[1] + ans[2]; std::endl;
      |                                          ^
Language: C++

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

typedef long long ll;

ll P, Q, R;

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


Compiler output:
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 = long long int; _Compare = long long int]':
a.cc:10:26:   required from here
   10 |   cout << P + Q + R - max(P, Q, R) << endl;
      |                       ~~~^~~~~~~~~
/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,a,b,c;
  	cin >> P >> Q >> R;
  	a = P + Q;
  	b = Q + R;
  	c = R + P;
  	cout << max(a,b,c) << endl;
}

Compiler output:
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:10:15:   required from here
   10 |         cout << max(a,b,c) << endl;
      |                 ~~~^~~~~~~
/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 rep(i,n) for (int (i) = 0; (i) < (n); (i)++)
using namespace std;

int main() {
    int p, q, r;  cin >> p >> q >> r;
    cout << (p+q+r) - max(p, q, r) << endl;
}

Compiler output:
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:7:26:   required from here
    7 |     cout << (p+q+r) - max(p, q, r) << endl;
      |                       ~~~^~~~~~~~~
/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 <cstdio>
#include <algorithm>
#include <vector>
#include <cmath>
#define ll long long
using namespace std;
int main(){
  int n;
  
cin>>n;
  vector<ll>a(n);
  vector<ll>sum(n);
  for(int i=0;i<n;i++){
  cin>>a[i];
    
  sum[i]=(i==0?a[i]:sum[i-1]+a[i]);
  }
   ll max=1111111111111;
  for(int i=0;i<n;i++){
  max=min(max,abs(sum[i]-(sum[n-1]-sum[i])));
  }
  cout<<max<<endl;
return 0;  
}


Compiler output:
a.cc: In function 'int main()':
a.cc:10:1: error: 'cin' was not declared in this scope
   10 | cin>>n;
      | ^~~
a.cc:5:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
    4 | #include <cmath>
  +++ |+#include <iostream>
    5 | #define ll long long
a.cc:22:3: error: 'cout' was not declared in this scope
   22 |   cout<<max<<endl;
      |   ^~~~
a.cc:22:3: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:22:14: error: 'endl' was not declared in this scope
   22 |   cout<<max<<endl;
      |              ^~~~
a.cc:5:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
    4 | #include <cmath>
  +++ |+#include <ostream>
    5 | #define ll long long
Language: C++

#include <cstdio>
#include <algorithm>
#include <vector>
#include <cmath>
#define ll long long
using namespace std;
int main(){
  int n;
  
cin>>n;
  vector<ll>a(n);
  ll sum=0;
  vector<ll>sum();
  for(int i=0;i<n;i++){
  cin>>a[i];
    
  sum[i]=(i==0?a[i]:sum[i-1]+a[i]);
  }
   ll max=1111111111111;
  for(int i=0;i<n;i++){
  max=min(max,abs(sum[i]-(sum[n-1]-sum[i])));
  }
  cout<<max<<endl;
return 0;  
}


Compiler output:
a.cc: In function 'int main()':
a.cc:10:1: error: 'cin' was not declared in this scope
   10 | cin>>n;
      | ^~~
a.cc:5:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
    4 | #include <cmath>
  +++ |+#include <iostream>
    5 | #define ll long long
a.cc:13:16: warning: empty parentheses were disambiguated as a function declaration [-Wvexing-parse]
   13 |   vector<ll>sum();
      |                ^~
a.cc:13:16: note: remove parentheses to default-initialize a variable
   13 |   vector<ll>sum();
      |                ^~
      |                --
a.cc:13:17: error: 'std::vector<long long int> sum()' redeclared as different kind of entity
   13 |   vector<ll>sum();
      |                 ^
a.cc:12:6: note: previous declaration 'long long int sum'
   12 |   ll sum=0;
      |      ^~~
a.cc:17:6: error: invalid types 'long long int[int]' for array subscript
   17 |   sum[i]=(i==0?a[i]:sum[i-1]+a[i]);
      |      ^
a.cc:17:24: error: invalid types 'long long int[int]' for array subscript
   17 |   sum[i]=(i==0?a[i]:sum[i-1]+a[i]);
      |                        ^
a.cc:21:22: error: invalid types 'long long int[int]' for array subscript
   21 |   max=min(max,abs(sum[i]-(sum[n-1]-sum[i])));
      |                      ^
a.cc:21:30: error: invalid types 'long long int[int]' for array subscript
   21 |   max=min(max,abs(sum[i]-(sum[n-1]-sum[i])));
      |                              ^
a.cc:21:39: error: invalid types 'long long int[int]' for array subscript
   21 |   max=min(max,abs(sum[i]-(sum[n-1]-sum[i])));
      |                                       ^
a.cc:23:3: error: 'cout' was not declared in this scope
   23 |   cout<<max<<endl;
      |   ^~~~
a.cc:23:3: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:23:14: error: 'endl' was not declared in this scope
   23 |   cout<<max<<endl;
      |              ^~~~
a.cc:5:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
    4 | #include <cmath>
  +++ |+#include <ostream>
    5 | #define ll long long
Language: C++

#include<iostream>
#include<vector>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define YES cout<<"YES"<<endl
#define NO cout<<"NO"<<endl
#define Yes cout<<"Yes"<<endl
#define No cout<<"No"<<endl
#define all(a) a.begin(),a.end()
#define SORT(a) sort(all(a))
#define REVERSE(a) reverse(all(a))
#define int long long
#define FOR(i, m, n) for(int i = m;i < n;i++)
typedef vector<int> VI;
typedef vector<VI> VVI;
const int MOD=1e9+7;
const long long INF = 1LL << 60;
/*最大公約数*/int gcd(int x, int y) { return y ? gcd(y,x%y) : x;}
//----------------------------------------------
signed main(){
    ios::sync_with_stdio(false);
    cin.tie(nullptr);
    
    VI a(3);
    rep(i,3) cin >> a[i];
    SORT(a);
    cout << a[0] + a[1] << endl;
    
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:17: error: 'sort' was not declared in this scope; did you mean 'short'?
   10 | #define SORT(a) sort(all(a))
      |                 ^~~~
a.cc:26:5: note: in expansion of macro 'SORT'
   26 |     SORT(a);
      |     ^~~~
Language: C++

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

int main() {
	vector<int> a(3);
	vector<int> o(6);
	int k = 0;
	cin >> a[0] >> a[1] >> a[2];
	rep(i, 3) {
		rep(j, 2) {
			o[k] == a[i] + a[j];
			k++;
		}
	}
	cort(o.begin(), o.end());
	cout << o[1] << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:16:9: error: 'cort' was not declared in this scope; did you mean 'cbrt'?
   16 |         cort(o.begin(), o.end());
      |         ^~~~
      |         cbrt
Language: C++

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

int main() {
  vector<int> vec(3);
  cin >> vec[0] >> vec[1] >> vec[2];
  sort(vec.begin(),vecend());
  
  cout << vec[0] + vec[1] << endl;
}


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

#include <iostream>
using namespace std;
#define ll long long

int main(){
  ll 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 = long long int; _Compare = long long int]':
a.cc:8:14:   required from here
    8 |   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 <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:8:20: 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(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:8:20: 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(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:8:20: 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(void){
  int P, Q, R;
  cin>>P>>Q>>R;
  cout << P+Q+max({P, Q, R})<< endl;
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:8:18: error: no matching function for call to 'max(<brace-enclosed initializer list>)'
    8 |   cout << P+Q+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(void){
  int P, Q, R;
  cin>>P>>Q>>R;
  cout << P+Q+max((P, Q, R))<< endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:18: error: no matching function for call to 'max(int&)'
    8 |   cout << P+Q+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 >> W >> R;
  if(P>Q && P>R) cout << Q+R << endl;
  else if(Q>P && Q>R) cout << P+R << endl;
  else cout << P+Q << endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:15: error: 'W' was not declared in this scope
    5 |   cin >> P >> W >> R;
      |               ^
Language: C++

#include<iostream>
using namespace std;
int main()
{
  int a[2];
 for(int i=0;i<2;++i)
   cin>>a[i];
  sort(a,a+2);
  cout<<a[0]+a[1];
  return 0;
}

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

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:7:8: error: expected primary-expression before '.' token
    7 |   cin >. a >> b >> c;
      |        ^
Language: C++

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:7:8: error: expected primary-expression before '.' token
    7 |   cin >. a >> b >> c;
      |        ^
a.cc:8:17: error: request for member 'b' in 'a', which is of non-class type 'int'
    8 |   cout << min(a.b)+min(min(a,b),c);
      |                 ^
Language: C++

#include <iostream>
using namespace std;
#include <algorithm> 
 
int main() {
  int P;
  int Q;
  int R;
  cin >> P >> Q >> R;
  
  int PQ = p+Q;
  int QR = R+Q;
  int RP = P+R;
  
  cout << min(min(PQ,QR),RP)<<endl;

  
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:12: error: 'p' was not declared in this scope
   11 |   int PQ = p+Q;
      |            ^
Language: C++

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:7:19: warning: ignoring return value of 'constexpr const _Tp& std::min(const _Tp&, const _Tp&) [with _Tp = int]', declared with attribute 'nodiscard' [-Wunused-result]
    7 |   cout << min((min(a + b, b + c), c + a) << 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: declared here
  233 |     min(const _Tp& __a, const _Tp& __b)
      |     ^~~
a.cc:7:42: error: invalid operands of types 'int' and '<unresolved overloaded function type>' to binary 'operator<<'
    7 |   cout << min((min(a + b, b + c), c + a) << endl;
      |               ~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~
Language: C++

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

int main(){
  int a, b, c;
  cin >> a >> b >> c;
  cout << min(a + b, b + c, c + a) << "\n";
  return 0;
}

Compiler output:
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::min(const _Tp&, const _Tp&, _Compare) [with _Tp = int; _Compare = int]':
a.cc:7:14:   required from here
    7 |   cout << min(a + b, b + c, c + a) << "\n";
      |           ~~~^~~~~~~~~~~~~~~~~~~~~
/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<iostream>
using namespace std;
int main()
{
  int p,q,r;
  cin>>p>>q>>r;
  cout<< min({p+q,p+r,q+r}) <<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:13: error: no matching function for call to 'min(<brace-enclosed initializer list>)'
    7 |   cout<< min({p+q,p+r,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: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
Language: C++

#include<iostream>
using namespace std;
int main()
{
  int p,q,r;
  cin>>p>>q>>r;
  cout<<min({p+q,p+r,q+r})<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:12: error: no matching function for call to 'min(<brace-enclosed initializer list>)'
    7 |   cout<<min({p+q,p+r,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: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
Language: C++

#include<iostream>
using namespace std;
int main()
{
  int p,q,r;
  cin>>p>>q>>r;
  cout<<min(p+q,p+r,min(q+r))<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:24: error: no matching function for call to 'min(int)'
    7 |   cout<<min(p+q,p+r,min(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: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
Language: C++

#include<iostream>
using namespace std;
int main()
{
  int p,q,r;
  cin>>p>>q>>r;
  cout<<min({p+r,r+q,p+q})<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:12: error: no matching function for call to 'min(<brace-enclosed initializer list>)'
    7 |   cout<<min({p+r,r+q,p+q})<<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: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
Language: C++

#include<iostream>
using namespace std;
int main()
{
  int p,q,r;
  cin>>p>>q>>r;
  cout<<min(p+q,r+q,r+p)<<endl;
}

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:7:12:   required from here
    7 |   cout<<min(p+q,r+q,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 <bits/std++.h>

using namespace std;

int main(){
  
  int p,q,r,a;
  cin >> p >> q >> r;
  
  a = p+q+r - max({p,q,r});
  
  cout << a << endl;
}


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

#include bits/std++.h>

using namespace std;

int main(){
  
  int p,q,r,a;
  cin >> p >> q >> r;
  
  a = p+q+r - max({p,q,r});
  
  cout << a << endl;
}

Compiler output:
a.cc:1:10: error: #include expects "FILENAME" or <FILENAME>
    1 | #include bits/std++.h>
      |          ^~~~
a.cc: In function 'int main()':
a.cc:8:3: error: 'cin' was not declared in this scope
    8 |   cin >> p >> q >> r;
      |   ^~~
a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
  +++ |+#include <iostream>
    1 | #include bits/std++.h>
a.cc:10:15: error: 'max' was not declared in this scope
   10 |   a = p+q+r - max({p,q,r});
      |               ^~~
a.cc:12:3: error: 'cout' was not declared in this scope
   12 |   cout << a << endl;
      |   ^~~~
a.cc:12:3: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:12:16: error: 'endl' was not declared in this scope
   12 |   cout << a << endl;
      |                ^~~~
a.cc:1:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
  +++ |+#include <ostream>
    1 | #include bits/std++.h>
Language: C++

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

int main() {
    int a, b, c, p, q, r;
    cin >> p >> q >> r;
    a = p + q;
    b = q + r;
    c = r + p;
    cout << min(a, b, c) << 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:11:16:   required from here
   11 |     cout << min(a, b, c) << 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 <stdio.h>

int main(){
  int p,q,r;
  if(scanf(%d,&p)==1 || scanf(%d,&q)==1 || scanf(%d,&r)==1){}
  
  int pq,qr,rp;
  pq = p + q;
  qr = q + r;
  rp = r + p;
  
  if(pq <= qr && pq <= rp){
    printf("%d",pq);
  }else if(qr <= rp){
    printf("%d",qr);
  }else{
    printf("%d",rp);
  }
  
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:5:12: error: expected expression before '%' token
    5 |   if(scanf(%d,&p)==1 || scanf(%d,&q)==1 || scanf(%d,&r)==1){}
      |            ^
main.c:5:31: error: expected expression before '%' token
    5 |   if(scanf(%d,&p)==1 || scanf(%d,&q)==1 || scanf(%d,&r)==1){}
      |                               ^
main.c:5:50: error: expected expression before '%' token
    5 |   if(scanf(%d,&p)==1 || scanf(%d,&q)==1 || scanf(%d,&r)==1){}
      |                                                  ^
Language: C

P,Q,R = (int(a) for a in input().split())
if P<Q:
    if Q<R:
        print(P+Q)
    else:
        print(P+R)
else:
    if P<R:
        print(P+Q)
    else:
        print(Q+R)

Compiler output:
main.c:1:1: warning: data definition has no type or storage class
    1 | P,Q,R = (int(a) for a in input().split())
      | ^
main.c:1:1: error: type defaults to 'int' in declaration of 'P' [-Wimplicit-int]
main.c:1:3: error: type defaults to 'int' in declaration of 'Q' [-Wimplicit-int]
    1 | P,Q,R = (int(a) for a in input().split())
      |   ^
main.c:1:5: error: type defaults to 'int' in declaration of 'R' [-Wimplicit-int]
    1 | P,Q,R = (int(a) for a in input().split())
      |     ^
main.c:1:14: error: expected ')' before 'a'
    1 | P,Q,R = (int(a) for a in input().split())
      |              ^
      |              )
main.c:1:16: error: expected ')' before 'for'
    1 | P,Q,R = (int(a) for a in input().split())
      |         ~      ^~~~
      |                )
main.c:2:1: error: expected ',' or ';' before 'if'
    2 | if P<Q:
      | ^~