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

#include<bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
int main(){
  int P[3];
  cin >> P[0] >> P[1] >> P[2];
  vector<int> min();
  min[0]=P[0]+P[1];
  min[1]=P[1]+P[2];
  min[2]=P[0]+P[2];
  sort(min.begin(), min.end());
  cout << min[0] << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:7:18: warning: empty parentheses were disambiguated as a function declaration [-Wvexing-parse]
    7 |   vector<int> min();
      |                  ^~
a.cc:7:18: note: remove parentheses to default-initialize a variable
    7 |   vector<int> min();
      |                  ^~
      |                  --
a.cc:8:8: warning: pointer to a function used in arithmetic [-Wpointer-arith]
    8 |   min[0]=P[0]+P[1];
      |        ^
a.cc:8:9: error: assignment of read-only location '* min'
    8 |   min[0]=P[0]+P[1];
      |   ~~~~~~^~~~~~~~~~
a.cc:9:8: warning: pointer to a function used in arithmetic [-Wpointer-arith]
    9 |   min[1]=P[1]+P[2];
      |        ^
a.cc:9:9: error: assignment of read-only location '*(min + 1)'
    9 |   min[1]=P[1]+P[2];
      |   ~~~~~~^~~~~~~~~~
a.cc:10:8: warning: pointer to a function used in arithmetic [-Wpointer-arith]
   10 |   min[2]=P[0]+P[2];
      |        ^
a.cc:10:9: error: assignment of read-only location '*(min + 2)'
   10 |   min[2]=P[0]+P[2];
      |   ~~~~~~^~~~~~~~~~
a.cc:11:12: error: request for member 'begin' in 'min', which is of non-class type 'std::vector<int>()'
   11 |   sort(min.begin(), min.end());
      |            ^~~~~
a.cc:11:25: error: request for member 'end' in 'min', which is of non-class type 'std::vector<int>()'
   11 |   sort(min.begin(), min.end());
      |                         ^~~
a.cc:12:16: warning: pointer to a function used in arithmetic [-Wpointer-arith]
   12 |   cout << min[0] << endl;
      |                ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
int main(){
  int P[3];
  cin >> P[0] >> P[1] >> P[2];
  vector<int>min();
  min[0]=P[0]+P[1];
  min[1]=P[1]+P[2];
  min[2]=P[0]+P[2];
  sort(min.begin(), min.end());
  cout << min[0] << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:7:17: warning: empty parentheses were disambiguated as a function declaration [-Wvexing-parse]
    7 |   vector<int>min();
      |                 ^~
a.cc:7:17: note: remove parentheses to default-initialize a variable
    7 |   vector<int>min();
      |                 ^~
      |                 --
a.cc:8:8: warning: pointer to a function used in arithmetic [-Wpointer-arith]
    8 |   min[0]=P[0]+P[1];
      |        ^
a.cc:8:9: error: assignment of read-only location '* min'
    8 |   min[0]=P[0]+P[1];
      |   ~~~~~~^~~~~~~~~~
a.cc:9:8: warning: pointer to a function used in arithmetic [-Wpointer-arith]
    9 |   min[1]=P[1]+P[2];
      |        ^
a.cc:9:9: error: assignment of read-only location '*(min + 1)'
    9 |   min[1]=P[1]+P[2];
      |   ~~~~~~^~~~~~~~~~
a.cc:10:8: warning: pointer to a function used in arithmetic [-Wpointer-arith]
   10 |   min[2]=P[0]+P[2];
      |        ^
a.cc:10:9: error: assignment of read-only location '*(min + 2)'
   10 |   min[2]=P[0]+P[2];
      |   ~~~~~~^~~~~~~~~~
a.cc:11:12: error: request for member 'begin' in 'min', which is of non-class type 'std::vector<int>()'
   11 |   sort(min.begin(), min.end());
      |            ^~~~~
a.cc:11:25: error: request for member 'end' in 'min', which is of non-class type 'std::vector<int>()'
   11 |   sort(min.begin(), min.end());
      |                         ^~~
a.cc:12:16: warning: pointer to a function used in arithmetic [-Wpointer-arith]
   12 |   cout << min[0] << endl;
      |                ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
int main(){
  int P[3];
  cin >> P[0] >> P[1] >> P[2];
  int min[3];
  min[0]=P[0]+P[1];
  min[1]=P[1]+P[2];
  min[2]=P[0]+P[2];
  sort(begin.min(), end.min());
  cout << min[0] << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:11:14: error: overloaded function with no contextual type information
   11 |   sort(begin.min(), end.min());
      |              ^~~
a.cc:11:25: error: overloaded function with no contextual type information
   11 |   sort(begin.min(), end.min());
      |                         ^~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
int main(){
  int P[3];
  cin >> P[0] >> P[1] >> R[2];
  int min[3];
  min[0]=P[0]+P[1];
  min[1]=P[1]+P[2];
  min[2]=P[0]+P[2];
  sort{begin.min(), end.min()};
  cout << min[0] << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:6:26: error: 'R' was not declared in this scope
    6 |   cin >> P[0] >> P[1] >> R[2];
      |                          ^
a.cc:11:7: error: expected ';' before '{' token
   11 |   sort{begin.min(), end.min()};
      |       ^
      |       ;
a.cc:11:31: error: statement cannot resolve address of overloaded function
   11 |   sort{begin.min(), end.min()};
      |                               ^
Language: C++

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

long long n,a,m,k,q,b,c=1;
string ss,s1,s2;
int main(){
    cin>>a>>b>>c;
    cout<<min(a+b,min(b+c,a+c);
}


Compiler output:
a.cc: In function 'int main()':
a.cc:9:31: error: expected ')' before ';' token
    9 |     cout<<min(a+b,min(b+c,a+c);
      |              ~                ^
      |                               )
Language: C++

#include <iostream>
using namespace std;

void chmin(int &ans, int &temp){
  if(temp < ans) ans = temp;
}

int main(){
  int a[3]; for(int i; i<3, i++) cin >> a[i];
  int ans=1e7;
  for(int i; i<3, i++){
    im = i%3; jm = j%3;
    chmin(ans, a[im]+a[jm]);
  }
  cout << ans << "\n";
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:32: error: expected ';' before ')' token
    9 |   int a[3]; for(int i; i<3, i++) cin >> a[i];
      |                                ^
      |                                ;
a.cc:11:22: error: expected ';' before ')' token
   11 |   for(int i; i<3, i++){
      |                      ^
      |                      ;
a.cc:12:5: error: 'im' was not declared in this scope; did you mean 'i'?
   12 |     im = i%3; jm = j%3;
      |     ^~
      |     i
a.cc:12:15: error: 'jm' was not declared in this scope; did you mean 'tm'?
   12 |     im = i%3; jm = j%3;
      |               ^~
      |               tm
a.cc:12:20: error: 'j' was not declared in this scope
   12 |     im = i%3; jm = j%3;
      |                    ^
Language: C++

#include <iostream>
#include <algorithm>

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


Compiler output:
a.cc: In function 'int main()':
a.cc:7:16: error: 'min' was not declared in this scope; did you mean 'std::min'?
    7 |   std::cout << min({p+q, q+r, r+p}) << std::endl;
      |                ^~~
      |                std::min
In file included from /usr/include/c++/14/algorithm:61,
                 from a.cc:2:
/usr/include/c++/14/bits/stl_algo.h:5696:5: note: 'std::min' declared here
 5696 |     min(initializer_list<_Tp> __l, _Compare __comp)
      |     ^~~
Language: C++

#include <iostream>

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

Compiler output:
a.cc: In function 'int main()':
a.cc:6:16: error: 'min' was not declared in this scope; did you mean 'std::min'?
    6 |   std::cout << min({p+q, q+r, r+p}) << std::endl;
      |                ^~~
      |                std::min
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:281:5: note: 'std::min' declared here
  281 |     min(const _Tp& __a, const _Tp& __b, _Compare __comp)
      |     ^~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
static const int MOD = 1e9 + 7;

bool pairCompare(const pair<int, int>& firstElof, const pair<int, int>& secondElof) {
    return firstElof.first > secondElof.first;
}

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

    int ans;

    ans = P + Q + R - max{P, Q, R};

    cout << ans;

    return (0);
}


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

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:8:37: error: expected ';' before '}' token
    8 |     cout << min(p + q, min(q+r,r+p))
      |                                     ^
      |                                     ;
    9 | }
      | ~
Language: C++

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

int main(){
	int 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:33: error: expected ';' before 'endl'
    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: In instantiation of 'constexpr const _Tp& std::max(const _Tp&, const _Tp&, _Compare) [with _Tp = int; _Compare = int]':
a.cc:7:19:   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 <bits/stdc++.h>
using namespace std;
const int N = 2e5 + 25, M = 1e6 + 25, oo = 1e9+7, mxmsk = 1 << 16;
const long long OO = 1e18+25;
#define par pair<pair<int,int>, int>
#define f first
#define s second
    
int x,a,b;

int main()
{
    scanf("%d%d%d",&x,&a,&b);
    printf("%d",a+b+x-max(x,max(a,b));
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:38: error: expected ')' before ';' token
   14 |     printf("%d",a+b+x-max(x,max(a,b));
      |           ~                          ^
      |                                      )
Language: C++

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:7:26: 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/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:7:26: note:   deduced conflicting types for parameter '_Tp' ('bool' and 'int')
    7 |   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>
int a[1000],n;
int main()
{
	int p,q,r;
	scanf("%d%d%d",&p,&q,&r);
	printf("%d\n",min(p+q,min(q+r,p+r)));
	return 0;
}

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

#include<stdio.h>
#include<algorithm>
using namespace std;
int a[109];
int main()
{
    int i;
    for(i=1; i<=3; i++)
        scanf("%d",&a[i]);
    sort(a+1,a+3+1);
    printf("%d\n",a[1]+a[2]);
}


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

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


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

#include <iostream>
using namespace std;
int main() {
  int a, b, c; cin >> a >> b >> c;
  cout << a + b + c - max(a,b,c) << 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:5:26:   required from here
    5 |   cout << a + b + c - 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 <stdio.h>

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


Compiler output:
main.c: In function 'main':
main.c:7:18: error: 'max' undeclared (first use in this function)
    7 |   if(min >= q+r) max = q+r;
      |                  ^~~
main.c:7:18: 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;
  scanf("%d %d %d", &p, &q, &r);
  int min = p+q;
  if(max >= q+r) max = q+r;
  if(max >= r+p) max = r+q;
  printf("%d", max);
  return 0;
}


Compiler output:
main.c: In function 'main':
main.c:7:6: error: 'max' undeclared (first use in this function)
    7 |   if(max >= q+r) max = q+r;
      |      ^~~
main.c:7:6: 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;
  scanf("%d %d %d", &p, &q, &r);
  int max == p+q;
  if(max <= q+r) max == q+r;
  if(max <= r+p) max == r+q;
  printf("%d", max);
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:6:11: error: expected '=', ',', ';', 'asm' or '__attribute__' before '==' token
    6 |   int max == p+q;
      |           ^~
main.c:6:11: error: expected expression before '==' token
main.c:7:6: error: 'max' undeclared (first use in this function)
    7 |   if(max <= q+r) max == q+r;
      |      ^~~
main.c:7:6: note: each undeclared identifier is reported only once for each function it appears in
Language: C++

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

int p,q,r;
int main()
{
    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:10:22:   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;
typedef long long ll;
typedef pair<int, int>pi;

const ll inf = 1e18;
const ll mod = 1e9+7;
int p,q,r;
int main()
{
    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:12:22:   required from here
   12 |     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;
	cin >> p >> q >> r;
	vector<int> vc = {p, q, r}
	sort(vc.begin(), vc.end());
	cout << vc.at(0)+vc.at(1) << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:9: error: expected ',' or ';' before 'sort'
    8 |         sort(vc.begin(), vc.end());
      |         ^~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
#define all(v) v.begin(), v.end()
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
const double PI=3.14159265358979323846;
const int64_t waru = 1000000007;
using in = int64_t;

int main(){
int p,q,r;
  cin>>p>>q>>r;
  
 inta1,a2,a3; a1=p+q;
  a2=q+r;
  a3=p+r;
  cout<<max(a1,max(a2,a3));
}


Compiler output:
a.cc: In function 'int main()':
a.cc:13:2: error: 'inta1' was not declared in this scope; did you mean 'int'?
   13 |  inta1,a2,a3; a1=p+q;
      |  ^~~~~
      |  int
a.cc:13:8: error: 'a2' was not declared in this scope
   13 |  inta1,a2,a3; a1=p+q;
      |        ^~
a.cc:13:11: error: 'a3' was not declared in this scope
   13 |  inta1,a2,a3; a1=p+q;
      |           ^~
a.cc:13:15: error: 'a1' was not declared in this scope; did you mean 'y1'?
   13 |  inta1,a2,a3; a1=p+q;
      |               ^~
      |               y1
Language: C++

#include <bits/stdc++.h>
using namespace std;
#define all(v) v.begin(), v.end()
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
const double PI=3.14159265358979323846;
const int64_t waru = 1000000007;
using in = int64_t;

int main(){
int p,q,r;
  cin>>p>>q>>r;
  
  a1=p+q;
  a2=q+r;
  a3=p+r;
  cout<<max(a1,max(a2,a3));
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:3: error: 'a1' was not declared in this scope; did you mean 'y1'?
   13 |   a1=p+q;
      |   ^~
      |   y1
a.cc:14:3: error: 'a2' was not declared in this scope
   14 |   a2=q+r;
      |   ^~
a.cc:15:3: error: 'a3' was not declared in this scope
   15 |   a3=p+r;
      |   ^~
Language: C++

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

int main() {
	int p, q, r;
	cin >> p >> q >> r;
	cout << min(p + q, p + r, 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::min(const _Tp&, const _Tp&, _Compare) [with _Tp = int; _Compare = int]':
a.cc:7:13:   required from here
    7 |         cout << min(p + q, p + r, q + r) << 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(){
    int p;
    int q;
    int r;
    cin >> p >> q >> r;
    cout << p + q + r - max({p, q, r}) << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:28: error: no matching function for call to 'max(<brace-enclosed initializer list>)'
   10 |     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 <bits/stdc++.h>
using namespace std;


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


Compiler output:
a.cc: In function 'int main()':
a.cc:8:30: error: expected ';' before ')' token
    8 |   m = min(min(P+Q, Q+R), R+P));
      |                              ^
      |                              ;
Language: C++

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


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


Compiler output:
a.cc: In function 'int main()':
a.cc:8:34: error: expected ';' before ')' token
    8 |   cout << min(min(P+Q, Q+R), R+P)); << endl;
      |                                  ^
      |                                  ;
a.cc:8:37: error: expected primary-expression before '<<' token
    8 |   cout << min(min(P+Q, Q+R), R+P)); << endl;
      |                                     ^~
Language: C++

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


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


Compiler output:
a.cc: In function 'int main()':
a.cc:8:34: error: expected ';' before ')' token
    8 |   cout << min(min(P+Q, Q+R), R+P)) << endl;
      |                                  ^
      |                                  ;
Language: C++

#include<iostream>
#include<string.h>
#include<math.h>
#include<algorithm>

using namespace std;

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

Compiler output:
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:11:25:   required from here
   11 |         cout << a + b + c - 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++

v#pragma GCC optimize("Ofast")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
#include<bits/stdc++.h>
#define ll long long
#define ull unsigned long long
#define pii pair<int,int>
#define pp pair<pair<ll, ll>,pair<ll, ll>>
#define pll pair<ll,ll>
#define pdd pair<double,double>
#define vii vector<int>
#define vll vector<ll>
#define mat vector<vector<ll>>
#define lb lower_bound
#define pb push_back
#define fi first
#define sc second
#define rep(i,n) for(ll i=0;i<n;i++)
#define rep2(i,a,b) for(ll i=a;i<b;i++)
#define repr(i,n) for(ll i=n-1;i>=0;i--)
#define all(x) x.begin(),x.end()
#define pq priority_queue<ll>
#define pqg priority_queue<ll,vector<ll>,greater<ll>>
#define LB(v,x) (lower_bound(v.begin(),v.end(),x)-v.begin())
#define UB(v,x) (upper_bound(v.begin(),v.end(),x)-v.begin())
#define ERASE(v) sort(v.begin(),v.end());v.erase(unique(v.begin(),v.end()),v.end())
// #define int ll
using namespace std;
const ll INF = (1 << 30 ) - 1;
const ll LLINF = (1LL << 60LL);
const ll MOD = 1000000007;
const ll mod = 998244353;
const ll MAX = 1100000;
const double pi = acos(-1);
const double eps = 1e-10;
ll dx[4] ={1,0,-1,0} , dy[4] ={0,1,0,-1};
 
template<class T> 
inline bool chmax(T& a, T b) { if (a < b) { a = b; return 1; } return 0; }
template<class T> 
inline bool chmin(T& a, T b) { if (a > b) { a = b; return 1; } return 0; }
 
struct Timer{
    chrono::system_clock::time_point start, end;
    Timer(){ start = chrono::system_clock::now(); }
    ~Timer(){
        end = chrono::system_clock::now();
        auto msec = chrono::duration_cast<chrono::milliseconds>(end - start).count();
        cerr<<"time : "<<msec<<" ms"<<endl;
    }
};
 
 
 
signed main(){
    cin.tie(0);
    ios::sync_with_stdio(false);
    cout << fixed << setprecision(15);
    Timer TM;

    ll a,b,c;
    cin>>a>>b>>c;
    ll s=a+b+c;
    cout<<min(min(s-a,s-b),s-c)<<endl;
    return 0;
}

Compiler output:
a.cc:1:2: error: stray '#' in program
    1 | v#pragma GCC optimize("Ofast")
      |  ^
a.cc:1:1: error: 'v' does not name a type
    1 | v#pragma GCC optimize("Ofast")
      | ^
Language: C

#include<stdio.h>
int main(){
  int p,q,r,abc,acb,bac;
  scanf("%d",&p);
  scanf("%d",&q);
  scanf("%d",&r);
  abc = p+q;
  acb = r+q;
  bac = p+r;
  if(abc > acb) m = abc;
  else m = acb;
  if(bac > m) m = bac;
  printf("%d",m); 
}

Compiler output:
main.c: In function 'main':
main.c:10:17: error: 'm' undeclared (first use in this function)
   10 |   if(abc > acb) m = abc;
      |                 ^
main.c:10:17: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include<stdio.h>
int main(){
  int p,q,r;
  scanf("%d",&p);
  scanf("%d",&q);
  scanf("%d",&r);
  abc = p+q;
  acb = r+q;
  bac = p+r;
  if(abc > acb) m = abc;
  else m = acb;
  if(bac > m) m = bac;
  printf("%d",m); 
}

Compiler output:
main.c: In function 'main':
main.c:7:3: error: 'abc' undeclared (first use in this function)
    7 |   abc = p+q;
      |   ^~~
main.c:7:3: note: each undeclared identifier is reported only once for each function it appears in
main.c:8:3: error: 'acb' undeclared (first use in this function)
    8 |   acb = r+q;
      |   ^~~
main.c:9:3: error: 'bac' undeclared (first use in this function)
    9 |   bac = p+r;
      |   ^~~
main.c:10:17: error: 'm' undeclared (first use in this function)
   10 |   if(abc > acb) m = abc;
      |                 ^
Language: C

#include<stdio.h>
int main(){
  int abs,acb,bac;
  scanf("%d",&abc);
  scanf("%d",&acb);
  scanf("%d",&bac);
  abc = p+q;
  acb = r+q;
  bac = p+r;
  if(abc > acb) m = abc;
  else m = acb;
  if(bac > m) m = bac;
  printf("%d",m); 
}

Compiler output:
main.c: In function 'main':
main.c:4:15: error: 'abc' undeclared (first use in this function); did you mean 'bac'?
    4 |   scanf("%d",&abc);
      |               ^~~
      |               bac
main.c:4:15: note: each undeclared identifier is reported only once for each function it appears in
main.c:7:9: error: 'p' undeclared (first use in this function)
    7 |   abc = p+q;
      |         ^
main.c:7:11: error: 'q' undeclared (first use in this function)
    7 |   abc = p+q;
      |           ^
main.c:8:9: error: 'r' undeclared (first use in this function)
    8 |   acb = r+q;
      |         ^
main.c:10:17: error: 'm' undeclared (first use in this function)
   10 |   if(abc > acb) m = abc;
      |                 ^
Language: C

#include<stdio.h>
int main(){
  int abs,acb,bac;
  scanf("%d",&abc);
  scanf("%d",&acb);
  scanf("%d",&p+r);
  abc = p+q;
  acb = r+q;
  bac = p+r;
  if(abc > acb) m = abc;
  else m = acb;
  if(bac > m) m = bac;
  printf("%d",m); 
}

Compiler output:
main.c: In function 'main':
main.c:4:15: error: 'abc' undeclared (first use in this function); did you mean 'bac'?
    4 |   scanf("%d",&abc);
      |               ^~~
      |               bac
main.c:4:15: note: each undeclared identifier is reported only once for each function it appears in
main.c:6:15: error: 'p' undeclared (first use in this function)
    6 |   scanf("%d",&p+r);
      |               ^
main.c:6:17: error: 'r' undeclared (first use in this function)
    6 |   scanf("%d",&p+r);
      |                 ^
main.c:7:11: error: 'q' undeclared (first use in this function)
    7 |   abc = p+q;
      |           ^
main.c:10:17: error: 'm' undeclared (first use in this function)
   10 |   if(abc > acb) m = abc;
      |                 ^
Language: C++

a,b,c = map(int, input().split())
x = 1000
if x > a+b:
    x = a+b
if x> b+c:
    x = b+c
if x> c+a:
    x = c+a
print(x)

Compiler output:
a.cc:1:1: error: 'a' does not name a type
    1 | a,b,c = map(int, input().split())
      | ^
Language: C++

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

int main() {
  int p, q, r;
  cin >> p >> q >> r;
  int ans = min(p + q, q + r, r + p);
  cout << ans << 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::min(const _Tp&, const _Tp&, _Compare) [with _Tp = int; _Compare = int]':
a.cc:7:16:   required from here
    7 |   int ans = min(p + q, q + r, r + p);
      |             ~~~^~~~~~~~~~~~~~~~~~~~~
/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;
if(P=<Q=<R){
    cout<<P+Q;
}
 if(Q=<R=<P){
    cout<<Q+R;
}
 if(R=<P=<Q){
    cout<<R+P;
}
  
  
  
return 0 ;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:6: error: expected primary-expression before '<' token
    7 | if(P=<Q=<R){
      |      ^
a.cc:7:9: error: expected primary-expression before '<' token
    7 | if(P=<Q=<R){
      |         ^
a.cc:10:7: error: expected primary-expression before '<' token
   10 |  if(Q=<R=<P){
      |       ^
a.cc:10:10: error: expected primary-expression before '<' token
   10 |  if(Q=<R=<P){
      |          ^
a.cc:13:7: error: expected primary-expression before '<' token
   13 |  if(R=<P=<Q){
      |       ^
a.cc:13:10: error: expected primary-expression before '<' token
   13 |  if(R=<P=<Q){
      |          ^
Language: C++

#include<bit/stdc++.h>
using namespace std;
int main(){
  int A,B,C;
  cin>>A>>B>>C;
  cout<<A+B+C-max(A,max(B,C))<<endl;
  }

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

#include<bits/stdc++.h>
using namespace std;
int main(){
int P,Q,R;
cin>>P>>Q>>R;
if(P=<Q=<R){
    cout<<P+Q;
}
 if(Q=<R=<P){
    cout<<Q+R;
}
 if(R=<P=<Q){
    cout<<R+P;
}
return 0 ;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:6:6: error: expected primary-expression before '<' token
    6 | if(P=<Q=<R){
      |      ^
a.cc:6:9: error: expected primary-expression before '<' token
    6 | if(P=<Q=<R){
      |         ^
a.cc:9:7: error: expected primary-expression before '<' token
    9 |  if(Q=<R=<P){
      |       ^
a.cc:9:10: error: expected primary-expression before '<' token
    9 |  if(Q=<R=<P){
      |          ^
a.cc:12:7: error: expected primary-expression before '<' token
   12 |  if(R=<P=<Q){
      |       ^
a.cc:12:10: error: expected primary-expression before '<' token
   12 |  if(R=<P=<Q){
      |          ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
int P,Q,R;
cin>>P>>Q>>R;
if(P=<Q=<R){
    cout<<P+Q;
}
else if(Q=<R=<P){
    cout<<Q+R;
}
else if(R=<P=<Q){
    cout<<R+P;
}
return 0 ;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:6:6: error: expected primary-expression before '<' token
    6 | if(P=<Q=<R){
      |      ^
a.cc:6:9: error: expected primary-expression before '<' token
    6 | if(P=<Q=<R){
      |         ^
a.cc:9:11: error: expected primary-expression before '<' token
    9 | else if(Q=<R=<P){
      |           ^
a.cc:9:14: error: expected primary-expression before '<' token
    9 | else if(Q=<R=<P){
      |              ^
a.cc:12:11: error: expected primary-expression before '<' token
   12 | else if(R=<P=<Q){
      |           ^
a.cc:12:14: error: expected primary-expression before '<' token
   12 | else if(R=<P=<Q){
      |              ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
int P,Q,R;
cin>>P>>Q>>R;
if(P<=Q<=R){
    cout<<P+Q;
}
else if(Q=<R=<P){
    cout<<Q+R;
}
else if(R=<P=<Q){
    cout<<R+P;
}
return 0 ;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:9:11: error: expected primary-expression before '<' token
    9 | else if(Q=<R=<P){
      |           ^
a.cc:9:14: error: expected primary-expression before '<' token
    9 | else if(Q=<R=<P){
      |              ^
a.cc:12:11: error: expected primary-expression before '<' token
   12 | else if(R=<P=<Q){
      |           ^
a.cc:12:14: error: expected primary-expression before '<' token
   12 | else if(R=<P=<Q){
      |              ^
Language: C++

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

int main(){
	int ans=0;
	
	int p,q,r;
	cin >> p >> q >> r;
	ans = p+q+r-max(p,q,r);
	cout << ans << 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 = int; _Compare = int]':
a.cc:11:17:   required from here
   11 |         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>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
typedef long long ll;


void solve() {
  int arr[3];
  rep(i,N) {
    scanf("%d", &arr[i]);
  }
  sort(arr, arr+3);

  cout << arr[0]+arr[1] << "\n";
}

int main() {
  solve();
  return 0;
}


Compiler output:
a.cc: In function 'void solve()':
a.cc:9:9: error: 'N' was not declared in this scope
    9 |   rep(i,N) {
      |         ^
a.cc:3:45: note: in definition of macro 'rep'
    3 | #define rep(i, n) for (int i = 0; i < (int)(n); i++)
      |                                             ^
Language: C++

#include <iostream >
using namespace std ;
int main (){


int x,z,a;
cin >> x>>z>>a;
if (x+z<=x+a&&x+z<=z+a){
    cout << x+z;
}

else if (x+a<=x+z&&x+a<=z+a){
    cout << x+a;
}
else if (z+a<=x+a&&z+a<=x+z){
    cout << z+a;
}





return 0;
}


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

#include <iostream >
using namespace std ;
int main (){


int x,z,a;
cin >> x>>z>>a;
if (x+z<=x+a&&x+z<=z+a){
    cout << x+z;
}

else if (x+a<=x+z&&x+a<=z+a){
    cout << x+a;
}
else if (z+a<=x+a&&z+a<=x+z){
    cout << z+a
;}





return 0;
}


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

#include <iostream>

using namespace std;

int main(){
  int 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:8:14: error: no matching function for call to 'min(<brace-enclosed initializer list>)'
    8 |   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<bits/stdc++.h>
using namespace std;

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

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:12:   required from here
    7 |   cout<<min(p+q,q+r,r+p);
      |         ~~~^~~~~~~~~~~~~
/usr/include/c++/14/bits/stl_algobase.h:284:17: error: '__comp' cannot be used as a function
  284 |       if (__comp(__b, __a))
      |           ~~~~~~^~~~~~~~~~
Language: Java

import java.util.Scanner;
import java.util.Arrays;

public class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in):
    int[] a = new int[3];
    int ans = 0;
    for(int i = 0;i < a.length;i++){
      a[i] = sc.nextInt();
    }
    Arrays.sort(a);
    ans = a[0] + a[1];
    System.out.println(ans);
    sc.close();
  }
}

Compiler output:
Main.java:6: error: ';' expected
    Scanner sc = new Scanner(System.in):
                                       ^
1 error
Language: C++

#include <iostream>
#include <vector>
#include <algorithm>
using namespace std;
int main(){
  int a,b,c;
  int ans=0;
  cin >> a >> b >> c;
  vector<int> d(3);
  d[0]=a;
  d[1]=b;
  d[2]=c;
  sort(v.begin(),v.end());
  ans=v[0]+v[1];
  cout << ans << endl;
  return 0;
  
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:8: error: 'v' was not declared in this scope
   13 |   sort(v.begin(),v.end());
      |        ^
Language: C

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

Compiler output:
main.c: In function 'main':
main.c:10:22: error: 'qq' undeclared (first use in this function); did you mean 'q'?
   10 |         else if(q>p&&qq>r{
      |                      ^~
      |                      q
main.c:10:22: note: each undeclared identifier is reported only once for each function it appears in
main.c:10:26: error: expected ')' before '{' token
   10 |         else if(q>p&&qq>r{
      |                ~         ^
      |                          )
main.c:17:1: error: expected expression before '}' token
   17 | }
      | ^
Language: C

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

Compiler output:
main.c: In function 'main':
main.c:4:28: error: 'p' undeclared (first use in this function)
    4 |         if(scanf("%d%d%d",&p,&q,&r)==-1){
      |                            ^
main.c:4:28: note: each undeclared identifier is reported only once for each function it appears in
main.c:4:31: error: 'q' undeclared (first use in this function)
    4 |         if(scanf("%d%d%d",&p,&q,&r)==-1){
      |                               ^
main.c:4:34: error: 'r' undeclared (first use in this function)
    4 |         if(scanf("%d%d%d",&p,&q,&r)==-1){
      |                                  ^
main.c:10:22: error: 'qq' undeclared (first use in this function)
   10 |         else if(q>p&&qq>r{
      |                      ^~
main.c:10:26: error: expected ')' before '{' token
   10 |         else if(q>p&&qq>r{
      |                ~         ^
      |                          )
main.c:17:1: error: expected expression before '}' token
   17 | }
      | ^
Language: C++

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

int main(){
  int ab, bc, ca, minRoot;
  cin ab >> bc >> ca;
  
  minRoot = min(ab+bc, bc+ca, ab+ca);
  cout << minRoot << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:6: error: expected ';' before 'ab'
    6 |   cin ab >> bc >> ca;
      |      ^~~
      |      ;
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:8:16:   required from here
    8 |   minRoot = min(ab+bc, bc+ca, ab+ca);
      |             ~~~^~~~~~~~~~~~~~~~~~~~~
/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/stdc++.h>
using namespace std;

int main(){
  vector<int> time(3);
  for(int i=0;i<n;i++) cin >> time.at(i);
  sort(time.begin(),time.end());
  cout << time.at(0)+time.at(1) << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:17: error: 'n' was not declared in this scope
    6 |   for(int i=0;i<n;i++) cin >> time.at(i);
      |                 ^
Language: C++

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:7:29: error: invalid operands of types 'const int' and '<unresolved overloaded function type>' to binary 'operator<<'
    7 |   cout<<P+Q+R-max(P,max(Q,R)<<endl;
      |                     ~~~~~~~~^~~~~~
Language: C++

#include <iostream>
#include <cstdlib>
#include <vector>
using namespace std;

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

  cout << p + r + r - max({p, q, r}) << endl;
  return 0;
  
}


Compiler output:
a.cc: In function 'int main()':
a.cc:10:26: error: no matching function for call to 'max(<brace-enclosed initializer list>)'
   10 |   cout << p + r + 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 <cstdlib>
using namespace std;

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

  cout << p + r + r - max({p, q, r}) << endl;
  return 0;
  
}


Compiler output:
a.cc: In function 'int main()':
a.cc:9:26: error: no matching function for call to 'max(<brace-enclosed initializer list>)'
    9 |   cout << p + r + 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