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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:6:3: error: expected initializer before 'vector'
    6 |   vector<int> vec(3)
      |   ^~~~~~
a.cc:10:8: error: 'vec' was not declared in this scope
   10 |   sort(vec.begin(),vec.end());
      |        ^~~
Language: C++

#include <iostream>
#include <string>
#include <cmath>
#include <vector>
#include <algorithm>
#include <map>

using namespace std;

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


Compiler output:
In file included from /usr/include/c++/14/string:51,
                 from /usr/include/c++/14/bits/locale_classes.h:40,
                 from /usr/include/c++/14/bits/ios_base.h:41,
                 from /usr/include/c++/14/ios:44,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_algobase.h: In instantiation of 'constexpr const _Tp& std::min(const _Tp&, const _Tp&, _Compare) [with _Tp = int; _Compare = int]':
a.cc:14:16:   required from here
   14 |     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++

#define _CRT_SECURE_NO_WARNINGS
#include <stdio.h>
#include <string.h>


void main(void)
{
	int a = 0,b = 0,c = 0,d = 0,e = 0,f = 0;

	int min;

	int P = 0, Q = 0, R = 0;

	scanf("%d %d %d", &P, &Q, &R);

	a = P + Q;
	b = P + R;
	c = Q + P;
	d = Q + R;
	e = R + P;
	f = R + Q;

	min = 101;
	if (a < min) {
		min = a;
	}
	if (b < min) {
		min = b;
	}
	if (c < min) {
		min = c;
	}
	if (d < min) {
		min = d;
	}
	if (e < min) {
		min = e;
	}
	if (f < min) {
		min = f;
	}

	printf("%d" ,min);
}

Compiler output:
a.cc:6:1: error: '::main' must return 'int'
    6 | void main(void)
      | ^~~~
Language: C++

#define _CRT_SECURE_NO_WARNINGS
#include <stdio.h>
#include "stdafx.h"

int main()
{
	int a[3],b,c;
	scanf("%d %d %d", &a[0],&a[1],&a[2]);
	b = 0;
	c = 0;
	for (int i = 0; i < 3; i++) {
		if (b < a[i]) {
			b = a[i];
			c = i;
		}
	}
	b = 0;
	for (int i = 0; i < 3; i++) {
		if (i != c)
			b += a[i];
	}
}



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

#include"bits/stdc++.h"
using namespace std;
int main(){
  int A,B,C;
  cin >> A >> B >> C;
  if(A+B<B+C&&A+B<C+A){
    cout<<A+B<<endl;}
  else if(B+C<A+B&&B+C<A+C){
    cout<<B+C<<endl;}
  else(A+C<A+B&&A+C<B+C){
    cout<<A+C<<endl;}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:25: error: expected ';' before '{' token
   10 |   else(A+C<A+B&&A+C<B+C){
      |                         ^
      |                         ;
Language: C

include <stdio.h>
 
int main(){
  int a[3],i,max,sum;
  
  for(i=0;i<3;i++) scanf("%d",&a[i]);
  max =a[i];
  for(i=0;i<2;i++){
    if(a[i+1]>max) max = a[i+1];
  }
  for(i=0;i<3;i++) sum+= a[i];
  printf("%d",sum-max);
  
  return 0;
  
}

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

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

int main() {
  
int P,Q,R;
  cin >>P>>Q>>R;
  vector<int> vec;
  vec ={R+Q,P+Q,P+R};
  
  if(vec.at(0)<vec.at(1) && vec.at(0)<vec.at(2)){
    cout << vec.at(0) <<endl;}
  if(vec.at(1)<vec.at(0) && vec.at(1)<vec.at(2)){
    cout <<vec.at(1) <<endl;}
  else{
    cout << vec.at(2) <<endl;}
  
}
     
  
  
  
}


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

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

int main() {
  
int P,Q,R;
  cin >>P>>Q>>R;
  vector<int> vec;
  vec ={R+Q;P+Q;P+R};
  
  if(vec.at(0)<vec.at(1) && vec.at(0)<vec.at(2)){
    cout << vec.at(0) <<endl;}
  if(vec.at(1)<vec.at(0) && vec,at(1)<vec.at(2)){
    cout <<vec.at(1) <<endl;}
  else{
    cout << vec.at(2) <<endl;}
  
}
     
  
  
  
}


Compiler output:
a.cc: In function 'int main()':
a.cc:9:12: error: expected '}' before ';' token
    9 |   vec ={R+Q;P+Q;P+R};
      |        ~   ^
a.cc:9:20: error: expected ';' before '}' token
    9 |   vec ={R+Q;P+Q;P+R};
      |                    ^
      |                    ;
