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

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

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


Compiler output:
a.cc: In function 'int main()':
a.cc:9:13: error: expected initializer before '+=' token
    9 |     int ans += P+R;
      |             ^~
a.cc:12:13: error: expected initializer before '+=' token
   12 |     int ans += Q+R;
      |             ^~
a.cc:15:13: error: expected initializer before '+=' token
   15 |     int ans += P+Q;
      |             ^~
Language: C++

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

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

  if (Q>=R && Q>=P) {
    cout << P+R << endl;
  }

  if (R>=P && R>=Q ) {
    cout << P+Q << endl;
  }

  if (P>=Q && P>=R) {
    cout << R+Q << endl｝


Compiler output:
a.cc: In function 'int main()':
a.cc:17:20: error: 'endl\U0000ff5d' was not declared in this scope
   17 |     cout << R+Q << endl｝
      |                    ^~~~~~
a.cc:17:26: error: expected '}' at end of input
   17 |     cout << R+Q << endl｝
      |                          ^
a.cc:16:21: note: to match this '{'
   16 |   if (P>=Q && P>=R) {
      |                     ^
a.cc:17:26: error: expected '}' at end of input
   17 |     cout << R+Q << endl｝
      |                          ^
a.cc:4:12: note: to match this '{'
    4 | int main() {
      |            ^
Language: C++

#include <iostream>
#include <cctype>
#include <cstdlib>
#include <string>
#include <algorithm>
#define rep(i, n) for(int i = 0; i < n; ++i)
using namespace std;

int comp(const void* a, const void* b){
	return *(int*)a - *(int*)b;
}

int main() {
	int a, b, c, min;
	cin >> a >> b >> c;
	int ab = a+b;
	int bc = b+c;
	int ca = a+c;
	int min = ab;
	if(min > bc){
		min = bc;
		if(min > bc){
			min = ca;
		}
	}
	cout << min << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:19:13: error: redeclaration of 'int min'
   19 |         int min = ab;
      |             ^~~
a.cc:14:22: note: 'int min' previously declared here
   14 |         int a, b, c, min;
      |                      ^~~
Language: C++

#include<iostream>
#include <algorithm>
using namespace std;
int main(){
  int P,Q,R;
  vector<int> sum;
  cin >> P;
  cin >> Q;
  cin >> R;
  sum.push_back(P+Q);
  sum.push_back(Q+R);
  sum.push_back(R+P);
  sort(v.begin(), v.end(), std::greater<int>() );
  cout << v.begin() << endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:3: error: 'vector' was not declared in this scope
    6 |   vector<int> sum;
      |   ^~~~~~
a.cc:3:1: note: 'std::vector' is defined in header '<vector>'; this is probably fixable by adding '#include <vector>'
    2 | #include <algorithm>
  +++ |+#include <vector>
    3 | using namespace std;
a.cc:6:10: error: expected primary-expression before 'int'
    6 |   vector<int> sum;
      |          ^~~
a.cc:10:3: error: 'sum' was not declared in this scope
   10 |   sum.push_back(P+Q);
      |   ^~~
a.cc:13:8: error: 'v' was not declared in this scope
   13 |   sort(v.begin(), v.end(), std::greater<int>() );
      |        ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
#include <iostream>
#include <vector>
#include <algorithm>
int main() {
	int a,b,c,A,B,ans;

	cin >> a>>b>>c;
A=min(a,b);B=min(b,c);
	ans=A+B;
　	cout << ans << endl;
	
}


Compiler output:
a.cc:12:1: error: extended character 　 is not valid in an identifier
   12 | 　      cout << ans << endl;
      | ^
a.cc: In function 'int main()':
a.cc:12:1: error: '\U00003000' was not declared in this scope
   12 | 　      cout << ans << endl;
      | ^~
Language: C++

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

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

  if (Q>=R && Q>=P) {
    cout << P+R << endl;
  }

  if (R>=P && R>=Q ) {
    cout << P+Q << endl;
  }

  if (P>=Q && P>=R) {
    cout << R+Q << endl;｝


Compiler output:
a.cc: In function 'int main()':
a.cc:17:25: error: '\U0000ff5d' was not declared in this scope
   17 |     cout << R+Q << endl;｝
      |                         ^~
a.cc:17:27: error: expected '}' at end of input
   17 |     cout << R+Q << endl;｝
      |                           ^
a.cc:16:21: note: to match this '{'
   16 |   if (P>=Q && P>=R) {
      |                     ^
a.cc:17:27: error: expected '}' at end of input
   17 |     cout << R+Q << endl;｝
      |                           ^
a.cc:4:12: note: to match this '{'
    4 | int main() {
      |            ^
Language: C++

#include "pch.h"
/////ここから下を提出///////////////////////////////////////////////////////////////
#include <iostream>
#include <vector>
#include <algorithm>
#include <fstream>
#include <string>
#include <math.h>
#include <cstdlib>
#include <istream>
#include <sstream>
#include <cctype>
using namespace std;

int main()
{
	int A,B,C,min;
	vector<int> ANS;
	cin >> A >> B >> C;
	
	ANS.push_back(A + B);
	ANS.push_back(A + C);
	ANS.push_back(C + B);
	ANS.push_back(A + C);
	ANS.push_back(C + A);
	ANS.push_back(B + A);

	sort(ANS.begin(), ANS.end());
	min = ANS.front();

	cout << min << endl;

}



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

#include <bits/stdc++.h>
using namespace std;
#include <iostream>
#include <vector>
#include <algorithm>
int main() {
	int a,b,c,A,B.ans;

	cin >> a>>b>>c;
A=min(a,b);B=min(b,c);
	ans=A+B;
　	cout << ans << endl;
	
}


Compiler output:
a.cc:12:1: error: extended character 　 is not valid in an identifier
   12 | 　      cout << ans << endl;
      | ^
a.cc: In function 'int main()':
a.cc:7:22: error: expected initializer before '.' token
    7 |         int a,b,c,A,B.ans;
      |                      ^
a.cc:10:12: error: 'B' was not declared in this scope
   10 | A=min(a,b);B=min(b,c);
      |            ^
a.cc:11:9: error: 'ans' was not declared in this scope; did you mean 'abs'?
   11 |         ans=A+B;
      |         ^~~
      |         abs
a.cc:12:1: error: '\U00003000' was not declared in this scope
   12 | 　      cout << ans << endl;
      | ^~
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  int a,b,c,a1,a2,c1;
  
  cin >> a >> b >> c;
  
  a1 = a + b;
  a2 = a + c;
  b1 = b + c;
  
  if(a1 > a2){
    if(a1 > b1){
      cout << a1 << endl;
    }
    else{
      cout << b1 << endl;
    }
  }
  else{
    if(a2 > b1){
      cout << a2 << endl;
    }
    else{
      cout << b1 << endl;
    }
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:3: error: 'b1' was not declared in this scope; did you mean 'c1'?
   11 |   b1 = b + c;
      |   ^~
      |   c1
Language: C++

/**
 * code generated by JHelper
 * More info: https://github.com/AlexeyDmitriev/JHelper
 * @author emli
 */


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

using namespace std;

class AAirplane {
public:
    void solve(std::istream& cin, std::ostream& cout) {
		ios::sync_with_stdio(false);
        cin.tie(nullptr);

        vector<vector<int>> a(3,vector<int>(3));
        vector<int> d(3);

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

        a[0][1] = a[1][0] = d[0];
        a[1][2] = a[2][1] = d[1];
        a[2][0] = a[0][2] = d[2];


        vector<int> p = {0,1,2};

        int ans = INT_MAX;
        do {
            int sum = 0;
            for(int i = 0; i < 2; i++){
                sum += a[p[i]][p[i + 1]];
            }
            ans = min(ans,sum);
        }while (next_permutation(p.begin(),p.end()));

        cout << ans << endl;
    }
};


int main() {
	AAirplane solver;
	std::istream& in(std::cin);
	std::ostream& out(std::cout);
	solver.solve(in, out);
	return 0;
}


Compiler output:
a.cc: In member function 'void AAirplane::solve(std::istream&, std::ostream&)':
a.cc:34:19: error: 'INT_MAX' was not declared in this scope
   34 |         int ans = INT_MAX;
      |                   ^~~~~~~
a.cc:11:1: note: 'INT_MAX' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>'
   10 | #include <algorithm>
  +++ |+#include <climits>
   11 |
Language: C++

#include<bits/std.h>
int main(void)
{
  using namespace std;
  int p,q,r;
  
  cin >> p >> q >> r;
  if(p+q<=r){
    cout << p+q <<endl;
  }
  else if(r+q<=p){
    cout << r+q <<endl;
  }
  else if(p+r<=q){
    cout << p+r << endl;
  }
  
  return 0;
}
    

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

public class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    int N = sc.nextInt();
    int M = sc.nextInt();
    int L = sc. nextInt();
    int[] ans= new int[3];

    ans[0] = N + M;
    ans[1] = M + L;
    ans[2] = L + N;

    int min = 999999999;
    for(int i = 0; i < 3; i++) {
    	min = Math.min(min, ans[i]);
    }
    System.out.println(min);
  }
}

Compiler output:
Main.java:3: error: cannot find symbol
    Scanner sc = new Scanner(System.in);
    ^
  symbol:   class Scanner
  location: class Main
Main.java:3: error: cannot find symbol
    Scanner sc = new Scanner(System.in);
                     ^
  symbol:   class Scanner
  location: class Main
2 errors
Language: C++

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

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

  if (Q>=R && Q>=P) {
    cout << P+R << endl;
  }

  if (R>=P && R>=Q ) {
    cout << P+Q << endl;
  }

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

Compiler output:
a.cc: In function 'int main()':
a.cc:17:25: error: expected '}' at end of input
   17 |     cout << R+Q << endl;
      |                         ^
a.cc:16:21: note: to match this '{'
   16 |   if (P>=Q && P>=R) {
      |                     ^
a.cc:17:25: error: expected '}' at end of input
   17 |     cout << R+Q << endl;
      |                         ^
a.cc:4:12: note: to match this '{'
    4 | int main() {
      |            ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
#include <iostream>
#include <vector>
#include <algorithm>
int main() {
	int a,b,c,A,B;

	cin >> a>>b>>c;
A=min(a,b);B=min(b,c);
	ans=A+B;
　	cout << ans << endl;
	
}

Compiler output:
a.cc:12:1: error: extended character 　 is not valid in an identifier
   12 | 　      cout << ans << endl;
      | ^
a.cc: In function 'int main()':
a.cc:11:9: error: 'ans' was not declared in this scope; did you mean 'abs'?
   11 |         ans=A+B;
      |         ^~~
      |         abs
a.cc:12:1: error: '\U00003000' was not declared in this scope
   12 | 　      cout << ans << endl;
      | ^~
Language: C

#include <stdio.h>
int main(){
  int ps[3];
  int i,j,s;
  scanf("%d %d %d",&ps[0],&ps[1],&ps[2]);
  for(i=0,i<2;++i){
    for(j=i+1;j<2;++j){
      if(ps[i]>ps[j]){
        s=ps[i];
        ps[i]=ps[j];
        ps[i]=s;
      }
    }
  }
  u=ps[0]+ps[1];
  printf("%d\n",u);
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:6:18: error: expected ';' before ')' token
    6 |   for(i=0,i<2;++i){
      |                  ^
      |                  ;
main.c:15:3: error: 'u' undeclared (first use in this function)
   15 |   u=ps[0]+ps[1];
      |   ^
main.c:15:3: note: each undeclared identifier is reported only once for each function it appears in
Language: C++

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

int main(){
  int p,q,r;
  
  cin >> p >> q >> r;
  
  int c1,c2,c3;
  int min1;
  c1=p+q;
  c2=q+r;
  c3=r+p;
  min1=min(c1,c2);
  min1=min(min,c3);
  cout << min1 << endl;
  return 0;
}
 

Compiler output:
a.cc: In function 'int main()':
a.cc:16:11: error: no matching function for call to 'min(<unresolved overloaded function type>, int&)'
   16 |   min1=min(min,c3);
      |        ~~~^~~~~~~~
In file included from /usr/include/c++/14/algorithm:60,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_algobase.h:233:5: note: candidate: 'constexpr const _Tp& std::min(const _Tp&, const _Tp&) [with _Tp = int]'
  233 |     min(const _Tp& __a, const _Tp& __b)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:233:20: note:   no known conversion for argument 1 from '<unresolved overloaded function type>' to 'const int&'
  233 |     min(const _Tp& __a, const _Tp& __b)
      |         ~~~~~~~~~~~^~~
/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, 2 provided
In file included from /usr/include/c++/14/algorithm:61:
/usr/include/c++/14/bits/stl_algo.h:5686:5: note: candidate: 'template<class _Tp> constexpr _Tp std::min(initializer_list<_Tp>)'
 5686 |     min(initializer_list<_Tp> __l)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5686:5: note:   candidate expects 1 argument, 2 provided
/usr/include/c++/14/bits/stl_algo.h:5696:5: note: candidate: 'template<class _Tp, class _Compare> constexpr _Tp std::min(initializer_list<_Tp>, _Compare)'
 5696 |     min(initializer_list<_Tp> __l, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5696:5: note:   template argument deduction/substitution failed:
a.cc:16:11: note:   couldn't deduce template parameter '_Tp'
   16 |   min1=min(min,c3);
      |        ~~~^~~~~~~~
Language: C++

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

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

  if (Q>=R && Q>=P) {
    cout << P+R << endl;
  }

  if (R>=P && R>=Q ) {
    cout << P+Q << endl;
  }

  if (P>=Q && P>=R) {
    cout << R+Q << endl;
  }


Compiler output:
a.cc: In function 'int main()':
a.cc:18:4: error: expected '}' at end of input
   18 |   }
      |    ^
a.cc:4:12: note: to match this '{'
    4 | int main() {
      |            ^
Language: C++

#include <stdio.h>
#include<vector>
#include<math.h>
#include<string>
#include<algorithm>

typedef long long ll;
typedef unsigned short int unsi;
typedef unsigned int uni;
typedef unsigned long int unli;

using namespace std;


int main(){
	int P, Q, R;
	int Ans;
	scanf("%d%d%d", P, Q, R);
	Ans = min(P + Q, Q + R, R + P);
	printf("%d",Ans);
}

Compiler output:
In file included from /usr/include/c++/14/vector:62,
                 from a.cc:2:
/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:19:11:   required from here
   19 |         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>
#include <math.h>
#include <algorithm>
#include<queue>
#include <bits/stdc++.h>


using namespace std;

#define FOR(i,a,b) for(int i=(a),i##formax=(b);i<i##formax;i++)

main(){
    int P, Q, R;
    int a, b;
    cin >> P >> Q >> R;
    a = min(P,Q);
    b = min(Q,R);
    c = min(P,R);
    if(a==b){cout << a + b << endl;}
    else{cout << b + c << endl;}
}

Compiler output:
a.cc:12:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
   12 | main(){
      | ^~~~
a.cc: In function 'int main()':
a.cc:18:5: error: 'c' was not declared in this scope
   18 |     c = min(P,R);
      |     ^
Language: C++

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

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


Compiler output:
a.cc: In function 'int main()':
a.cc:11:26: error: expected ')' before 'P'
   11 |   else if (Q+R<P+R && Q+R P+Q){
      |           ~              ^~
      |                          )
Language: C++

#include<iostream>
#include <math.h>
#include <algorithm>
#include<queue>
#include <bits/stdc++.h>


using namespace std;

#define FOR(i,a,b) for(int i=(a),i##formax=(b);i<i##formax;i++)

main(){
    int P, Q, R;
    int a, b;
    cin >> P >> Q >> R;
    a = min(P,Q);
    b = min(Q,R);
    c = min(P,R);
    if(a==b){cout << a + b << endl;}
    else{cout << b + c << endl}
}

Compiler output:
a.cc:12:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
   12 | main(){
      | ^~~~
a.cc: In function 'int main()':
a.cc:18:5: error: 'c' was not declared in this scope
   18 |     c = min(P,R);
      |     ^
Language: Java

import java.util.Scanner;
public class main {
	 public static void main(String args[]){
		 Scanner std = new Scanner(System.in);
		 int p = std.nextInt();
		 int q = std.nextInt();
		 int r = std.nextInt();
		 if(p<=q&&r<=q) {
			 System.out.println(p+r);
		 }
		 else if(q<=p&&r<=p) {
			 System.out.println(q+r);
		 }
		 else if(q<=r&&p<=r) {
			 System.out.println(q+p);
		 }
	 }
}


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

#include<iostream>
#include<vector>
#include<algorithm>
#include<string>
using namespace std;
int main()
{
  int p, q, r, a, b, c, ans;
  cin >> p >> q >> r;
  a=p+q;
  b=q+r;
  c=r+p;
  ans=({a, b, c});
    cout << ans;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:16: error: expected ';' before '}' token
   13 |   ans=({a, b, c});
      |                ^
      |                ;
Language: C++

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:16:10: error: 'min' cannot be used as a function
   16 |   min=min(c1,c2);
      |       ~~~^~~~~~~
a.cc:17:10: error: 'min' cannot be used as a function
   17 |   min=min(min,c3);
      |       ~~~^~~~~~~~
Language: C++

#include<stdio.h>
int main(void){
  int p,q,r,s;
  scanf("%d %d %d",&p,&q,&r);
  if(p+q>q+r){
    s = q+r;
  }
  else{
    s = p+q;
  }
  if(s>p+r){
    s=p+r;
  }
  peintf("%d\n",s);
}


Compiler output:
a.cc: In function 'int main()':
a.cc:14:3: error: 'peintf' was not declared in this scope; did you mean 'printf'?
   14 |   peintf("%d\n",s);
      |   ^~~~~~
      |   printf
Language: C++

#include<stdio.h>
int main(void){
  int p,q,r,s;
  scanf("%d %d %d",&p,&q,&r);
  if(p+q>q+r){
    s = q+r;
  }
  else{
    s = p+q;
  }
  if(s>p+r){
    s=p+r
  }
  peintf("%d\n",s);
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:10: error: expected ';' before '}' token
   12 |     s=p+r
      |          ^
      |          ;
   13 |   }
      |   ~       
a.cc:14:3: error: 'peintf' was not declared in this scope; did you mean 'printf'?
   14 |   peintf("%d\n",s);
      |   ^~~~~~
      |   printf
Language: C++

#include<bits/stdc++.h>
using namespace std;
//define
#define int long long
#define rep(x,y) for(int i=x;i<y;i++)
#define REP(x,y) for(int j=x;j<y;j++)
#define Rep(x,y) for(int k=x;k<y;k++)
#define str string
#define pb() push_back()
#define all(x) x.begin(),x.end()
#define elif else if
#define mod 100000007
//vectordefine
#define vint vector<int>
#define vvint vector<vector<int>>
#define vc vector<char>
#define vvc vector<vector<char>>
#define vool vector<bool>
#define vtr vector<str>
#define vvtr vector<vector<str>>
//queuedefine
#define qint queue<int>
#define qtr queue<string>
#define qc queue<char>
//pairdefine
#define pint pair<int,int>
#define pic pair<int,char>
#define pci pair<char,int>
#define pis pair<int,str>
#define psi pair<str,int>
#define pcc pair<char,char>
#define pss pair<str,str>
#define mp make_pair
//mapdefine
#define mint map<int,int>
#define mic map<int,char>
#define mci map<char,int>
#define mis map<int,str>
#define msi map<str,int>
//function
str shizuku(char,char);
//UnionFind
struct UnionFind{
  vint par;
  UnionFind(int N):par(N){
    rep(0,N)par[i]=i;
  }
  int root(int x){
    if(par[x]==x)return x;
    return par[x]=root(par[x]);
  }
  void unite(int x,int y){
    int rx=root(x);
    int ry=root(y);
    if(rx==ry)return;
    par[rx]=ry;
  }
  bool same(int x,int y){
    return root(x)==root(y);
  }
};
//binary_search

//main
signed main(){
    int M,X,count=0,count2=0;
    double d,D;
    int alph='A'-'a';
    char op,Ch;
    str S,T;
    vint N[i];
    rep(0,3)cin>>N[i];
    sort(all(N));
    cout<<N[0]+N[1]<<endl;
    
}


Compiler output:
a.cc: In function 'int main()':
a.cc:71:12: error: 'i' was not declared in this scope
   71 |     vint N[i];
      |            ^
a.cc:72:18: error: 'N' was not declared in this scope
   72 |     rep(0,3)cin>>N[i];
      |                  ^
a.cc:73:14: error: 'N' was not declared in this scope
   73 |     sort(all(N));
      |              ^
a.cc:10:16: note: in definition of macro 'all'
   10 | #define all(x) x.begin(),x.end()
      |                ^
Language: C++

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:15:10: error: 'min' cannot be used as a function
   15 |   min=min(c1,c2);
      |       ~~~^~~~~~~
a.cc:16:10: error: 'min' cannot be used as a function
   16 |   min=min(min,c3);
      |       ~~~^~~~~~~~
Language: C++

import sys
INPUT = sys.stdin.readline

def SINGLE_INT(): return int(INPUT())
def MULTIPLE_INT_LIST(): return list(map(int, INPUT().split()))
def MULTIPLE_INT_MAP(): return map(int, INPUT().split())
def SINGLE_STRING(): return INPUT()
def MULTIPLE_STRING(): return INPUT().split()

arr = MULTIPLE_INT_LIST()
arr.sort()

print(sum(arr[:2]))

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

#include <iostream>
#include <algorithm>
#include <vector>
#include <string>
#include <map>
#include <utility>
#include <stack>
#include <queue>
typedef long long ll;
using namespace std;

int main(){
    int a,b,c;
    cin a>>b>>c;
    int ans[3];
    ans[0]=a+b;
    ans[1]=b+c;
    ans[2]=c+a;
    int max=0;
    for(int i=0;i<3;i++){
        if(ans[i]>max){
            max=ans[i];
        }
    }
    cout << max << endl;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:8: error: expected ';' before 'a'
   14 |     cin a>>b>>c;
      |        ^~
      |        ;
Language: C++

#include <stdio.h>
#include<vector>
#include<math.h>
#include<string>
#include<algorithm>

typedef long long ll;
typedef unsigned short int unsi;
typedef unsigned int uni;
typedef unsigned long int unli;

using namespace std;

unsi gojoho(unsi A, unsi B) {
	unsi R = 1;
	if (A > B) {
		while (R!=0) {
			R = A % B;
			A = B;
			B = R;
		}
		return A;
	} else {
		while (R != 0) {
			R = B % A;
			B = A;
			A = R;
		}
		return B;
	}
}

uni gojoho(uni A, uni B) {
	uni R = 1;
	if (A > B) {
		while (R != 0) {
			R = A % B;
			A = B;
			B = R;
		}
		return A;
	} else {
		while (R != 0) {
			R = B % A;
			B = A;
			A = R;
		}
		return B;
	}
}

unli gojoho(unli A, unli B) {
	unli R = 1;
	if (A > B) {
		while (R != 0) {
			R = A % B;
			A = B;
			B = R;
		}
		return A;
	} else {
		while (R != 0) {
			R = B % A;
			B = A;
			A = R;
		}
		return B;
	}
}

int gojoho(int A, int B) {
	int R = 1;
	if (A > B) {
		while (R != 0) {
			R = A % B;
			A = B;
			B = R;
		}
		return A;
	} else {
		while (R != 0) {
			R = B % A;
			B = A;
			A = R;
		}
		return B;
	}
}



int main(){
	int P, Q, R;
	scanf("%d%d%d", P, Q, R);
	printf("%d",min(P + Q, Q + R, R + P));
}





// プログラムの実行: Ctrl + F5 または [デバッグ] > [デバッグなしで開始] メニュー
// プログラムのデバッグ: F5 または [デバッグ] > [デバッグの開始] メニュー

// 作業を開始するためのヒント: 
//    1. ソリューション エクスプローラー ウィンドウを使用してファイルを追加/管理します 
//   2. チーム エクスプローラー ウィンドウを使用してソース管理に接続します
//   3. 出力ウィンドウを使用して、ビルド出力とその他のメッセージを表示します
//   4. エラー一覧ウィンドウを使用してエラーを表示します
//   5. [プロジェクト] > [新しい項目の追加] と移動して新しいコード ファイルを作成するか、[プロジェクト] > [既存の項目の追加] と移動して既存のコード ファイルをプロジェクトに追加します
//   6. 後ほどこのプロジェクトを再び開く場合、[ファイル] > [開く] > [プロジェクト] と移動して .sln ファイルを選択します


Compiler output:
In file included from /usr/include/c++/14/vector:62,
                 from a.cc:2:
/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:95:17:   required from here
   95 |         printf("%d",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 <stdio.h>

int main(void) {
  int p,q,r;
  scanf("%d%d%d",&p,&q,&r);
  if(p+q < p+r && p+q < q+r) {
    printf("%d\n",p+q);
  }else if(p+r < p+q && p+r < q+r) {
    printf("%d\n",p+r);
  }else if(q+r < p+q && q+r < p+r) {
    printf("%d\n",q+r);
  }
  return 0;

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

#include<iostream>
#include <math.h>
#include <algorithm>
#include<queue>
#include <bits/stdc++.h>


using namespace std;

#define FOR(i,a,b) for(int i=(a),i##formax=(b);i<i##formax;i++)

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

Compiler output:
a.cc:12:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
   12 | main(){
      | ^~~~
a.cc: In function 'int main()':
a.cc:15:5: error: 'a' was not declared in this scope
   15 |     a = min(P,Q);
      |     ^
a.cc:16:5: error: 'b' was not declared in this scope
   16 |     b = min(Q,R);
      |     ^
Language: C++

#include<cstdio>
#include<algorithm>

using namespace std;

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

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

    printf("%d\n", p + q + r - max(p, max(q, r));

    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:49: error: expected ')' before ';' token
   11 |     printf("%d\n", p + q + r - max(p, max(q, r));
      |           ~                                     ^
      |                                                 )
Language: C++

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

const int mod=1e9+7;

signed main(){
    vector<int> air(3);
    rep(i,3)cin >> air[i];
    sort(all(air))
    int ans=0;
    ans=air[1]+air[0];
    cout << ans << endl;
}



Compiler output:
a.cc: In function 'int main()':
a.cc:11:19: error: expected ';' before 'int'
   11 |     sort(all(air))
      |                   ^
      |                   ;
   12 |     int ans=0;
      |     ~~~            
a.cc:13:5: error: 'ans' was not declared in this scope; did you mean 'abs'?
   13 |     ans=air[1]+air[0];
      |     ^~~
      |     abs
Language: C++

#include<bits/stdc++.h>

using namespace std;

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

Compiler output:
a.cc: In function 'int main()':
a.cc:15:10: error: 'min' cannot be used as a function
   15 |   min=min(c1,c2);
      |       ~~~^~~~~~~
a.cc:16:10: error: 'min' cannot be used as a function
   16 |   min=min(min,c3);
      |       ~~~^~~~~~~~
Language: C

#include <stdio.h>

int main(void){
	int a,sum=0,max=0;
	for(int i=0;i<3;i++){
		scanf("%d",&a);
		if(max<a) max=a;
		sum+=a;
	}
	print("%d\n",sum-max);
}


Compiler output:
main.c: In function 'main':
main.c:10:9: error: implicit declaration of function 'print'; did you mean 'printf'? [-Wimplicit-function-declaration]
   10 |         print("%d\n",sum-max);
      |         ^~~~~
      |         printf
Language: C

#include<stdio.h>

int main(){
  int a[3];
  int i,j;
  int tmp;
  scanf("%d%d%d",&p,&q,&r);
  for (i=0; i<3; ++i) {
  for (j=i+1; j<3; ++j) {
    if (a[i] > a[j]) {
      tmp =  a[i];
      a[i] = a[j];
      a[j] = tmp;
    }
  }
}

  printf("%d",a[0]+a[1]);


  return 0;
}


Compiler output:
main.c: In function 'main':
main.c:7:19: error: 'p' undeclared (first use in this function)
    7 |   scanf("%d%d%d",&p,&q,&r);
      |                   ^
main.c:7:19: note: each undeclared identifier is reported only once for each function it appears in
main.c:7:22: error: 'q' undeclared (first use in this function)
    7 |   scanf("%d%d%d",&p,&q,&r);
      |                      ^
main.c:7:25: error: 'r' undeclared (first use in this function)
    7 |   scanf("%d%d%d",&p,&q,&r);
      |                         ^
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:8:22: error: no matching function for call to 'min(int)'
    8 |         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: candidate: 'template<class _Tp> constexpr const _Tp& std::min(const _Tp&, const _Tp&)'
  233 |     min(const _Tp& __a, const _Tp& __b)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:233:5: note:   candidate expects 2 arguments, 1 provided
/usr/include/c++/14/bits/stl_algobase.h:281:5: note: candidate: 'template<class _Tp, class _Compare> constexpr const _Tp& std::min(const _Tp&, const _Tp&, _Compare)'
  281 |     min(const _Tp& __a, const _Tp& __b, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:281:5: note:   candidate expects 3 arguments, 1 provided
In file included from /usr/include/c++/14/algorithm:61:
/usr/include/c++/14/bits/stl_algo.h:5686:5: note: candidate: 'template<class _Tp> constexpr _Tp std::min(initializer_list<_Tp>)'
 5686 |     min(initializer_list<_Tp> __l)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5686:5: note:   template argument deduction/substitution failed:
a.cc:8:22: note:   mismatched types 'std::initializer_list<_Tp>' and 'int'
    8 |         cout<<min(min(a+b),(b+c),(c+a))<<endl;
      |                   ~~~^~~~~
/usr/include/c++/14/bits/stl_algo.h:5696:5: note: candidate: 'template<class _Tp, class _Compare> constexpr _Tp std::min(initializer_list<_Tp>, _Compare)'
 5696 |     min(initializer_list<_Tp> __l, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5696:5: note:   candidate expects 2 arguments, 1 provided
Language: C++

#include<bits/stdc++.h+>

using namespace std;

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

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

import java.util.*;

class Airplane {
    public static void main(String[] args){
        Scanner scn = new Scanner(System.in);
        int P = scn.nextInt();
        int Q = scn.nextInt();
        int R = scn.nextInt();
        int sum = P + Q + R;
        System.out.println(sum - min(P, min(Q, R)));   
      	scn.close();
    }
}

Compiler output:
Main.java:10: error: cannot find symbol
        System.out.println(sum - min(P, min(Q, R)));   
                                        ^
  symbol:   method min(int,int)
  location: class Airplane
1 error
Language: C++

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

int main() {
  int P,Q,R;
  cin >> P >> Q >> R;
  if (P+R<Q+P){
    int ans = P+R;
  }
  else if (Q+R<P+R){
    int ans = Q+R
  }
  else if (P+Q<Q+R){
    int ans = P+Q;
  }
  cout << ans << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:12:3: error: expected ',' or ';' before '}' token
   12 |   }
      |   ^
a.cc:16:11: error: 'ans' was not declared in this scope; did you mean 'abs'?
   16 |   cout << ans << endl;
      |           ^~~
      |           abs
Language: C++

#include<iostream>
#include <math.h>
#include <algorithm>
#include<queue>
#include <bits/stdc++.h>


using namespace std;

#define FOR(i,a,b) for(int i=(a),i##formax=(b);i<i##formax;i++)

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

Compiler output:
a.cc:12:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
   12 | main(){
      | ^~~~
a.cc: In function 'int main()':
a.cc:15:5: error: 'a' was not declared in this scope
   15 |     a = min(P,Q);
      |     ^
a.cc:16:5: error: 'b' was not declared in this scope
   16 |     b = min(Q,R);
      |     ^
Language: C++

#include <iostream>
using namespace std;
int main(){
int p,q r,ans;
cin>>p>>q>>r;
int max = p;
if(max<q){
  max = q;
}
if(max<r){
  max = r;
}
  ans = p + q + r - max;
  cout<<ans<<endl;
  return 0;
}



Compiler output:
a.cc: In function 'int main()':
a.cc:4:9: error: expected initializer before 'r'
    4 | int p,q r,ans;
      |         ^
a.cc:5:9: error: 'q' was not declared in this scope
    5 | cin>>p>>q>>r;
      |         ^
a.cc:5:12: error: 'r' was not declared in this scope
    5 | cin>>p>>q>>r;
      |            ^
a.cc:13:3: error: 'ans' was not declared in this scope; did you mean 'abs'?
   13 |   ans = p + q + r - max;
      |   ^~~
      |   abs
Language: C++

#include<cstdio>
#include<algorithm>

using namespace std;

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

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

    printf("%d\n", p + q + r - max(p, q, r));

    return 0;
}

Compiler output:
In file included from /usr/include/c++/14/algorithm:60,
                 from a.cc:2:
/usr/include/c++/14/bits/stl_algobase.h: In instantiation of 'constexpr const _Tp& std::max(const _Tp&, const _Tp&, _Compare) [with _Tp = int; _Compare = int]':
a.cc:11:35:   required from here
   11 |     printf("%d\n", p + q + r - max(p, q, r));
      |                                ~~~^~~~~~~~~
/usr/include/c++/14/bits/stl_algobase.h:306:17: error: '__comp' cannot be used as a function
  306 |       if (__comp(__a, __b))
      |           ~~~~~~^~~~~~~~~~
Language: C++

#include <iostream>
using namespace std;
int main(){
int p,q r,ans;
cin>>p>>q>>r;
int max = p;
if(max<q){
  max = q;
}
if(max<r){
  max = r;
}
  ans = p + q + r - max;
  cout<<ans<<endl;
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:4:9: error: expected initializer before 'r'
    4 | int p,q r,ans;
      |         ^
a.cc:5:9: error: 'q' was not declared in this scope
    5 | cin>>p>>q>>r;
      |         ^
a.cc:5:12: error: 'r' was not declared in this scope
    5 | cin>>p>>q>>r;
      |            ^
a.cc:13:3: error: 'ans' was not declared in this scope; did you mean 'abs'?
   13 |   ans = p + q + r - max;
      |   ^~~
      |   abs
Language: C++

#include <iostream>
using namespace std;

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

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

import java.util.*;

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[] hoge = {p, q, r};
      	Array.sort(hoge);
      	System.out.println(hoge[0] + hoge[1]);
    }
}

Compiler output:
Main.java:11: error: cannot find symbol
      	Array.sort(hoge);
      	^
  symbol:   variable Array
  location: class Main
1 error
Language: C++

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

const int mod=1e9+7;

signed main(){
    vector<int> air(3);
    rep(i,3)cin >> air[i];
    sort(all(air))
    int ans=0;
    ans=air[1]+air[0];
    cout << ans << endl;
}



Compiler output:
a.cc: In function 'int main()':
a.cc:9:9: error: 'i' was not declared in this scope
    9 |     rep(i,3)cin >> air[i];
      |         ^
a.cc:9:5: error: 'rep' was not declared in this scope
    9 |     rep(i,3)cin >> air[i];
      |     ^~~
a.cc:10:10: error: 'all' was not declared in this scope; did you mean 'std::filesystem::perms::all'?
   10 |     sort(all(air))
      |          ^~~
      |          std::filesystem::perms::all
In file included from /usr/include/c++/14/filesystem:51,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:200,
                 from a.cc:1:
/usr/include/c++/14/bits/fs_fwd.h:158:7: note: 'std::filesystem::perms::all' declared here
  158 |       all               =  0777,
      |       ^~~
a.cc:12:5: error: 'ans' was not declared in this scope; did you mean 'abs'?
   12 |     ans=air[1]+air[0];
      |     ^~~
      |     abs
Language: C++

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



int main(void) {

	int P, Q, R, ans;
	cin >> P >> Q >> R;

	ans = P + Q + R;
	
	cout << ans - 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 = int; _Compare = int]':
a.cc:13:19:   required from here
   13 |         cout << ans - 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;
  if(p+q > q+r)
    t = q + r;
  else
    t = p + q;
  
  cout << t << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:5: error: 't' was not declared in this scope
    8 |     t = q + r;
      |     ^
a.cc:10:5: error: 't' was not declared in this scope
   10 |     t = p + q;
      |     ^
a.cc:12:11: error: 't' was not declared in this scope
   12 |   cout << t << endl;
      |           ^
Language: C++

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

Compiler output:
a.cc:1:1: error: 'include' does not name a type
    1 | include<iostream>
      | ^~~~~~~
a.cc: In function 'int main()':
a.cc:4:13: error: 'cin' was not declared in this scope
    4 |   int a,b,c;cin>>a>>b>>c;
      |             ^~~
a.cc:5:17: error: 'cout' was not declared in this scope
    5 |   if(a>=b&&b>=c)cout<<c+b;
      |                 ^~~~
a.cc:6:22: error: 'cout' was not declared in this scope
    6 |   else if(b>=a&&a>=c)cout<<a+c;
      |                      ^~~~
a.cc:7:8: error: 'cout' was not declared in this scope
    7 |   else cout<<a+b;
      |        ^~~~
Language: C++

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

int main(){
  
  int p,q,r;
  cin>>p>>q>>r;
  
  int res  =  max(p+q,max(q+r,r+p));
  cout<<res;
  return 0;
}

Compiler output:
a.cc:1:2: error: invalid preprocessing directive #nclude; did you mean #include?
    1 | #nclude<bits/stdc++.h>
      |  ^~~~~~
      |  include
a.cc: In function 'int main()':
a.cc:7:3: error: 'cin' was not declared in this scope
    7 |   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 | #nclude<bits/stdc++.h>
a.cc:9:23: error: 'max' was not declared in this scope
    9 |   int res  =  max(p+q,max(q+r,r+p));
      |                       ^~~
a.cc:9:15: error: 'max' was not declared in this scope
    9 |   int res  =  max(p+q,max(q+r,r+p));
      |               ^~~
a.cc:10:3: error: 'cout' was not declared in this scope
   10 |   cout<<res;
      |   ^~~~
a.cc:10:3: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
Language: C++

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

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

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

#include <bits/stdc++.h>

#define NMAX 1000

#define MAX(a, b) (a > b ? a : b)

using namespace std;

ifstream fin("f.in");
ofstream fout("f.out");

int p, q, r;

int main()
{
    cin >> p >> q >> r;
    int maxim = MAX(MAX(p, q), r)
    cout << p + q + r - maxim << '\n';
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:18:5: error: expected ',' or ';' before 'cout'
   18 |     cout << p + q + r - maxim << '\n';
      |     ^~~~
Language: C++

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:7:18: error: 'n' was not declared in this scope
    7 |         sort(p,p+n);
      |                  ^
Language: C++

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

signed main() {
  int p, q, r; cin >> p >> q >> r;
  int madt;
  maxt = max({p, q, r});

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

  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:8:3: error: 'maxt' was not declared in this scope; did you mean 'madt'?
    8 |   maxt = max({p, q, r});
      |   ^~~~
      |   madt
Language: C

#include <bits/stdc++.h>
using namespace std;
int main(void){
    // Your code here!
    int p,q,r;
    cin>>p>>q>>r;
    int min=p+q;
    if(min>p+r) min=p+r;
    if(min>q+r) min=q+r;
    cout<<min;
}


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

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

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

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

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


Compiler output:
a.cc:1:1: error: 'import' does not name a type
    1 | import java.util.Arrays;
      | ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:2:1: error: 'import' does not name a type
    2 | import java.util.Scanner;
      | ^~~~~~
a.cc:2:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:4:1: error: expected unqualified-id before 'public'
    4 | public class Main {
      | ^~~~~~
Language: C++

#define _USE_MATH_DEFINES
#include<bits/stdc++.h>
#define int long long
#define rep(i,n) for(int i=0;i<n;i++)
#define Rep(i,a,b) for(int i=0;i<b;i++)
#define REP(i,a,b) for(int i=0;i<=b;i++)
#define rev(i,n) for(int i=n-1;i>=0;i--)
#define vi vector<int>
#define vvi vector<vi>
#define pb push_back
#define pi pair<int,int>
#define vp vector<pair<int,int>>
#define mp make_pair
#define all(v) (v).begin(),(v).end()
#define fi first
#define se second
#define MEMSET(a) memset(a,0,sizeof(a))
#define inf (1ll<<60)
#define Yes(f) cout <<(f?"Yes":"No")<<endl//fが真の場合Yesを出力、偽の場合Noを出力
#define yes(f) cout <<(f?"yes":"no")<<endl
#define YES(f) cout <<(f?"YES":"NO")<<endl
#define SORT(v) sort(all(v))
#define RSORT(v) sort(all(v),greater<int>())

using namespace std;

const int mod=1e9+7;

signed main(){
    vi air(3);
    rep(i,3)cin >> air[i];
    sort(all(air))
    int ans=0;
    ans=air[1]+air[0];
    cout << ans << endl;
    
}



Compiler output:
a.cc: In function 'int main()':
a.cc:32:19: error: expected ';' before 'long'
   32 |     sort(all(air))
      |                   ^
      |                   ;
a.cc:34:5: error: 'ans' was not declared in this scope; did you mean 'abs'?
   34 |     ans=air[1]+air[0];
      |     ^~~
      |     abs
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
#define ff first
#define ss second
#define mp(a,b) make_pair(a,b)
#define pb(a) push_back(a)
#define boost ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0)
#define check(x) cout << #x << " : " << (x) << endl
#define all(v) v.begin(),v.end() 
#define allr(v) v.rbegin(),v.rend() 
//#define endl '\n'  
typedef  long long ll; 
typedef  unsigned long long ull; 
typedef vector< ll > edge; 
typedef pair< ll , ll > mypair;
typedef priority_queue <ll> max_heap;
typedef priority_queue <ll, vector<ll>, greater<ll> > min_heap;
const ll mod=1e9+7;
const ll inf=1e15+10;
const ll N=1e6+10;

int main()
{
	boost;
	int a[3]
	for(auto &i:a) cin>>i;
	sort(a,a+3);
	cout<<a[0]+a[1];	
  	return 0;
}  

Compiler output:
a.cc: In function 'int main()':
a.cc:27:9: error: expected initializer before 'for'
   27 |         for(auto &i:a) cin>>i;
      |         ^~~
a.cc:28:14: error: 'a' was not declared in this scope
   28 |         sort(a,a+3);
      |              ^
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:7:17: error: 'cn' was not declared in this scope; did you mean 'yn'?
    7 |                 cn>>a[i];
      |                 ^~
      |                 yn
a.cc:8:18: error: 'n' was not declared in this scope
    8 |         sort(a,a+n);
      |                  ^
Language: C++

#include <bits/stdc++.h> 

using namespace std;
using ll=long long;
using ull=unsigned long long;
using pii=pair<int,int>;

#define INF LONG_MAX
#define MOD 1000000007
#define rng(a) a.begin(),a.end()
#define rrng(a) a.end(),a.begin()

int main(){
  ios::sync_with_stdio(false);
  cin.tie(0);

  int P,Q,R;
  cin>>P>>Q>>R;
  int ans=0;
  if(R<P+Q){
    ans+=R;
    ans+=min(P,Q);
  }
  else{
    ans+=P+Q;
  }
  cout<<ans<<endl;
  return 0;
}
jj:

Compiler output:
a.cc:30:1: error: 'jj' does not name a type
   30 | jj:
      | ^~
Language: C++

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

int main() {
  vector<int> v(3);
  cin >> v[0] >> v[1] >> v[2];
  sort(v.begin(), v.end());
  cout << v[0] + v[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(v.begin(), v.end());
      |   ^~~~
      |   short