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

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

#define ll long long
#define ar array

int main() {

    ios::sync_with_stdio(false);
	
	int a, b, c, k, maior;
	
	cin >> a >> b >> c;
	cin >> k;
	
	maior = max(max(a, b), c);
	
	for(int i = 0, i < K, i++){
		maior = maior*2;
	}
	
	cout << a + b + c - max(max(a, b), c) + maior << endl;

    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:18:25: error: expected ';' before '<' token
   18 |         for(int i = 0, i < K, i++){
      |                         ^~
      |                         ;
a.cc:18:26: error: expected primary-expression before '<' token
   18 |         for(int i = 0, i < K, i++){
      |                          ^
a.cc:18:28: error: 'K' was not declared in this scope
   18 |         for(int i = 0, i < K, i++){
      |                            ^
a.cc:18:34: error: expected ';' before ')' token
   18 |         for(int i = 0, i < K, i++){
      |                                  ^
      |                                  ;
Language: C++

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

int main(){

    int a, b, c, k, maxv, maxv2, maxv3;
    cin >> a >> b >> c >> k;
    
    maxv = max(a, b);
    if(maxv == a){
        maxv2 = max(b, c);
        if(maxv2 == b){
            maxv3 = c;
        } else {
            maxv3 = b;
        }
    } else {
        maxv2 = max(a, c);
        if(maxv2 == a){
            maxv3 = c;
        } else {
            maxv3 = a;
        }
    }

    while(k--){
        maxv *= 2;
    }
    cout << maxv + maxv2 + maxv3 + << endl;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:29:36: error: expected primary-expression before '<<' token
   29 |     cout << maxv + maxv2 + maxv3 + << endl;
      |                                    ^~
Language: C++

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

int main(){

    int a, b, c, k, maxv;
    cin >> a >> b >> c >> k;
    maxv = max(a, b);
    maxv = max(max, c);
    while(k--){
        maxv *= 2;
    }
    cout << maxv;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:15: error: no matching function for call to 'max(<unresolved overloaded function type>, int&)'
    9 |     maxv = max(max, 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:9:15: note:   couldn't deduce template parameter '_Tp'
    9 |     maxv = max(max, c);
      |            ~~~^~~~~~~~
Language: C++

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

int main(){`

    int a, b, c, k, maxv;
    cin >> a >> b >> c >> k;
    maxv = max(a, b);
    maxv = max(max, c);
    while(k--){
        maxv *= 2;
    }
    cout << maxv;
    return 0;
}

Compiler output:
a.cc:4:12: error: stray '`' in program
    4 | int main(){`
      |            ^
a.cc: In function 'int main()':
a.cc:9:15: error: no matching function for call to 'max(<unresolved overloaded function type>, int&)'
    9 |     maxv = max(max, 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:9:15: note:   couldn't deduce template parameter '_Tp'
    9 |     maxv = max(max, c);
      |            ~~~^~~~~~~~
Language: C++

#include<stdio.h>
int main(void){
  int a,b,c,k,max;
  scanf("%d%d%d%d",&a,&b,&c,&k);
  max=a>b?a:b;
  max=max>c?max:c;
  p=a+b+c-max;
  for(int i=0;k>i;++i)
    max*=2;
  printf("%d",max+p);
  return 0;
}

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

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

int main() {
  int a,b,c,k,ans;
  cin >> a >> b >> c >> k;
  ans = max(a,b,c);
  for(int i=0;i<k;i++)ans = ans*2;
  ans = ans+a+b+c-max(a,b,c);
  cout << ans << endl;
  return 0;
}
  

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

int main(){
    int a,b,c;cin>>a>>b>>c;
    int k;cin>>k;

    int ans=(a+b+c)+max({a,b,c})*((1<<k)-1);
    cout<<ans<<endl;
}

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

#include <stdio.h>
#include <math.h>


int maxIndex(int x[]) {
	int max = -10;
	int index = 0;
	for (int i = 0; i < 3;++i) {
		if (x[i] > max) {
			index = i;
			max = x[i];
		}
	}
	return index;
}

int main(){
	int abc[3];
	int k;

	for (int i = 0; i < 3; ++i) {
		scanf("%d", &abc[i]);
	}
	scanf("%d", &k);

	abc[maxIndex(abc)] = abc[maxIndex(abc)] * pow(2, k);

	int sum = 0;
	for (int i : abc) {
		sum += i;
	}

	printf("%d", sum);


	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:29:20: error: expected '=', ',', ';', 'asm' or '__attribute__' before ':' token
   29 |         for (int i : abc) {
      |                    ^
main.c:30:24: error: 'i' undeclared (first use in this function)
   30 |                 sum += i;
      |                        ^
main.c:30:24: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include <stdio.h>


int maxIndex(int x[]) {
	int max = -10;
	int index = 0;
	for (int i = 0; i < 3;++i) {
		if (x[i] > max) {
			index = i;
			max = x[i];
		}
	}
	return index;
}

int main(){
	int abc[3];
	int k;

	for (int i = 0; i < 3; ++i) {
		scanf("%d", &abc[i]);
	}
	scanf("%d", &k);

	abc[maxIndex(abc)] = abc[maxIndex(abc)] * pow(2, k);

	int sum = 0;
	for (int i : abc) {
		sum += i;
	}

	printf("%d", sum);


	return 0;
}


Compiler output:
main.c: In function 'main':
main.c:25:51: error: implicit declaration of function 'pow' [-Wimplicit-function-declaration]
   25 |         abc[maxIndex(abc)] = abc[maxIndex(abc)] * pow(2, k);
      |                                                   ^~~
main.c:2:1: note: include '<math.h>' or provide a declaration of 'pow'
    1 | #include <stdio.h>
  +++ |+#include <math.h>
    2 | 
main.c:25:51: warning: incompatible implicit declaration of built-in function 'pow' [-Wbuiltin-declaration-mismatch]
   25 |         abc[maxIndex(abc)] = abc[maxIndex(abc)] * pow(2, k);
      |                                                   ^~~
main.c:25:51: note: include '<math.h>' or provide a declaration of 'pow'
main.c:28:20: error: expected '=', ',', ';', 'asm' or '__attribute__' before ':' token
   28 |         for (int i : abc) {
      |                    ^
main.c:29:24: error: 'i' undeclared (first use in this function)
   29 |                 sum += i;
      |                        ^
main.c:29:24: note: each undeclared identifier is reported only once for each function it appears in
Language: Java

import java.util.*;

class Main{
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int a = sc.nextInt();
        int b = sc.nextInt();
        int c = sc.nextInt();
        int k = sc.nextInt();
        int bai = Math.pow(2,k-1);

        System.out.println(a+b+c+Math.max(a,Math.max(b,c))*bai);
    }
}

Compiler output:
Main.java:10: error: incompatible types: possible lossy conversion from double to int
        int bai = Math.pow(2,k-1);
                          ^
1 error
Language: C++

#include<bits/stdc++.h>
#define rep(i,n) for (int i = 0; i < n; ++i)
#define rep2(i,s,n) for (int i = s; i < n; ++i)
#define all(a) a.begin(),a.end()
using namespace std;
using ll = long long;
using P = pair<int,int>;

int main() {
    int a,b,c,k;
    cin >> a >> b >> c >> k;
    int& d;
    if(a >= b && a >= c) d = a;
    else if(b >= c && b >= a) d = b;
    else d = c;
    rep(i,k) d *= 2;
    cout << a+b+c << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:10: error: 'd' declared as reference but not initialized
   12 |     int& d;
      |          ^
Language: C++

#include<iostream>
#include<stdio.h>
//#include <bits/stdc++.h>
#include<vector>
#include<float.h>
#include<iomanip>
#include<algorithm>
#include<string>
#include<cstring>
#include<math.h>
#include<cmath>
#include<sstream>
#include<set>
#include<map>
#include<queue>
#include <cassert>
#include <cmath>
#include<cstdint>

#define INF 1e9
#define rep(i,n)for(int i=0;(i)<(int)(n);i++)
#define REP(i,a,b)for(int i=(int)(a);(i)<=(int)(b);i++)
#define VEC(type, c, n) std::vector<type> c(n);for(auto& i:c)std::cin>>i;
#define vec(type,n) vector<type>(n)
#define vvec(m,n) vector<vector<int>> (int(m),vector<int>(n))
#define ALL(a)  (a).begin(),(a).end()

using namespace std;
using ll = long long;
using Graph = vector<vector<int>>;
using P = pair<int,int>;

vector<int>bitSearch(int bit,int n){
    vector<int>S;
    rep(i,n)if(bit&(1<<i))S.push_back(i);
    return S;
}



int main(){
    VEC(int,v,3);
    int k;cin>>k;
    sort(ALL(a),greater<int>());
    cout<<v[0]*pow(2,k)+v[1]+v[2];
}



Compiler output:
a.cc: In function 'int main()':
a.cc:44:14: error: 'a' was not declared in this scope
   44 |     sort(ALL(a),greater<int>());
      |              ^
a.cc:26:18: note: in definition of macro 'ALL'
   26 | #define ALL(a)  (a).begin(),(a).end()
      |                  ^
Language: C++

#include<iostream>
#include<stdio.h>
//#include <bits/stdc++.h>
#include<vector>
#include<float.h>
#include<iomanip>
#include<algorithm>
#include<string>
#include<cstring>
#include<math.h>
#include<cmath>
#include<sstream>
#include<set>
#include<map>
#include<queue>
#include <cassert>
#include <cmath>
#include<cstdint>

#define INF 1e9
#define rep(i,n)for(int i=0;(i)<(int)(n);i++)
#define REP(i,a,b)for(int i=(int)(a);(i)<=(int)(b);i++)
#define VEC(type, c, n) std::vector<type> c(n);for(auto& i:c)std::cin>>i;
#define vec(type,n) vector<type>(n)
#define vvec(m,n) vector<vector<int>> (int(m),vector<int>(n))
#define ALL(a)  (a).begin(),(a).end()

using namespace std;
using ll = long long;
using Graph = vector<vector<int>>;
using P = pair<int,int>;

vector<int>bitSearch(int bit,int n){
    vector<int>S;
    rep(i,n)if(bit&(1<<i))S.push_back(i);
    return S;
}



int main(){
    VEC(int,a,3);
    int k;cin>>k;
    sort(ALL(a),greater<int>());
    cout<<v[0]*pow(2,k)+v[1]+v[2];
}



Compiler output:
a.cc: In function 'int main()':
a.cc:45:11: error: 'v' was not declared in this scope
   45 |     cout<<v[0]*pow(2,k)+v[1]+v[2];
      |           ^
Language: C++

#include <iostream>
#include <cmath>
using namespace std;
int main()
{
    int max,a,b,c,k;
    cin>>a>>b>>c;
    max=a+b+c;
    cin>>k;
    ans=pow(2,k);
    cout<<max*ans<<endl;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:5: error: 'ans' was not declared in this scope; did you mean 'abs'?
   10 |     ans=pow(2,k);
      |     ^~~
      |     abs
Language: C++

#include <iostream>
#include <cmath>
using namespace std;
int main()
{
    int max,a,b,c;
    cin>>a>>b>>c;
    max=a+b+c;
    ans=pow(2,k);
    cout<<max*ans<<endl;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:5: error: 'ans' was not declared in this scope; did you mean 'abs'?
    9 |     ans=pow(2,k);
      |     ^~~
      |     abs
a.cc:9:15: error: 'k' was not declared in this scope
    9 |     ans=pow(2,k);
      |               ^
Language: C

#include <stdio.h>
int main(){
  int a, b, c, k, ans;
  scanf("%d,%d,%d,%d",&a,&b,&c,&k);
  if (a >= b && a >= c){
    ans = a*k + b + c;
  }else if (b >= a && b >= c);{
    ans = a + b*k + c;
  }else{
    ans = a + b + c*k;
  }
  printf("%d",ans);
}

Compiler output:
main.c: In function 'main':
main.c:9:4: error: 'else' without a previous 'if'
    9 |   }else{
      |    ^~~~
Language: C++

#include <iostream>
#include<algorithm>
#include<string>
#include <cmath>
using namespace std;
int main()
{
	int A, B, C, K, X,Y;
	cin >> A >> B >> C >> K;
	X = pow(2, K);
	Y = max(A, B, C);
	cout << A+B+C+ Y*(X-1);
}

Compiler output:
In file included from /usr/include/c++/14/string:51,
                 from /usr/include/c++/14/bits/locale_classes.h:40,
                 from /usr/include/c++/14/bits/ios_base.h:41,
                 from /usr/include/c++/14/ios:44,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_algobase.h: In instantiation of 'constexpr const _Tp& std::max(const _Tp&, const _Tp&, _Compare) [with _Tp = int; _Compare = int]':
a.cc:11:9:   required from here
   11 |         Y = 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 <iostream>
#include<algorithm>
#include<string>
#include <cmath>
using namespace std;
int main()
{
	int A, B, C, K, X;
	cin >> A >> B >> C >> K;
	X = pow(2, K);
	cout << A+B+C+max(A,B,C)*(pow(2,K)-1);
}

Compiler output:
In file included from /usr/include/c++/14/string:51,
                 from /usr/include/c++/14/bits/locale_classes.h:40,
                 from /usr/include/c++/14/bits/ios_base.h:41,
                 from /usr/include/c++/14/ios:44,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_algobase.h: In instantiation of 'constexpr const _Tp& std::max(const _Tp&, const _Tp&, _Compare) [with _Tp = int; _Compare = int]':
a.cc:11:19:   required from here
   11 |         cout << A+B+C+max(A,B,C)*(pow(2,K)-1);
      |                       ~~~^~~~~~~
/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++

a, b, c = map(int, input().split())
k = int(input().strip())
m = max(a, b, c)
tmp = m
for i in range(k):
    m *= 2
print(sum((m, a, b, c)) - tmp)


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

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

int main() {
  int a,b,c,k;
  cin >> a >> b >> c >> k;
  vector<int> vec = {a,b,c};
  sort(vec.begin(),vec.end());
  a = vec.at(0);
  b = vec.at(1);
  c = vec.at(2)
  cout << a+b+c*pow(2,k) << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:11:16: error: expected ';' before 'cout'
   11 |   c = vec.at(2)
      |                ^
      |                ;
   12 |   cout << a+b+c*pow(2,k) << endl;
      |   ~~~~
Language: C++

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

int main() {

	int a,b,c,K,max1,max2;
	cin>>a>>b>>c>>K;

  max1=max(a,b); //error
  max1=max(max1,c); max2=max1;
  for(int i=0;i<K;i++){
    max*=2;}
  if(max1==a){cout<<b+c+max2<<endl;}
  else if(max1==b){cout<<a+c+max2<<endl;}
  else{cout<<a+b+max2<<endl;}
 
}



Compiler output:
a.cc: In function 'int main()':
a.cc:12:10: error: overloaded function with no contextual type information
   12 |     max*=2;}
      |          ^
Language: C++

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

int main() {

	int a,b,c,K,max,max2;
	cin>>a>>b>>c>>K;

  max=max(a,b);
  max=max(max,c); max2=max;
  for(int i=0;i<K;i++){
    max*=2;}
  if(max==a){cout<<b+c+max2<<endl;}
  else if(max==b){cout<<a+c+max2<<endl;}
  else{cout<<a+b+max2<<endl;}
 
}



Compiler output:
a.cc: In function 'int main()':
a.cc:9:10: error: 'max' cannot be used as a function
    9 |   max=max(a,b);
      |       ~~~^~~~~
a.cc:10:10: error: 'max' cannot be used as a function
   10 |   max=max(max,c); max2=max;
      |       ~~~^~~~~~~
Language: Java

import java.util.*;

public class b {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    ArrayList<Integer> n = new ArrayList<>();
    for (int i = 0; i < 3; i++) {
      n.add(sc.nextInt());
    }
    int k = sc.nextInt();

    Collections.sort(n);
    for (int i = 0; i < k; i++)
      n.set(2, ((Integer) n.get(2) * 2));
    int ans = 0;
    for (Integer num : n)
      ans += num;
    System.out.println(ans);
  }
}

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

#include<bits/stdc++.h>
using namespace std;
using ll = long long;
using ld = long double;
using pint = pair<int,  int>;
using edge = int;
using graph = vector<vector<edge>>;
const ll INF = 1LL << 60;
const int INF32 = 1 << 29;
const ll MOD = 1000000007;


int main() {
	ll  n,x, m,k;cin >> >>n>> x>> m>> k;
	ll M=max(n, max(x,m));
	ll ans=n+x+m+pow(2,k)* M-M;
    cout << ans << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:14:29: error: expected primary-expression before '>>' token
   14 |         ll  n,x, m,k;cin >> >>n>> x>> m>> k;
      |                             ^~
Language: C++

#include<bits/stdc++.h>
using namespace std;
using ll = long long;
using ld = long double;
using pint = pair<int,  int>;
using edge = int;
using graph = vector<vector<edge>>;
const ll INF = 1LL << 60;
const int INF32 = 1 << 29;
const ll MOD = 1000000007;


int main() {
	ll  n,x, m,k;cin >> >>n>> x>> m>> k;
	ll M=max(n, max(x,m));
	ll ans=n+x+m+2* k* M-M;
    cout << ans << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:14:29: error: expected primary-expression before '>>' token
   14 |         ll  n,x, m,k;cin >> >>n>> x>> m>> k;
      |                             ^~
Language: C++

#include <bits/stdc++.h>
using namespace std;
#define IOS ios::sync_with_stdio(false); cin.tie(0);
#define FOR(i,s,n) for(int i = s; i < (n); i++)
#define REP(i,n) FOR(i,0,n)
#define ALL(n) (n).begin(), (n).end()
#define RALL(n) (n).rbegin(), (n).rend()
#define ATYN(n) cout << ( (n) ? "Yes":"No") << endl;
#define CFYN(n) cout << ( (n) ? "YES":"NO") << endl;
using ll = long long;
using ull = unsigned long long;
using pii = pair<int,int>;

int main(void)
{
    IOS
    vector<int> v(3);
    REP(i,3) cin >> v[i];
    int k >> cin >> k;
    cout << accumulate(ALL(v),0) - max({v[0],v[1],v[2]}) + max({v[0],v[1],v[2]}) * pow(2,k) << endl;

    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:19:11: error: expected initializer before '>>' token
   19 |     int k >> cin >> k;
      |           ^~
a.cc:20:90: error: 'k' was not declared in this scope
   20 |     cout << accumulate(ALL(v),0) - max({v[0],v[1],v[2]}) + max({v[0],v[1],v[2]}) * pow(2,k) << endl;
      |                                                                                          ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
#define IOS ios::sync_with_stdio(false); cin.tie(0);
#define FOR(i,s,n) for(int i = s; i < (n); i++)
#define REP(i,n) FOR(i,0,n)
#define ALL(n) (n).begin(), (n).end()
#define RALL(n) (n).rbegin(), (n).rend()
#define ATYN(n) cout << ( (n) ? "Yes":"No") << endl;
#define CFYN(n) cout << ( (n) ? "YES":"NO") << endl;
using ll = long long;
using ull = unsigned long long;
using pii = pair<int,int>;

int main(void)
{
    IOS
    vector<int> v(3);
    REP(i,3) cin >> v[i];
    cout << accumulate(ALL(v),0) - max({v[0],v[1],v[2]}) + max({v[0],v[1],v[2]}) * pow(2,k) << endl;

    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:19:90: error: 'k' was not declared in this scope
   19 |     cout << accumulate(ALL(v),0) - max({v[0],v[1],v[2]}) + max({v[0],v[1],v[2]}) * pow(2,k) << endl;
      |                                                                                          ^
Language: C++

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

Compiler output:
In file included from /usr/include/c++/14/algorithm:60,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_algobase.h: In instantiation of 'constexpr const _Tp& std::max(const _Tp&, const _Tp&, _Compare) [with _Tp = int; _Compare = int]':
a.cc:6:26:   required from here
    6 |   cout << A + B + C + max(A, B, C) * ((1 << K) - 1) << 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,K;
  cin >> A >> B >> C >> K;
  cin >> A >> B >> C >> K;
  cout << A + B + C + max(A, B, C) * ((1 << K) - 1) << endl;
	return 0;
}
}

Compiler output:
a.cc:10:1: error: expected declaration before '}' token
   10 | }
      | ^
In file included from /usr/include/c++/14/algorithm:60,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_algobase.h: In instantiation of 'constexpr const _Tp& std::max(const _Tp&, const _Tp&, _Compare) [with _Tp = int; _Compare = int]':
a.cc:7:26:   required from here
    7 |   cout << A + B + C + max(A, B, C) * ((1 << K) - 1) << 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,K;
  cin >> A >> B >> C >> K;
  int D = max(A,max(B,C));
  for (int i = 0; i < K; i++){
    D *= 2;
  }
  max(A,max(B,C)) = D;
  cout << A + B + C << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:19: error: assignment of read-only location 'std::max<int>(A, (* & std::max<int>(B, C)))'
   10 |   max(A,max(B,C)) = D;
      |   ~~~~~~~~~~~~~~~~^~~
Language: C++

include <stdio.h>
int main()
{
	int A,B,C,K,i,X,max,sum;
	scanf("%d",&A);
	scanf("%d",&B);
	scanf("%d",&C);
	scanf("%d",&K);
	max=A;
	if(max<B)
		max=B;
	if(max<C)
		max=C;
	X=max;
	for (int i = 0; i < K; ++i)
	{
		X*=2;
	}
	if(max=A)
		sum=X+B+C;
	if(max=B)
		sum=A+X+C;
	if(max=C)
		sum=A+B+X;
	printf("%d",sum);

	return 0;
}

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

#include <stdio.h>
int main()
{
	int A,B,C,K,i,X,max,sum;
	scanf("%d",&A);
	scanf("%d",&B);
	scanf("%d",&C);
	scanf("%d",&K);
	max=A;
	if(max<B)
		max=B;
	if(max<C)
		max=C;
	X=max
	for (int i = 0; i < K; ++i)
	{
		X*=2;
	}
	if(max=A)
		sum=X+B+C;
	if(max=B)
		sum=A+X+C;
	if(max=C)
		sum=A+B+X;
	printf("%d",sum);

	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:14: error: expected ';' before 'for'
   14 |         X=max
      |              ^
      |              ;
   15 |         for (int i = 0; i < K; ++i)
      |         ~~~   
a.cc:15:35: error: expected ';' before ')' token
   15 |         for (int i = 0; i < K; ++i)
      |                                   ^
      |                                   ;
Language: C++

#include <stdio.h>
int main()
{
	int A,B,C,K,i,max,sum;
	scanf("%d,%d,%d",&A,&B,&C,);
	scanf("%d",&K);
	max=A;
	if(max<B)
		max=B;
	if(max<C)
		max=C;
	for (int i = 0; i < K; ++i)
	{
		max*=2;
	}
	if(max=A)
		sum=max+B+C;
	if(max=B)
		sum=A+max+C;
	if(max=C)
		sum=A+B+max;
	printf("%d",sum);

	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:35: error: expected primary-expression before ')' token
    5 |         scanf("%d,%d,%d",&A,&B,&C,);
      |                                   ^
Language: C++

#onclude<bits/stdc++.h>
using namespace std;
signed main(){
  int a[10000],b,c=0,d=0;
  for(int i=0;i<3;i++){
    cin>>a[i];
    c+=a[i];
    }
  sort(a,a+3);
    cin>>b;
    d=a[2];
  for(int i=0;i<b;i++){
    c+=b;
  }
  cout<<c<<"\n";
}


Compiler output:
a.cc:1:2: error: invalid preprocessing directive #onclude; did you mean #include?
    1 | #onclude<bits/stdc++.h>
      |  ^~~~~~~
      |  include
a.cc: In function 'int main()':
a.cc:6:5: error: 'cin' was not declared in this scope
    6 |     cin>>a[i];
      |     ^~~
a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
  +++ |+#include <iostream>
    1 | #onclude<bits/stdc++.h>
a.cc:9:3: error: 'sort' was not declared in this scope; did you mean 'short'?
    9 |   sort(a,a+3);
      |   ^~~~
      |   short
a.cc:10:5: error: 'cin' was not declared in this scope
   10 |     cin>>b;
      |     ^~~
a.cc:10:5: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:15:3: error: 'cout' was not declared in this scope
   15 |   cout<<c<<"\n";
      |   ^~~~
a.cc:15:3: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
Language: C++

#onclude<bits/stdc++.h>
using namespace std;
signed main(){
  int a,b,c=0,d=0;
  cin>>a;
  for(int i=0;i<a;i++){
    cin>>b;
    c+=b;
    d=max(d,b);
  }
  cout<<c+d<<"\n";
}

Compiler output:
a.cc:1:2: error: invalid preprocessing directive #onclude; did you mean #include?
    1 | #onclude<bits/stdc++.h>
      |  ^~~~~~~
      |  include
a.cc: In function 'int main()':
a.cc:5:3: error: 'cin' was not declared in this scope
    5 |   cin>>a;
      |   ^~~
a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
  +++ |+#include <iostream>
    1 | #onclude<bits/stdc++.h>
a.cc:9:7: error: 'max' was not declared in this scope
    9 |     d=max(d,b);
      |       ^~~
a.cc:11:3: error: 'cout' was not declared in this scope
   11 |   cout<<c+d<<"\n";
      |   ^~~~
a.cc:11:3: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int a, b, c, x, k, y;
 
int main (){
	cin >> a>> b>> c>>k;
	n= max(c,max(a,b));
	s= a+b+c-x;
	for(int i=1;i<=k;i++){
		x=2*n;
	}
	cout << x + y << endl;
	
	
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:9: error: 'n' was not declared in this scope; did you mean 'yn'?
    8 |         n= max(c,max(a,b));
      |         ^
      |         yn
a.cc:9:9: error: 's' was not declared in this scope
    9 |         s= a+b+c-x;
      |         ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
//define
#define int long long
#define vint vector<int>
#define rep(x,y) for(int i=x;i<y;i++)
#define REP(x,y) for(int j=x;j<y;j++)
#define all(x) x.begin(),x.end()
#define pb() push_back()
#define mod 100000007
#define elif else if
#define str string
//main
signed main(){
  int N,M,O,Q,count=0,count2=0,count3=0;
  vint A(3);
  cin>>A[0]>>A[1]>>A[2];
  cin>>Q;
  sort(all(A));
  rep(0,k){
    A[2]*=A[2];
  }
  cout<<A[0]+A[1]+A[2]<<endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:20:9: error: 'k' was not declared in this scope
   20 |   rep(0,k){
      |         ^
a.cc:6:32: note: in definition of macro 'rep'
    6 | #define rep(x,y) for(int i=x;i<y;i++)
      |                                ^
Language: C++

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

int main() {
int A; int B; int C; 
  cin>>A>>B>>C;
  int N; cin>>N;
  for(int i=0; i<N; i++){
  max(max(A,B),C)*=2
  }
cout<<A+B+C<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:18: error: assignment of read-only location 'std::max<int>((* & std::max<int>(A, B)), C)'
    9 |   max(max(A,B),C)*=2
      |   ~~~~~~~~~~~~~~~^~~
Language: C++

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

int main(){
  int a,b,c;
  int d;
    cin>>a>>b>>c;
  cin >> d;
  int e[15];
  int e[0] = max(max(a,b),c) ;
  
  for(int i=0; i<d;i++){
    e[i] *=2;
    e[i+1] = e[i];
  }
    cout <<a+b+c+e[d]-max(max(a,b),c)<<endl;
  }


Compiler output:
a.cc: In function 'int main()':
a.cc:10:7: error: conflicting declaration 'int e [0]'
   10 |   int e[0] = max(max(a,b),c) ;
      |       ^
a.cc:9:7: note: previous declaration as 'int e [15]'
    9 |   int e[15];
      |       ^
Language: C++

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

int main(){
  int a,b,c;
  int d;
    cin>>a>>b>>c;
  cin >> d;
  int e[15]
  int e[0] = max(max(a,b),c) ;
  
  for(int i=0; i<d;i++){
    e[i] *=2;
    e[i+1] = e[i];
  }
    cout <<a+b+c+e[d]-max(max(a,b),c)<<endl;
  }

Compiler output:
a.cc: In function 'int main()':
a.cc:10:3: error: expected initializer before 'int'
   10 |   int e[0] = max(max(a,b),c) ;
      |   ^~~
a.cc:13:5: error: 'e' was not declared in this scope
   13 |     e[i] *=2;
      |     ^
a.cc:16:18: error: 'e' was not declared in this scope
   16 |     cout <<a+b+c+e[d]-max(max(a,b),c)<<endl;
      |                  ^
Language: C++

#include <iostream>
using namespace std;
#define K 10
#define ll long long
int dp[K+1][K+1][K+1];

ll a, b, c;
int k;

ll solve(int pa, int pb, int pc)
{
	if(dp[pa][pb][pc]==-1)
	{
		if((pa + pb + pc) == k)
		{
			dp[pa][pb][pc] = ((1LL<<pa)*a)+((1LL<<pb)*b)+((1LL<<pc)*c);
		}
		else
		{
			dp[pa][pb][pc] = max({solve(pa+1,pb,pc), solve(pa,pb+1,pc),
						solve(pa,pb,pc+1)});
		}
	}
	return dp[pa][pb][pc];
}

int main() {
	cin >> a >> b >> c >> k;
	memset(&dp,-1,sizeof(dp));
	cout << solve(0,0,0) << endl;
	return 0;
}

Compiler output:
a.cc: In function 'long long int solve(int, int, int)':
a.cc:20:45: error: no matching function for call to 'max(<brace-enclosed initializer list>)'
   20 |                         dp[pa][pb][pc] = max({solve(pa+1,pb,pc), solve(pa,pb+1,pc),
      |                                          ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   21 |                                                 solve(pa,pb,pc+1)});
      |                                                 ~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/14/string:51,
                 from /usr/include/c++/14/bits/locale_classes.h:40,
                 from /usr/include/c++/14/bits/ios_base.h:41,
                 from /usr/include/c++/14/ios:44,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_algobase.h:257:5: note: candidate: 'template<class _Tp> constexpr const _Tp& std::max(const _Tp&, const _Tp&)'
  257 |     max(const _Tp& __a, const _Tp& __b)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:257:5: note:   candidate expects 2 arguments, 1 provided
/usr/include/c++/14/bits/stl_algobase.h:303:5: note: candidate: 'template<class _Tp, class _Compare> constexpr const _Tp& std::max(const _Tp&, const _Tp&, _Compare)'
  303 |     max(const _Tp& __a, const _Tp& __b, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:303:5: note:   candidate expects 3 arguments, 1 provided
a.cc: In function 'int main()':
a.cc:29:9: error: 'memset' was not declared in this scope
   29 |         memset(&dp,-1,sizeof(dp));
      |         ^~~~~~
a.cc:2:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    1 | #include <iostream>
  +++ |+#include <cstring>
    2 | using namespace std;
Language: C++

#include<iostream>
using namespace std;

int main(){
	int a, b, c, k;
	int max;
	int org_max;
	int sum;
	cin >> a >> b >> c >> k;
	max = max(c, max(a, b));
	org_max = max;
	sum = a + b + c;
	for(int i = 0; i < k; i++){
		max *= 2;
	}
	sum += max - org_max;
	cout << sum;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:25: error: 'max' cannot be used as a function
   10 |         max = max(c, max(a, b));
      |                      ~~~^~~~~~
a.cc:10:31: error: 'max' cannot be used as a function
   10 |         max = max(c, max(a, b));
      |                               ^
Language: C++

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

int main(){
  vector<int> x(4,0);
  REP(i,4) cin>>x.at(i);
  sort(x.begin(),x.begin()+2);
  cout<<accumulate(x.begin(),x.begin()+2,x.(int)(at(2)*pow(2,x.at(3))));
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:44: error: expected unqualified-id before '(' token
    9 |   cout<<accumulate(x.begin(),x.begin()+2,x.(int)(at(2)*pow(2,x.at(3))));
      |                                            ^
a.cc:9:45: error: expected primary-expression before 'int'
    9 |   cout<<accumulate(x.begin(),x.begin()+2,x.(int)(at(2)*pow(2,x.at(3))));
      |                                             ^~~
a.cc:9:50: error: 'at' was not declared in this scope
    9 |   cout<<accumulate(x.begin(),x.begin()+2,x.(int)(at(2)*pow(2,x.at(3))));
      |                                                  ^~
Language: C++

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

#define DEBUG(x) cout << '>' << #x << ':' << x << endl;
#define mem(x,val) memset((x),(val),sizeof(x))
#define all(x) x.begin(),x.end()
#define pb push_back
#define mp make_pair
#define PI acos(-1.0) 
#define N 111111

const int INF = 1 << 30 ;
typedef long long ll ;
typedef pair < int , int > pii ;

int powOf2(int n) {
  if (n == 0) return 1 ;

  int result = powOf2(n/2) ;
  result = result*result ;

  if(n&1) result*=2 ;
  return result ;
}

int main() {
  int a, b, c ,k;
  cin >> a >> b >> c >> k ;

  if(a<b) swap(a,b) ;
  if(a<c)swap(a,c) ;

  int temp = powOf2(k) ;
  ll result = temp*a + b + c ;
  cout << result << endl ;
	
  return 0 ;
}

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

#define DEBUG(x) cout << '>' << #x << ':' << x << endl;
#define mem(x,val) memset((x),(val),sizeof(x))
#define all(x) x.begin(),x.end()
#define pb push_back
#define mp make_pair
#define PI acos(-1.0) 
#define N 111111

const int INF = 1 << 30 ;
typedef long long ll ;
typedef pair < int , int > pii ;

int powOf2(int n) {
  if (n == 0) return 1 ;

  int result = powOf2(n/2) ;
  result = result*result ;

  if(n&1) result*=2 ;
  return result ;
}

int main() {
  int a, b, c ,k;
  cin >> a >> b >> c >> k ;

  if(a<b) swap(a,b) ;
  if(a<c)swap(a,c) ;

  int temp = powOf2(k) ;
  ll result = temp*a + b + c ;
  cout << result << endl ;
	
  return 0 ;
}

Compiler output:
a.cc:51:11: error: redefinition of 'const int INF'
   51 | const int INF = 1 << 30 ;
      |           ^~~
a.cc:12:11: note: 'const int INF' previously defined here
   12 | const int INF = 1 << 30 ;
      |           ^~~
a.cc:55:5: error: redefinition of 'int powOf2(int)'
   55 | int powOf2(int n) {
      |     ^~~~~~
a.cc:16:5: note: 'int powOf2(int)' previously defined here
   16 | int powOf2(int n) {
      |     ^~~~~~
a.cc:65:5: error: redefinition of 'int main()'
   65 | int main() {
      |     ^~~~
a.cc:26:5: note: 'int main()' previously defined here
   26 | int main() {
      |     ^~~~
Language: C++

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

int main() {
  int a,b,c,n;
  cin >>a>>b>>c>>n;
  int max;
  if(a >=b && a>=c){
    for(int i=0;i<n;i++){
      a=a*2;
    }
  }
  if(b >=a && b>=c){
    for(int i=0;i<n;i++){
      b=b*2;
    }
      }
  if(c >=b && c>=a){
    for(int i=0;i<n;i++){
      c=c*2;
    }
          }
  if(a==b &&b=c){
    for(int i=0;i<n;i++){
      a=a/2;
      b=b/2;
      c=c/2;
    }
  }
  cout << a+b+c <<endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:23:11: error: lvalue required as left operand of assignment
   23 |   if(a==b &&b=c){
      |      ~~~~~^~~
Language: C++

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

int main() {
  int a,b,c,d;
  cin >>a>>b>>c>>d;
  int max;
  if(a >=b && a>=c){
    for(int i=0;i<n;i++){
      a=a*2;
    }
  }
  if(b >=a && b>=c){
    for(int i=0;i<n;i++){
      b=b*2;
    }
      }
  if(c >=b && c>=a){
    for(int i=0;i<n;i++){
      c=c*2;
    }
          }
  if(a==b &&b=c){
    for(int i=0;i<n;i++){
      a=a/2;
      b=b/2;
      c=c/2;
    }
  }
  cout << a+b+c <<endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:9:19: error: 'n' was not declared in this scope
    9 |     for(int i=0;i<n;i++){
      |                   ^
a.cc:14:19: error: 'n' was not declared in this scope
   14 |     for(int i=0;i<n;i++){
      |                   ^
a.cc:19:19: error: 'n' was not declared in this scope
   19 |     for(int i=0;i<n;i++){
      |                   ^
a.cc:23:11: error: lvalue required as left operand of assignment
   23 |   if(a==b &&b=c){
      |      ~~~~~^~~
a.cc:24:19: error: 'n' was not declared in this scope
   24 |     for(int i=0;i<n;i++){
      |                   ^
Language: C++

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

#include<cstdio>
#define r(i,n) for(int i=0;i<n;i++)

int main(void){
  int a,b,c,k;
  cin>>a>>b>>c>>k;
  long long maxi= max(a,b);
  maxi=max(maxi,c);
  
  long long sum=a+b+c-maxi;
  r(i,k)maxi*=2;
  cout<<sum+maxi<<endl;


return 0;}


Compiler output:
a.cc: In function 'int main()':
a.cc:12:11: error: no matching function for call to 'max(long long int&, int&)'
   12 |   maxi=max(maxi,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: 'template<class _Tp> constexpr const _Tp& std::max(const _Tp&, const _Tp&)'
  257 |     max(const _Tp& __a, const _Tp& __b)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:257:5: note:   template argument deduction/substitution failed:
a.cc:12:11: note:   deduced conflicting types for parameter 'const _Tp' ('long long int' and 'int')
   12 |   maxi=max(maxi,c);
      |        ~~~^~~~~~~~
/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:12:11: note:   mismatched types 'std::initializer_list<_Tp>' and 'long long int'
   12 |   maxi=max(maxi,c);
      |        ~~~^~~~~~~~
Language: C

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


int main(int argc, char const *argv[])
{
	int a,b,c,k;
    cin>>a>>b>>c;
    cin>>k;
    int acum=0;
    for(int i=1;i<=k;i++){
    	int maxi=max(a,max(b,c));
	    if(maxi==a){a=2*a;acum=a+b+c;		}
	    else if (maxi==b){b=b*2;acum=a+b+c;}
	    else {c=c*2;acum=a+b+c;}
	}
    cout<<acum;
   return 0;
}

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

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

int main(){	
	long long int a,b,c,suma;
	vector<long long int >x(3);
	int veces;
	
	scanf("%lld%lld%lld%d",&x[0],&x[1],&x[2],&veces);
	sort(x.begin(),x.end());
	for(int i=0; i<veces; i++)
	     x[2]+=x[2];
        int suma=x[0]+x[1]+x[2];
	printf("%lld\n",suma);
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:13: error: conflicting declaration 'int suma'
   13 |         int suma=x[0]+x[1]+x[2];
      |             ^~~~
a.cc:5:29: note: previous declaration as 'long long int suma'
    5 |         long long int a,b,c,suma;
      |                             ^~~~
Language: C++

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:10:12: error: request for member 'begin' in 'a', which is of non-class type 'int [3]'
   10 |     sort(a.begin(),a.end());
      |            ^~~~~
a.cc:10:22: error: request for member 'end' in 'a', which is of non-class type 'int [3]'
   10 |     sort(a.begin(),a.end());
      |                      ^~~
Language: C++

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

int main(){
  int A,B,C,K;
  cin >>A>>B>>C>>K;
  
  int M = max({A,B,C})
  int sum = A+B+C - M;
  rep(i,0,K) M *= 2;
  
  int ans = sum + M;
  cout <<ans<< endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:3: error: expected ',' or ';' before 'int'
   10 |   int sum = A+B+C - M;
      |   ^~~
a.cc:13:13: error: 'sum' was not declared in this scope
   13 |   int ans = sum + M;
      |             ^~~
Language: C++

C:\Users\81803\CLionProjects\AtCoder\cmake-build-debug\atcoder2.exe
1 1 1 2
6

Process finished with exit code 0


Compiler output:
a.cc:1:3: error: stray '\' in program
    1 | C:\Users\81803\CLionProjects\AtCoder\cmake-build-debug\atcoder2.exe
      |   ^
a.cc:1:9: error: stray '\' in program
    1 | C:\Users\81803\CLionProjects\AtCoder\cmake-build-debug\atcoder2.exe
      |         ^
a.cc:1:15: error: stray '\' in program
    1 | C:\Users\81803\CLionProjects\AtCoder\cmake-build-debug\atcoder2.exe
      |               ^
a.cc:1:29: error: stray '\' in program
    1 | C:\Users\81803\CLionProjects\AtCoder\cmake-build-debug\atcoder2.exe
      |                             ^
a.cc:1:37: error: stray '\' in program
    1 | C:\Users\81803\CLionProjects\AtCoder\cmake-build-debug\atcoder2.exe
      |                                     ^
a.cc:1:55: error: stray '\' in program
    1 | C:\Users\81803\CLionProjects\AtCoder\cmake-build-debug\atcoder2.exe
      |                                                       ^
a.cc:1:2: error: found ':' in nested-name-specifier, expected '::'
    1 | C:\Users\81803\CLionProjects\AtCoder\cmake-build-debug\atcoder2.exe
      |  ^
      |  ::
a.cc:1:1: error: 'C' does not name a type
    1 | C:\Users\81803\CLionProjects\AtCoder\cmake-build-debug\atcoder2.exe
      | ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define rrep(i, n) for (int i = (int)(n); i >= 0; i--)
#define FOR(i, m, n) for(int i = m; i < n; i++)	
#define SORT(c) sort((c).begin(),(c).end())
#define REVERSE(c) reverse((c).begin(),(c).end())
#define REVSORT(c) SORT(c);REVERSE(c)
#define ALL(x) (x).begin(),(x).end()
#define LOOP while(true)
#define INF 1e9
const long long MOD = 1000000007;
typedef long long ll;

int main(void){
	int a, b, c, k;
	cin >> a >> b >> c >> k;
	int M = max(max(a, b), c);
	rep(i, K)M *= 2;
	int ans = a + b + c + M - max(max(a, b), c);
	cout << ans << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:19:16: error: 'K' was not declared in this scope
   19 |         rep(i, K)M *= 2;
      |                ^
a.cc:3:45: note: in definition of macro 'rep'
    3 | #define rep(i, n) for (int i = 0; i < (int)(n); i++)
      |                                             ^
Language: C++

#include <bits/stdc++.h>
#define int long long
#define rep(i,n) for(int i=0;i<n;++i)
#define all(a) a.begin(),a.end()
#define P pair<long long,long long>
#define double long double
using namespace std;
signed main(){
  int a,b,c,f;
  cin>>a>>b>>c;
  cin>>f;
  int d=max(a,b);
    int e=max(d,c);
  int g=e;
  rep(i,f)
    e*=2
    cout<<a+b+c-g+e;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:16:9: error: expected ';' before 'cout'
   16 |     e*=2
      |         ^
      |         ;
   17 |     cout<<a+b+c-g+e;
      |     ~~~~
Language: C++

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:7:24: error: expected primary-expression before '{' token
    7 |     cout<<max({a,b,c})*{pow(2,k)-1}+a+b+c<<endl;
      |                        ^
a.cc:7:42: error: invalid operands of types 'int' and '<unresolved overloaded function type>' to binary 'operator<<'
    7 |     cout<<max({a,b,c})*{pow(2,k)-1}+a+b+c<<endl;
      |                                    ~~~~~~^~~~~~