a.cc: At global scope:
a.cc:11:3: error: expected unqualified-id before 'if'
   11 |   if(vec.at(0)<vec.at(1) && vec.at(0)<vec.at(2)){
      |   ^~
a.cc:13:3: error: expected unqualified-id before 'if'
   13 |   if(vec.at(1)<vec.at(0) && vec,at(1)<vec.at(2)){
      |   ^~
a.cc:15:3: error: expected unqualified-id before 'else'
   15 |   else{
      |   ^~~~
a.cc:18:1: error: expected declaration before '}' token
   18 | }
      | ^
a.cc:23:1: error: expected declaration before '}' token
   23 | }
      | ^
Language: C++

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

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


Compiler output:
a.cc: In function 'int main()':
a.cc:8:7: error: redeclaration of 'int ans'
    8 |   int ans = max(ans,a+c);
      |       ^~~
a.cc:7:7: note: 'int ans' previously declared here
    7 |   int ans = max(a+b,b+c);
      |       ^~~
Language: C++

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

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


Compiler output:
a.cc: In function 'int main()':
a.cc:8:7: error: redeclaration of 'int ans'
    8 |   int ans = max(max,a+c);
      |       ^~~
a.cc:7:7: note: 'int ans' previously declared here
    7 |   int ans = max(a+b,b+c);
      |       ^~~
a.cc:8:16: error: no matching function for call to 'max(<unresolved overloaded function type>, int)'
    8 |   int ans = max(max,a+c);
      |             ~~~^~~~~~~~~
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: 'constexpr const _Tp& std::max(const _Tp&, const _Tp&) [with _Tp = int]'
  257 |     max(const _Tp& __a, const _Tp& __b)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:257:20: note:   no known conversion for argument 1 from '<unresolved overloaded function type>' to 'const int&'
  257 |     max(const _Tp& __a, const _Tp& __b)
      |         ~~~~~~~~~~~^~~
/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, 2 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:   candidate expects 1 argument, 2 provided
/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:   template argument deduction/substitution failed:
a.cc:8:16: note:   couldn't deduce template parameter '_Tp'
    8 |   int ans = max(max,a+c);
      |             ~~~^~~~~~~~~
Language: C++

#include <bits/stdc++.h>

using namespace std;

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

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

#include <iostream>
#include <iomanip>
#include <vector>
#include <algorithm>
#include <numeric>
#include <functional>
#include <cmath>
#include <queue>
#include <stack>
#include <cstdio>
 
#define repd(i,a,b) for (int i=(a);i<(b);i++)
#define rep(i,n) repd(i,0,n)
typedef long long ll;
 
using namespace std;
 
 
int inputValue(){
    int a;
    cin >> a;
    return a;
};
 
void inputArray(int * p, int a){
    rep(i, a){
        cin >> p[i];
    }
};
 
void inputVector(vector<int> * p, int a){
    rep(i, a){
        int input;
        cin >> input;
        p -> push_back(input);
    }
}
 
template <typename T>
void output(T a, int precision) {
    if(precision > 0){
        cout << setprecision(precision)  << a << "\n";
    }
    else{
        cout << a << "\n";
    }
}
 
int main(int argc, const char * argv[]) {
    int a[3];
    scanf("%d %d %d",a[0],a[1],a[2]);
	int max=0;
  	Rep(int i,3){
    	if(max < a[i]){
        	max = a[i];
        }	
    }
  
  	printf("%d\n",a[0]+a[1]+a[2] - max);
    
    return 0;
}

Compiler output:
a.cc: In function 'int main(int, const char**)':
a.cc:53:13: error: expected primary-expression before 'int'
   53 |         Rep(int i,3){
      |             ^~~
a.cc:53:9: error: 'Rep' was not declared in this scope; did you mean 'rep'?
   53 |         Rep(int i,3){
      |         ^~~
      |         rep
Language: C++

#include <iostream>
#include <iomanip>
#include <vector>
#include <algorithm>
#include <numeric>
#include <functional>
#include <cmath>
#include <queue>
#include <stack>
#include <cstdio>

#define repd(i,a,b) for (int i=(a);i<(b);i++)
#define rep(i,n) repd(i,0,n)
typedef long long ll;

using namespace std;


int inputValue(){
    int a;
    cin >> a;
    return a;
};

void inputArray(int * p, int a){
    rep(i, a){
        cin >> p[i];
    }
};

void inputVector(vector<int> * p, int a){
    rep(i, a){
        int input;
        cin >> input;
        p -> push_back(input);
    }
}

template <typename T>
void output(T a, int precision) {
    if(precision > 0){
        cout << setprecision(precision)  << a << "\n";
    }
    else{
        cout << a << "\n";
    }
}

int main(int argc, const char * argv[]) {
    int a[3];
    scanf("%d %d %fd",a[0],a[1],a[2]);
	int max=0;
  	Rep(int i,3){
    	if(max < a[i]){
        	max = a[i];
        }	
    }
  
  	printf("%d\n",a[0]+a[1]+a[2] - max);
    
    return 0;
}

Compiler output:
a.cc: In function 'int main(int, const char**)':
a.cc:53:13: error: expected primary-expression before 'int'
   53 |         Rep(int i,3){
      |             ^~~
a.cc:53:9: error: 'Rep' was not declared in this scope; did you mean 'rep'?
   53 |         Rep(int i,3){
      |         ^~~
      |         rep
Language: C++

#include <bits/stdc++.h>
#define ll long long int
#define cases int t; cin >> t; while (t--)
#define fir for (ll i = 0; i < n; i++) 
using namespace std;

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

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

#include <iostream>
#include <algorithm>

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


Compiler output:
a.cc: In function 'int main()':
a.cc:7:25: error: 'min' was not declared in this scope; did you mean 'std::min'?
    7 |   std::cout << min(a+b, min(b+c, a+c)) << 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)
      |     ^~~
a.cc:7:16: error: 'min' was not declared in this scope; did you mean 'std::min'?
    7 |   std::cout << min(a+b, min(b+c, a+c)) << std::endl;
      |                ^~~
      |                std::min
/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 a, b, c;
  std::cin >> a >> b >> c;
  std::cout << min(a+b, min(b+c, a+c)) << std::endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:25: error: 'min' was not declared in this scope; did you mean 'std::min'?
    6 |   std::cout << min(a+b, min(b+c, a+c)) << 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)
      |     ^~~
a.cc:6:16: error: 'min' was not declared in this scope; did you mean 'std::min'?
    6 |   std::cout << min(a+b, min(b+c, a+c)) << std::endl;
      |                ^~~
      |                std::min
/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;

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

Compiler output:
a.cc: In function 'int main()':
a.cc:13:14: error: expected ';' before '}' token
   13 |     ANS = R+P
      |              ^
      |              ;
   14 |   }
      |   ~
Language: C++

#include <iostream>
int main() {
  int a, b, c;
  cin >> a >> b >> c;
  cout << min(a+b, min(a+c, b+c)) << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:4:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    4 |   cin >> a >> b >> c;
      |   ^~~
      |   std::cin
In file included from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:5:3: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    5 |   cout << min(a+b, min(a+c, b+c)) << endl;
      |   ^~~~
      |   std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:5:20: error: 'min' was not declared in this scope; did you mean 'std::min'?
    5 |   cout << min(a+b, min(a+c, b+c)) << 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:
/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)
      |     ^~~
a.cc:5:11: error: 'min' was not declared in this scope; did you mean 'std::min'?
    5 |   cout << min(a+b, min(a+c, b+c)) << endl;
      |           ^~~
      |           std::min
/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)
      |     ^~~
a.cc:5:38: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
    5 |   cout << min(a+b, min(a+c, b+c)) << endl;
      |                                      ^~~~
      |                                      std::endl
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
Language: C++

    #include <iostream>
    #include <vector>
#include <algorithm>
    using namespace std;
     
    int main(){
      ios_base::sync_with_stdio(false);
      cin.tie(NULL);
      int p, q , r;
      cin >> p >> q >> r;
      
      vector<int> arr;
      arr.push_back(p);
      arr.push_back(q);
      arr.push_back(r);
      sort(arr);
      
      cout << arr[0] + arr[1];
      
    }

Compiler output:
a.cc: In function 'int main()':
a.cc:16:11: error: no matching function for call to 'sort(std::vector<int>&)'
   16 |       sort(arr);
      |       ~~~~^~~~~
In file included from /usr/include/c++/14/algorithm:61,
                 from a.cc:3:
/usr/include/c++/14/bits/stl_algo.h:4762:5: note: candidate: 'template<class _RAIter> void std::sort(_RAIter, _RAIter)'
 4762 |     sort(_RandomAccessIterator __first, _RandomAccessIterator __last)
      |     ^~~~
/usr/include/c++/14/bits/stl_algo.h:4762:5: note:   candidate expects 2 arguments, 1 provided
/usr/include/c++/14/bits/stl_algo.h:4793:5: note: candidate: 'template<class _RAIter, class _Compare> void std::sort(_RAIter, _RAIter, _Compare)'
 4793 |     sort(_RandomAccessIterator __first, _RandomAccessIterator __last,
      |     ^~~~
/usr/include/c++/14/bits/stl_algo.h:4793:5: note:   candidate expects 3 arguments, 1 provided
In file included from /usr/include/c++/14/algorithm:86:
/usr/include/c++/14/pstl/glue_algorithm_defs.h:292:1: note: candidate: 'template<class _ExecutionPolicy, class _RandomAccessIterator, class _Compare> __pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, void> std::sort(_ExecutionPolicy&&, _RandomAccessIterator, _RandomAccessIterator, _Compare)'
  292 | sort(_ExecutionPolicy&& __exec, _RandomAccessIterator __first, _RandomAccessIterator __last, _Compare __comp);
      | ^~~~
/usr/include/c++/14/pstl/glue_algorithm_defs.h:292:1: note:   candidate expects 4 arguments, 1 provided
/usr/include/c++/14/pstl/glue_algorithm_defs.h:296:1: note: candidate: 'template<class _ExecutionPolicy, class _RandomAccessIterator> __pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, void> std::sort(_ExecutionPolicy&&, _RandomAccessIterator, _RandomAccessIterator)'
  296 | sort(_ExecutionPolicy&& __exec, _RandomAccessIterator __first, _RandomAccessIterator __last);
      | ^~~~
/usr/include/c++/14/pstl/glue_algorithm_defs.h:296:1: 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<<P+Q+R-max(P,Q,R)<<endl;
 return 0;
}

Compiler output:
In file included from /usr/include/c++/14/algorithm:60,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_algobase.h: In instantiation of 'constexpr const _Tp& std::max(const _Tp&, const _Tp&, _Compare) [with _Tp = int; _Compare = int]':
a.cc:7:17:   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

main(){
  int P, Q, R, sum;
  scanf("%d %d %d, P, Q, R);
  sum = P + Q;
  if (sum > P + R){
    sum = P + R;
   }
  if (sum > Q + R){
    sum = Q + R;
   }
  printf("%d", sum);
  
  return 0;
        }
  

Compiler output:
main.c:1:1: error: return type defaults to 'int' [-Wimplicit-int]
    1 | main(){
      | ^~~~
main.c: In function 'main':
main.c:3:3: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
    3 |   scanf("%d %d %d, P, Q, R);
      |   ^~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
  +++ |+#include <stdio.h>
    1 | main(){
main.c:3:3: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
    3 |   scanf("%d %d %d, P, Q, R);
      |   ^~~~~
main.c:3:3: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:3:9: warning: missing terminating " character
    3 |   scanf("%d %d %d, P, Q, R);
      |         ^
main.c:3:9: error: missing terminating " character
    3 |   scanf("%d %d %d, P, Q, R);
      |         ^~~~~~~~~~~~~~~~~~~~
main.c:4:14: error: expected ')' before ';' token
    4 |   sum = P + Q;
      |              ^
      |              )
main.c:3:8: note: to match this '('
    3 |   scanf("%d %d %d, P, Q, R);
      |        ^
main.c:4:7: error: passing argument 1 of 'scanf' makes pointer from integer without a cast [-Wint-conversion]
    4 |   sum = P + Q;
      |   ~~~~^~~~~~~
      |       |
      |       int
main.c:4:7: note: expected 'const char *' but argument is of type 'int'
main.c:13:12: error: expected ';' before '}' token
   13 |   return 0;
      |            ^
      |            ;
   14 |         }
      |         ~
Language: Java

import java.util.*;
public class Main{
	public static void main(String[] args){
      Scanner sc  = Scanner(System.in);
      int p = sc.nextInt();
      int q = sc.nextInt();
      int r = sc.nextInt();
      int mx = Math.max(p,q,r);
      System.out.println(p+q+r-mx);
      sc.close();
    }
}

Compiler output:
Main.java:4: error: cannot find symbol
      Scanner sc  = Scanner(System.in);
                    ^
  symbol:   method Scanner(InputStream)
  location: class Main
Main.java:8: error: no suitable method found for max(int,int,int)
      int mx = Math.max(p,q,r);
                   ^
    method Math.max(int,int) is not applicable
      (actual and formal argument lists differ in length)
    method Math.max(long,long) is not applicable
      (actual and formal argument lists differ in length)
    method Math.max(float,float) is not applicable
      (actual and formal argument lists differ in length)
    method Math.max(double,double) is not applicable
      (actual and formal argument lists differ in length)
2 errors
Language: C++

#include<bits/stdc++.h>
using namespace std;
int a,b,c,maxv; 
int main()
{
	cin>>a>>b>>c;
	maxv=max(a,b,c);
	cout<<(a+b+c-maxv)<<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:7:10:   required from here
    7 |         maxv=max(a,b,c);
      |              ~~~^~~~~~~
/usr/include/c++/14/bits/stl_algobase.h:306:17: error: '__comp' cannot be used as a function
  306 |       if (__comp(__a, __b))
      |           ~~~~~~^~~~~~~~~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
int a,b,c; 
int main()
{
	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/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:18:   required from here
    7 |         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 <bits/stdc++.h>
using namespace std;
 
int main() {
  int a,b,c,r1,r2,r3;
 
  cin >> a;
  cin >> b;
  cin >> c;
 
  r1 = a+b;
  r2 = b+c;
  r3 = a+c;
  if(r1 >= r2 && r1 >= r3)
    cout << r1 << endl
    else
      if(r2 >= r1 && r2 >= r3)
        cout << r2 <<endl
        else 
          cout << r3 << endl
}

Compiler output:
a.cc: In function 'int main()':
a.cc:15:23: error: expected ';' before 'else'
   15 |     cout << r1 << endl
      |                       ^
      |                       ;
   16 |     else
      |     ~~~~
Language: C++

#include<stdio.h>

int mian()
{
  int P,Q,R;
  int min;
  while(scanf("%d %d %d",&P,&Q,&R))
  {
    min = P+Q;
    if(P+R<min)min=P+R;
    if(Q+R<min)min=Q+R;
    printf("%d\n",min);
  }
  return 0;
}

Compiler output:
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/Scrt1.o: in function `_start':
(.text+0x17): undefined reference to `main'
collect2: error: ld returned 1 exit status
Language: C++

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

#define REP(i, n) for(ll i = 0;i < n;i++)
#define REP1(i, n) for(ll i = 1;i < n;i++)
#define ll long long
#define MOD 1000000007

int a,b,c;

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

Compiler output:
a.cc: In function 'int main()':
a.cc:17:17: error: invalid types 'int[int]' for array subscript
   17 |   cout<<(ar[0]+a[1])<<endl;
      |                 ^
Language: C++

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

#define FOR(i,a,b) for(int i=(a);i<(b);i++)
#define REP(i,n) FOR(i,0,n)
#define MAX(a, b) ((a) > (b) ? (a) : (b))
#define PB push_back
#define MP make_pair
typedef long long ll;
typedef double db;
typedef pair<int,int> pii;
const double PI=acos(-1.0);
const int INF=1e9;
const double EPS=1e-10;
const ll MOD=1e9+7;


int main(){
int p,q,r,min;
cin>>p>>q>>r;
if(p>=q&&p>=r)min=q+r;
else(q>=p&&q>=r)min=p+r;
else(r>=p&&r>=q)min=p+q;

cout<<min<<endl;
return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:23:17: error: expected ';' before 'min'
   23 | else(q>=p&&q>=r)min=p+r;
      |                 ^~~
      |                 ;
a.cc:24:1: error: 'else' without a previous 'if'
   24 | else(r>=p&&r>=q)min=p+q;
      | ^~~~
a.cc:24:17: error: expected ';' before 'min'
   24 | else(r>=p&&r>=q)min=p+q;
      |                 ^~~
      |                 ;
Language: Java

import java.util.*; 
class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    int p = Integer.parseInt(sc.next());
	int q = Integer.parseInt(sc.next());
    int r = Integer.parseInt(sc.next());
	
    System.out.print(max(max(p+q, p+r), q+r));
  }
}
  


Compiler output:
Main.java:9: error: cannot find symbol
    System.out.print(max(max(p+q, p+r), q+r));
                         ^
  symbol:   method max(int,int)
  location: class Main
1 error
Language: Java

import java.util.*; 
class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    int p = Integer.parseInt(sc.next());
	int q = Integer.parseInt(sc.next());
    int r = Integer.parseInt(sc.next());
	
    System.out.print(Math.max(p+q, p+r), q+r);
  }
}
  


Compiler output:
Main.java:9: error: no suitable method found for print(int,int)
    System.out.print(Math.max(p+q, p+r), q+r);
              ^
    method PrintStream.print(boolean) is not applicable
      (actual and formal argument lists differ in length)
    method PrintStream.print(char) is not applicable
      (actual and formal argument lists differ in length)
    method PrintStream.print(int) is not applicable
      (actual and formal argument lists differ in length)
    method PrintStream.print(long) is not applicable
      (actual and formal argument lists differ in length)
    method PrintStream.print(float) is not applicable
      (actual and formal argument lists differ in length)
    method PrintStream.print(double) is not applicable
      (actual and formal argument lists differ in length)
    method PrintStream.print(char[]) is not applicable
      (actual and formal argument lists differ in length)
    method PrintStream.print(String) is not applicable
      (actual and formal argument lists differ in length)
    method PrintStream.print(Object) is not applicable
      (actual and formal argument lists differ in length)
1 error
Language: Java

import java.util.*; 
class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    int p = Integer.parseInt(sc.next());
	int q = Integer.parseInt(sc.next());
    int r = Integer.parseInt(sc.next());
	
    System.out.print(max(p+q, p+r), q+r);
  }
}
  

Compiler output:
Main.java:9: error: cannot find symbol
    System.out.print(max(p+q, p+r), q+r);
                     ^
  symbol:   method max(int,int)
  location: class Main
1 error
Language: C++

/**
ID: albert.28
LANG: C++14
PROB: poetry
**/

#include <bits/stdc++.h>

/**
Mod operations in O(lg n)
Source: Benjamin Qi, https://github.com/bqi343/USACO/blob/master/Implementations/11%20-20(4)/Operators/modOp.cpp?fbclid=IwAR0m2afS-1xVg9kgeF8q8EJIeP9TP3Lct8dYb_hPJuI5gqHP1Utp5EkiOQ8
**/

using namespace std;

#define MAXN 100005
#define MOD 1000000007

#define FOR(g,i,n) for(int i = g; i < n; i++)
#define FORD(g,i,n) for(int i = g; i >= n; i--)

#define apple() ios_base::sync_with_stdio(0)
#define hentai() cin.tie(); cout.tie()

#define mp make_pair
#define pb push_back
#define	ll long long
#define int ll
#define INF (1e9*1)+5
#define LL_INF (1e18*1)+5
#define bitinc(s) (s&-s)
#define endl '\n'

typedef pair<int, int> pii;
typedef vector<int> vi;
typedef set<int> si;
typedef map<int, int> mi;
#define f first
#define s second
typedef vector<pii> vii;
typedef set<pii> sii;
typedef map<pii, pii> mii;

void fileio(char* in, char* out)
{
	freopen(in, "r", stdin);
	freopen(out, "w", stdout);
}

namespace modOp
{
    int ad(int a, int b, int mod = MOD) { return (a+b)%mod; }
    int sub(int a, int b, int mod = MOD) { return (a-b+mod)%mod; }
    int mul(int a, int b, int mod = MOD) { return (ll)a*b%mod; }

    int AD(int& a, int b, int mod = MOD) { return a = ad(a,b,mod); }
    int SUB(int& a, int b, int mod = MOD) { return a = sub(a,b,mod); }
    int MUL(int& a, int b, int mod = MOD) { return a = mul(a,b,mod); }

    int po (int b, int p, int mod = MOD) { return !p?1:mul(po(mul(b,b,mod),p/2,mod),p&1?b:1,mod); }
    int inv (int b, int mod = MOD) { return po(b,mod-2,mod); }

    int invGeneral(int a, int b) { // 0 < a < b, gcd(a,b) = 1
        if (a == 0) return b == 1 ? 0 : -1;
        int x = invGeneral(b%a,a);
        return x == -1 ? -1 : ((1-(ll)b*x)/a+b)%b;
    }
}

using namespace modOp;

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


Compiler output:
cc1plus: error: '::main' must return 'int'
Language: C++

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

int main() {
    int a,b,c,A,B,C;
    cin >> a >> b >>c;
    A = a+b;
    B = a+ c;
    C = b + c;
    if(A>=B){
        if(B>C){
            cout <<　C <<endl;
        }
        else {
            cout << B　<<endl;
        }
    }
    else {
        cout <<　A　<<endl;
    }
}

Compiler output:
a.cc:12:20: error: extended character 　 is not valid in an identifier
   12 |             cout <<　C <<endl;
      |                    ^
a.cc:15:21: error: extended character 　 is not valid in an identifier
   15 |             cout << B　<<endl;
      |                     ^
a.cc:19:16: error: extended character 　 is not valid in an identifier
   19 |         cout <<　A　<<endl;
      |                ^
a.cc:19:16: error: extended character 　 is not valid in an identifier
a.cc: In function 'int main()':
a.cc:12:20: error: '\U00003000C' was not declared in this scope
   12 |             cout <<　C <<endl;
      |                    ^~~
a.cc:15:21: error: 'B\U00003000' was not declared in this scope
   15 |             cout << B　<<endl;
      |                     ^~~
a.cc:19:16: error: '\U00003000A\U00003000' was not declared in this scope
   19 |         cout <<　A　<<endl;
      |                ^~~~~
Language: C++

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

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


Compiler output:
a.cc: In function 'int main()':
a.cc:9:23: error: no matching function for call to 'end()'
    9 |     sort(a.begin(),end());
      |                    ~~~^~
In file included from /usr/include/c++/14/bits/algorithmfwd.h:39,
                 from /usr/include/c++/14/bits/stl_algo.h:59,
                 from /usr/include/c++/14/algorithm:61,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51,
                 from a.cc:1:
/usr/include/c++/14/initializer_list:99:5: note: candidate: 'template<class _Tp> constexpr const _Tp* std::end(initializer_list<_Tp>)'
   99 |     end(initializer_list<_Tp> __ils) noexcept
      |     ^~~
/usr/include/c++/14/initializer_list:99:5: note:   candidate expects 1 argument, 0 provided
In file included from /usr/include/c++/14/string:53,
                 from /usr/include/c++/14/bitset:52,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:52:
/usr/include/c++/14/bits/range_access.h:74:5: note: candidate: 'template<class _Container> constexpr decltype (__cont.end()) std::end(_Container&)'
   74 |     end(_Container& __cont) -> decltype(__cont.end())
      |     ^~~
/usr/include/c++/14/bits/range_access.h:74:5: note:   candidate expects 1 argument, 0 provided
/usr/include/c++/14/bits/range_access.h:85:5: note: candidate: 'template<class _Container> constexpr decltype (__cont.end()) std::end(const _Container&)'
   85 |     end(const _Container& __cont) -> decltype(__cont.end())
      |     ^~~
/usr/include/c++/14/bits/range_access.h:85:5: note:   candidate expects 1 argument, 0 provided
/usr/include/c++/14/bits/range_access.h:106:5: note: candidate: 'template<class _Tp, long unsigned int _Nm> constexpr _Tp* std::end(_Tp (&)[_Nm])'
  106 |     end(_Tp (&__arr)[_Nm]) noexcept
      |     ^~~
/usr/include/c++/14/bits/range_access.h:106:5: note:   candidate expects 1 argument, 0 provided
In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:166:
/usr/include/c++/14/valarray:1249:5: note: candidate: 'template<class _Tp> _Tp* std::end(valarray<_Tp>&)'
 1249 |     end(valarray<_Tp>& __va) noexcept
      |     ^~~
/usr/include/c++/14/valarray:1249:5: note:   candidate expects 1 argument, 0 provided
/usr/include/c++/14/valarray:1265:5: note: candidate: 'template<class _Tp> const _Tp* std::end(const valarray<_Tp>&)'
 1265 |     end(const valarray<_Tp>& __va) noexcept
      |     ^~~
/usr/include/c++/14/valarray:1265:5: note:   candidate expects 1 argument, 0 provided
Language: C++

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

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


Compiler output:
a.cc: In function 'int main()':
a.cc:6:16: error: 'a' was not declared in this scope
    6 |         cin >> a.at(i);
      |                ^
a.cc:8:10: error: 'a' was not declared in this scope
    8 |     sort(a.begin(),end());
      |          ^
a.cc:8:23: error: no matching function for call to 'end()'
    8 |     sort(a.begin(),end());
      |                    ~~~^~
In file included from /usr/include/c++/14/bits/algorithmfwd.h:39,
                 from /usr/include/c++/14/bits/stl_algo.h:59,
                 from /usr/include/c++/14/algorithm:61,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51,
                 from a.cc:1:
/usr/include/c++/14/initializer_list:99:5: note: candidate: 'template<class _Tp> constexpr const _Tp* std::end(initializer_list<_Tp>)'
   99 |     end(initializer_list<_Tp> __ils) noexcept
      |     ^~~
/usr/include/c++/14/initializer_list:99:5: note:   candidate expects 1 argument, 0 provided
In file included from /usr/include/c++/14/string:53,
                 from /usr/include/c++/14/bitset:52,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:52:
/usr/include/c++/14/bits/range_access.h:74:5: note: candidate: 'template<class _Container> constexpr decltype (__cont.end()) std::end(_Container&)'
   74 |     end(_Container& __cont) -> decltype(__cont.end())
      |     ^~~
/usr/include/c++/14/bits/range_access.h:74:5: note:   candidate expects 1 argument, 0 provided
/usr/include/c++/14/bits/range_access.h:85:5: note: candidate: 'template<class _Container> constexpr decltype (__cont.end()) std::end(const _Container&)'
   85 |     end(const _Container& __cont) -> decltype(__cont.end())
      |     ^~~
/usr/include/c++/14/bits/range_access.h:85:5: note:   candidate expects 1 argument, 0 provided
/usr/include/c++/14/bits/range_access.h:106:5: note: candidate: 'template<class _Tp, long unsigned int _Nm> constexpr _Tp* std::end(_Tp (&)[_Nm])'
  106 |     end(_Tp (&__arr)[_Nm]) noexcept
      |     ^~~
/usr/include/c++/14/bits/range_access.h:106:5: note:   candidate expects 1 argument, 0 provided
In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:166:
/usr/include/c++/14/valarray:1249:5: note: candidate: 'template<class _Tp> _Tp* std::end(valarray<_Tp>&)'
 1249 |     end(valarray<_Tp>& __va) noexcept
      |     ^~~
/usr/include/c++/14/valarray:1249:5: note:   candidate expects 1 argument, 0 provided
/usr/include/c++/14/valarray:1265:5: note: candidate: 'template<class _Tp> const _Tp* std::end(const valarray<_Tp>&)'
 1265 |     end(const valarray<_Tp>& __va) noexcept
      |     ^~~
/usr/include/c++/14/valarray:1265:5: note:   candidate expects 1 argument, 0 provided
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main(){
  int a,b,c;
  cin>>a>>b>>c;
  x=max(a,(b,c));
  cout<<a+b+c-x<<endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:6:3: error: 'x' was not declared in this scope
    6 |   x=max(a,(b,c));
      |   ^
Language: C++

# スペース区切りの整数の入力
p, q, r = map(int, raw_input().split())

n=max(p, q, r)

# 出力
Print str(p+q+r-n)


Compiler output:
a.cc:1:3: error: invalid preprocessing directive #\U000030b9\U000030da\U000030fc\U000030b9\U0000533a\U00005207\U0000308a\U0000306e\U00006574\U00006570\U0000306e\U00005165\U0000529b
    1 | # スペース区切りの整数の入力
      |   ^~~~~~~~~~~~~~~~~~~~~~~~~~
a.cc:6:3: error: invalid preprocessing directive #\U000051fa\U0000529b
    6 | # 出力
      |   ^~~~
a.cc:2:1: error: 'p' does not name a type
    2 | p, q, r = map(int, raw_input().split())
      | ^
Language: C++

#include <bits/stdc++.h>
#include <algorithm>
#include <string>
#include <math.h>
#include <cstdlib>
#include <cmath> 
using ll = long long;
using namespace std;
 
int main() {
  int P;cin>>P;
  int Q;cin>>Q;
  int R;cin>>R;
  int ans;
  if(P>=Q&&P>=R){
      ans=Q+R;1
  }else if(Q>=R&&Q>=P){
      ans=P+R;
  }else{
      ans=P+Q;
  }
  cout<<ans<<endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:16:16: error: expected ';' before '}' token
   16 |       ans=Q+R;1
      |                ^
      |                ;
   17 |   }else if(Q>=R&&Q>=P){
      |   ~
Language: C++

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

//前提として今回取り扱うのはN*Nの正方行列であり
//それ以外の行列は取り扱えない

int N,diff = 0,Z;
int A[1100][1100];
bool flag[1100] = {};
int table[1100][1100];

void zeroswap(int &X){
    if(X+1 == N){
        cout << "この式の解は不定である" << endl;
        exit(0);
    }

    for(int p = X+1;p < N;p++){
        //DFSみたく再帰関数的に解きたかったけどごちゃって無理だった
        if(A[p][X] == 0){
            //0が連続するとここに帰着する
            if(p+1 == N){
                cout << "この式の解は不定である" << endl;
                exit(0);
            }
            continue;
        }
        diff = p;
        break;
    }
    for(m,N+1){
        swap(A[X][m],A[diff][m]);
    }
    return;
}

int gcd(int &X, int &Y) {
	if (X < Y) gcd(Y, X);
	int r;
    if(Y == 0) return X;
	while (r = X % Y) {
		X = Y;
		Y = r;
	}
	return Y;
}


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

    cin >>N;
    for(int i = 0;i < N;i++){
      for(int j = 0;j < N+1;j++){
        cin >> A[i][j];
        table[i][j] = A[i][j];
      }
    }
    for(int i = 0;i < N;i++) if(A[i][i] == 0) zeroswap(i);
    for(int i = 0;i < N;i++) if(A[i][i] > 0) flag[i] = 1;

    for(int i = 0;i < N;i++){
        //左からi列目が1を一つと他を0にする操作をN回行う。
        //注意としてすでにi-1列目で1を所持した行は足し引きしてはいけない
        for(int j = 0;j < N;j++){
            if(j == i) continue;
            else{
                for(int k = 0;k < N+1;k++){
                    //A[i][i]を起点に考える
                    //A[i]の横一列からA[j]の横一列を消すようにする
                    //添え字注意,またA[i][i]は0じゃないことが保証されている
                    if(flag[j]) A[j][k] *= -1;
                    table[j][k] = A[j][k];
                    A[j][k] *= A[i][i];
                    A[j][k] -= A[i][k] * table[j][i];
                }
            }    
        }
    }

    for(int i = 0;i < N;i++){
      if(A[i][i] == 0){
        cout << "この式は解を持たない" << endl;
        return 0;
      }
    }

    for(int i = 0;i < N;i++){
       if(A[i][N] % A[i][i] != 0){
         int C = A[i][N],B = A[i][i],G = gcd(A[i][N],A[i][i]);
         cout << i+1 << "個目の答えは　" << C/G << '/' << B/G << endl;
       }
        else cout << i+1 << "個目の答えは　" << A[i][N]/A[i][i] << endl;
    }
}

Compiler output:
a.cc: In function 'void zeroswap(int&)':
a.cc:31:9: error: 'm' was not declared in this scope
   31 |     for(m,N+1){
      |         ^
a.cc:34:5: error: expected primary-expression before 'return'
   34 |     return;
      |     ^~~~~~
a.cc:33:6: error: expected ';' before 'return'
   33 |     }
      |      ^
      |      ;
   34 |     return;
      |     ~~~~~~
a.cc:34:5: error: expected primary-expression before 'return'
   34 |     return;
      |     ^~~~~~
a.cc:33:6: error: expected ')' before 'return'
   33 |     }
      |      ^
      |      )
   34 |     return;
      |     ~~~~~~
a.cc:31:8: note: to match this '('
   31 |     for(m,N+1){
      |        ^
Language: C++

#include <iostream>
#include <vector>
using namespace std;
typedef long long ll;
int main() {
    int P;
    int Q;
    int R;
    cin >> P >> Q>>R;
    vector<int> v;
    v.push_back(P);
    v.push_back(Q);
    v.push_back(R);
    int sum=0;
    sort(v.begin(), v.end());

    sum=v[0]+v[1];

    cout << sum<< endl;
    return 0;
}


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

#include <iostream>
#include <vector>
using namespace std;
typedef long long ll;
int main() {
    int P;
    int Q;
    int R;
    cin >> P >> Q>>R;
    vector<int> v;
    v.push_back(P);
    v.push_back(Q);
    v.push_back(R);
    int sum=0;

    sort(v.begin(), v.end() );

    sum=v[0]+v[1];

    cout << sum<< endl;
    return 0;
}


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

#include <iostream>
#include <vector>
using namespace std;
typedef long long ll;
int main() {
    int P;
    int Q;
    int R;
    cin >> P >> Q>>R;
    vector<int> v;
    v.push_back(P);
    v.push_back(Q);
    v.push_back(R);
    int sum=0;

    std::sort(v.begin(), v.end() );

    sum=v[0]+v[1];

    cout << sum<< endl;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:16:10: error: 'sort' is not a member of 'std'; did you mean 'qsort'?
   16 |     std::sort(v.begin(), v.end() );
      |          ^~~~
      |          qsort
Language: C++

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

int main(){
  int N,M;
  cin >> N >> M;
  vector<int> broken(N);
  
  for (int i=0;i<M;<i++){
    int a;
    cin >> a;
    broken[a] = 1;
  }
  
  vector<int> dp(N+1);
  const int mod =1000000007;
  dp[N]=1;
  for (int i=N-1;N>=0;i--){
    if (broken[i]){
      dp[i]=0;
      continue;
    }
    dp[i] = dp[i+1]+dp[i+2]%mod;
  }
  cout << dp[0] <<endl;
}
  
  
  


Compiler output:
a.cc: In function 'int main()':
a.cc:10:20: error: expected primary-expression before '<' token
   10 |   for (int i=0;i<M;<i++){
      |                    ^
Language: C++

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

int main(){
  int N,M;
  cin >> N >> M;
  vector<int> broken(N);
  
  for (int i=0;i<M<i++){
    int a;
    cin >> a;
    broken[a] = 1;
  }
  
  vector<int> dp(N+1);
  const int mod =1000000007;
  dp[N]=1;
  for (int i=N-1;N>=0;i--){
    if (broken[i]){
      dp[i]=0;
      continue;
    }
    dp[i] = dp[i+1]+dp[i+2]%mod;
  }
  cout << dp[0] <<endl;
}
  
  
  


Compiler output:
a.cc: In function 'int main()':
a.cc:10:23: error: expected ';' before ')' token
   10 |   for (int i=0;i<M<i++){
      |                       ^
      |                       ;
Language: C++

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

int main(){
  int N,M;
  cin >> N >> M;
  vector<int> broken<N>;
  
  for (int i=0;i<M<i++){
    int a;
    cin >> a;
    broken[a] = 1;
  }
  
  vector<int> dp<N+1>;
  const int mod =1000000007;
  dp[N]=1;
  for (int i=N-1;N>=0;i--){
    if (broken[i]){
      dp[i]=0;
      continue;
    }
    dp[i] = dp[i+1]+dp[i+2]%mod;
  }
  cout << dp[0] <<endl;
}
  
  
  


Compiler output:
a.cc: In function 'int main()':
a.cc:8:21: error: expected initializer before '<' token
    8 |   vector<int> broken<N>;
      |                     ^
a.cc:10:23: error: expected ';' before ')' token
   10 |   for (int i=0;i<M<i++){
      |                       ^
      |                       ;
a.cc:13:5: error: 'broken' was not declared in this scope
   13 |     broken[a] = 1;
      |     ^~~~~~
a.cc:16:17: error: expected initializer before '<' token
   16 |   vector<int> dp<N+1>;
      |                 ^
a.cc:18:3: error: 'dp' was not declared in this scope
   18 |   dp[N]=1;
      |   ^~
a.cc:20:9: error: 'broken' was not declared in this scope
   20 |     if (broken[i]){
      |         ^~~~~~
Language: C++

#include<iostream>
using namespace std;
int main(){
	int p, q, r;
	cin >> p >> q >> r;

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

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

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

	return 0;


Compiler output:
a.cc: In function 'int main()':
a.cc:43:18: error: expected '}' at end of input
   43 |         return 0;
      |                  ^
a.cc:3:11: note: to match this '{'
    3 | int main(){
      |           ^
Language: C++

#define SuC_VaT              Doc_code_ban_khac
#define Nhan_cach_bang_0     Doc_code_ban_khac

//

#include <iostream>

using namespace std;

typedef long long ll;
ll p[3];

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


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

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

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

// ProConPractice.cpp : このファイルには 'main' 関数が含まれています。プログラム実行の開始と終了がそこで行われます。
//

#include "pch.h"
#include <iostream>
using namespace std;

int main()
{

	int a,b,c;

	cin >> a >> b >> c;


	int num[3];


	num[0] = a + b;
	num[1] = a + c;
	num[2] = b + c;

	int tmp = 100000;
	for (int i = 0; i < 3; i++) {

		
		if (tmp > num[i]) {

			tmp = num[i];

		}




	}

	cout << tmp << endl;




}


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