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

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

int main() {
    int H, W;
    char s[60][60];
    int dx[4] = {1, -1, 0, 0};
    int dy[4] = {0, 0, 1 ,-1};
    cin >> H >> W;
    for (int i = 0; i < W; i++) {
        scanf("%s", &s[]);
    }

    bool can = true;
    for (int i = 0; i < H; i++) {
        for (int j = 0; j < W; j++) {
            bool found = false;
            for (int k = 0; k < 4; k++) {
                int i2 = i + dx[k];
                int j2 = j + dy[k];
                if (i2 >= 0 && i2 < H && j2 >= 0 && j2 < W && s[i2][j2] == '#') {
                    found = true;
                }
            }
            if (!found) can = false;
        }
    }
    if (can) cout << "Yes" << endl;
    else cout << "No" << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:24: error: expected primary-expression before ']' token
   11 |         scanf("%s", &s[]);
      |                        ^
Language: C++

#include <iostream>
/*#include <stdio.h>
#include <string.h>
#include <vector>
#include <cassert>
#include <algorithm>
#include <functional>
*/ 
using namespace std;
 
int main() {
	int a, b, c,E, F;
	int K;
	cin >> a >> b >> c;
	cin >> K;
	if (a == b && b == c) {
		for (int i = 0; i < K; i++) {
			a *= 2;
		}	
		cout << a + b + c<< endl;	
	} else {
		int ans = max({a, b, c});
		if (ans == a) {
			E = b;
			F = c;
		} else if (ans == b) {
			E = a;
			F = c;
		} else if (ans == c) {
			E = a;
			F = b;
		}
		for (int j = 0; j < K; j++) {
			ans = ans * 2;
		}
		cout << ans + E + F << endl;
	}
	return 0;
}

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

#include <bits/stdc++.h>
using namespace std;
int main()
{
	int i,j,n=0,m=0,d=0,a,b,c,k,num=0;
	scanf("%d %d %d",&a,&b,&c);
	scanf("%d",&k);
	if(a>=b&&a>=c)
	{
		for(i=0;i<n;i++)
			a*=2;
	}
	else if(b>a&&b>c)
	{
		for(i=0;i<n;i++)
			b*=2;
	}
	else if(c>a&&c>b)
	{
		for(i=0;i<n;i++)
			c*=2;
	}

	}
	num=a+b+c; 
	printf("%d",num);
}



Compiler output:
a.cc:25:9: error: 'num' does not name a type; did you mean 'enum'?
   25 |         num=a+b+c;
      |         ^~~
      |         enum
a.cc:26:15: error: expected constructor, destructor, or type conversion before '(' token
   26 |         printf("%d",num);
      |               ^
a.cc:27:1: error: expected declaration before '}' token
   27 | }
      | ^
Language: C++

#include<iostream>
using namespace std;
int main()
{
int a[3];
for(int i=0;i<3;i++)
cin>>a[i];
sort(a,a+3);
const y=a[0]+a[1]+a[2];
int k;
cin>>k;
int j[k];
for(int i=0;i<k;i++)
{
j[i]=2;
a[2]=a[2]*j[i];
}
cout<<a[2]+a[1]+a[0]-y+a[1]+a[0];
system ("pause");
return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:1: error: 'sort' was not declared in this scope; did you mean 'short'?
    8 | sort(a,a+3);
      | ^~~~
      | short
a.cc:9:7: error: 'y' does not name a type
    9 | const y=a[0]+a[1]+a[2];
      |       ^
a.cc:18:22: error: 'y' was not declared in this scope
   18 | cout<<a[2]+a[1]+a[0]-y+a[1]+a[0];
      |                      ^
Language: C++

#include<iostream>
#include<math.h>
using namespace std;
int main(void)
{
  int A;
  int B;
  int C;
  int K;
  int max;
  cin >> A >> B >> C;
  cin >> K;
  max = A;
  if(max<=B){
    max = B;
  }
  if(max<=C){
    max = C;
  }
  double x = 2;
  double y = 0;
  double a = K;
  y = pow(x,a);
  int X;
  X = max*=y;
  if(A!=max){
      X+=A;
    }
  if(B!=max || A=max){
    X+=B;
  }
  if(C!=max || A=max || B=max){
    X+=C;
  }
  cout << X;
  getchar();
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:29:13: error: lvalue required as left operand of assignment
   29 |   if(B!=max || A=max){
      |      ~~~~~~~^~~~
a.cc:32:22: error: lvalue required as left operand of assignment
   32 |   if(C!=max || A=max || B=max){
      |                  ~~~~^~~~
Language: C++

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

int max_sum (int a, int b, int c, int k);
int main()
{
  int a, b, c;
  int k;
  cin >> a >> b >> c;
  cin >> k;
  int m = max_sum(a, b, c, k);
  cout << m << endl;
}

int max_sum (int a, int b, int c, int k)
{
  int sum;
  int r = std::pow(2, k);
  if((a - b >= 0) && (a - c >= 0)) {
    sum = 2 * r * a + b + c; 
  } else if ((b - a >= 0) && (b - c >= 0)) {
    sum = 2 * r * b + a + c; 
  } else {
    sum = 2 * r * c + a + b; 
  }

  return sum;
}

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

#include<iostream>
using namespace std;
int main()
{
int a,b,c;
int p[k];
cin>>a>>b>>c;
int k;
cin>>k;
int p[k];
const x=a+b+c;
if(a>b && a>c)
{
for(int i=0;i<k;i++)
{
p[i]=2;
a=a*p[i];
}
cout<<a+b+c-x+b+c;
system ("pause");
return 0;
}
if(b>a && b>c)
{
for(int i=0;i<k;i++)
{
p[i]=2;
b=b*p[i];
}
cout<<a+b+c-x+a+c;
system ("pause");
return 0;
}
if(c>a && c>b)
{
for(int i=0;i<k;i++)
{
p[i]=2;
c=c*p[i];
}
cout<<c+b+a-x+a+b;
system ("pause");
return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:7: error: 'k' was not declared in this scope
    6 | int p[k];
      |       ^
a.cc:11:7: error: 'x' does not name a type
   11 | const x=a+b+c;
      |       ^
a.cc:16:1: error: 'p' was not declared in this scope
   16 | p[i]=2;
      | ^
a.cc:19:13: error: 'x' was not declared in this scope
   19 | cout<<a+b+c-x+b+c;
      |             ^
a.cc:27:1: error: 'p' was not declared in this scope
   27 | p[i]=2;
      | ^
a.cc:30:13: error: 'x' was not declared in this scope
   30 | cout<<a+b+c-x+a+c;
      |             ^
a.cc:38:1: error: 'p' was not declared in this scope
   38 | p[i]=2;
      | ^
a.cc:41:13: error: 'x' was not declared in this scope
   41 | cout<<c+b+a-x+a+b;
      |             ^
a.cc:44:2: error: expected '}' at end of input
   44 | }
      |  ^
a.cc:4:1: note: to match this '{'
    4 | {
      | ^
Language: C++

#include <iostream>

using namespace std;

int max_sum (int a, int b, int c, int k);
int main()
{
  int a, b, c;
  int k;
  cin >> a >> b >> c;
  cin >> k;
  int m = max_sum(a, b, c, k);
  cout << m << endl;
}

int max_sum (int a, int b, int c, int k)
{
  int sum;
  int k = pow(2, k);
  if((a - b >= 0) && (a - c >= 0)) {
    sum = 2 * k * a + b + c; 
  } else if ((b - a >= 0) && (b - c >= 0)) {
    sum = 2 * k * b + a + c; 
  } else {
    sum = 2 * k * c + a + b; 
  }

  return sum;
}

Compiler output:
a.cc: In function 'int max_sum(int, int, int, int)':
a.cc:19:7: error: declaration of 'int k' shadows a parameter
   19 |   int k = pow(2, k);
      |       ^
a.cc:16:39: note: 'int k' previously declared here
   16 | int max_sum (int a, int b, int c, int k)
      |                                   ~~~~^
a.cc:19:11: error: 'pow' was not declared in this scope
   19 |   int k = pow(2, k);
      |           ^~~
Language: Java

import java.util.Scanner;

public 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();
        double k = (double)sc.nextInt();


        if (Math.max(Math.max(a,b), c) == c){
            System.out.println(((int)(a+b+c*Math.pow(2, k)));
        }else if (Math.max(Math.max(a, b), c) == b){
            System.out.println((int)(a+b*Math.pow(2, k)+c));
        }else{
            System.out.println((int)(b+c+a*Math.pow(2, k));
        }
    }
}

Compiler output:
Main.java:14: error: ')' or ',' expected
            System.out.println(((int)(a+b+c*Math.pow(2, k)));
                                                            ^
Main.java:18: error: ')' or ',' expected
            System.out.println((int)(b+c+a*Math.pow(2, k));
                                                          ^
2 errors
Language: C++

#include<iostream>
#include<math.h>
using namespace std;
int main(void)
{
  int A;
  int B;
  int C;
  int K;
  int max;
  cin >> A >> B >> C;
  cin >> K;
  max = A;
  if(max<=B){
    max = B;
  }
  if(max<=C){
    max = C;
  }
  double x = 2;
  double y = 0;
  double a = K;
  y = pow(x,a);
  int X;
  X = max*=y
  if(A!=max){
      X+=A;
    }
  if(B!=max){
    X+=B;
  }
  if(C!=max){
    X+=C;
  }
  cout << X;
  gerchar();
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:25:13: error: expected ';' before 'if'
   25 |   X = max*=y
      |             ^
      |             ;
   26 |   if(A!=max){
      |   ~~         
a.cc:36:3: error: 'gerchar' was not declared in this scope; did you mean 'getchar'?
   36 |   gerchar();
      |   ^~~~~~~
      |   getchar
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
	long long a,b,c,k,max,hehe;
	cin>>a>>b>>c>>k;
	if(a>=b)
		if(a>=c)
			max=a;
			hehe=b+c;
		else
			max=c;
			hehe=b+a;
	else if(a<b)
			if(b<=c)
				max=b;
				hehe=a+c;
			else
			max=c;
			hehe=b+a;
	for(int i=0;i<k;i++){
		max=max*2;
	}
	cout<<max+hehe;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:17: error: 'else' without a previous 'if'
   10 |                 else
      |                 ^~~~
a.cc:13:9: error: 'else' without a previous 'if'
   13 |         else if(a<b)
      |         ^~~~
a.cc:17:25: error: 'else' without a previous 'if'
   17 |                         else
      |                         ^~~~
Language: C++

#include<iostream>
#include<vector>
#include<string>
#include<set>
#include<map>
#include<algorithm>
#include<queue>
#include<list>
#include<stack>
#include<cstdio>
#include<fstream>
#include<numeric>
#include<functional>
#include<utility>
#include<memory>
#include <cstring>
#include<bits/stdc++.h>
using namespace std;   
int main()
{
	int a,b,c,k,mx,sum=0;
	cin>>a>>b>>c>>k;
	sum=a+b+c-max(a,max(b,c));
	mx=a+b+c-sum;
	for (int i=1;i<=k;i++) mx*=2;
	cout<<sum+mx；
	return 0;
} 

Compiler output:
a.cc: In function 'int main()':
a.cc:26:19: error: 'mx\U0000ff1b' was not declared in this scope
   26 |         cout<<sum+mx；
      |                   ^~~~
Language: C

#include <stdio.h>

int main (void)
{
  int a, b, c, k = 0;
  
  scanf_s("%d %d %d", &a, &b, &c);
  
  scanf_s("%d", &k);
  
  while(k!=0)
  {
    if(a < b)
  {
     if(a<c)
     {
        if(c<b)
        {
           b*=2;
        } else
        {
              c*=2;
           }
     } else
     {
           b*=2;
        }
  } else
   {
      if(b<c)
      {
         if(a<c)
         {
            c*=2;
         } else
         {
            a*=2;
         }
      } else
      {
         a*=2;
      }
   }
   
   k--;
}


    if(a < b)
  {
     if(a<c)
     {
        if(c<b)
        {
           printf("%d", b);
        } else
        {
              printf("%d", c);
           }
     } else
     {
           printf("%d", b);
        }
  } else
   {
      if(b<c)
      {
         if(a<c)
         {
            printf("%d", c);
         } else
         {
            printf("%d", a);
         }
      } else
      {
         printf("%d", a);
      }
   }
   
   return 0;
}

Compiler output:
main.c: In function 'main':
main.c:7:3: error: implicit declaration of function 'scanf_s'; did you mean 'scanf'? [-Wimplicit-function-declaration]
    7 |   scanf_s("%d %d %d", &a, &b, &c);
      |   ^~~~~~~
      |   scanf
Language: C++

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

using namespace std;

int p(int k) {
	if (k == 1)return 2; else return 2 * p(k - 1);
}


int main(void) {
	int a, b, c,k;
	cin >> a >> b >> c >> k;
	int m = max(a, b, c);

	cout << a + b + c + m*(p(k) - 1);
	return 0;
}

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

using namespace std;

int main(void) {
	int a, b, c,k;
	cin >> a >> b >> c >> k;
	int m = max(a, b, c);

	cout << a + b + c + m*(pow(2, k) - 1);
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:32: error: 'pow' was not declared in this scope
   12 |         cout << a + b + c + m*(pow(2, 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: In instantiation of 'constexpr const _Tp& std::max(const _Tp&, const _Tp&, _Compare) [with _Tp = int; _Compare = int]':
a.cc:10:13:   required from here
   10 |         int m = 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> 

using namespace std;


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

Compiler output:
a.cc: In function 'int main()':
a.cc:9:5: error: declaration does not declare anything [-fpermissive]
    9 |     int ;
      |     ^~~
Language: Java

my @e = split(/\s/, <STDIN>);
chomp(my $k = <STDIN>);

my $sum = 0, $max = 0;
for (@e) {
    $sum += $_;
    $max = $_ if $max < $_;
}
print $sum - $max + $max * (1<<$k), "\n";


Compiler output:
Main.java:1: error: class, interface, enum, or record expected
my @e = split(/\s/, <STDIN>);
^
Main.java:1: error: class, interface, enum, or record expected
my @e = split(/\s/, <STDIN>);
      ^
Main.java:1: error: illegal character: '\'
my @e = split(/\s/, <STDIN>);
               ^
Main.java:2: error: class, interface, enum, or record expected
chomp(my $k = <STDIN>);
^
Main.java:4: error: unnamed classes are a preview feature and are disabled by default.
my $sum = 0, $max = 0;
^
  (use --enable-preview to enable unnamed classes)
Main.java:5: error: class, interface, enum, or record expected
for (@e) {
^
Main.java:5: error: class, interface, enum, or record expected
for (@e) {
       ^
Main.java:7: error: class, interface, enum, or record expected
    $max = $_ if $max < $_;
    ^
Main.java:8: error: class, interface, enum, or record expected
}
^
9 errors
Language: Java

import java.util.*;
public 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();
		
		for(int i = 0; i < K; i++){
			if(A > B && A > C){
				A = A*2;
			}
			if(B > A && B > C){
				B = B*2;
			}
			if(C > A && C > B){
				C = C*2;
			}
			
			if(A = C || A = B){
				A = A*2;
			}
			
			if(B = C){
				B = B * 2;
			}
		}
		int S = A + B + C;
		System.out.println(S);
	}
}


Compiler output:
Main.java:22: error: bad operand types for binary operator '||'
			if(A = C || A = B){
			         ^
  first type:  int
  second type: int
Main.java:22: error: incompatible types: int cannot be converted to boolean
			if(A = C || A = B){
			     ^
Main.java:26: error: incompatible types: int cannot be converted to boolean
			if(B = C){
			     ^
3 errors
Language: Java

import java.util.Scanner;
public class Main1 {
	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();

			if(a <b) {
				if(b<c) {
					K(c,a,b,k);
				}else {
					K(b,a,c,k);
				}
			}else {
				if(c<a) {
					K(a,b,c,k);
				}else {
					K(c,a,b,k);
				}
			}
	}
	public static void K(int x,int y,int z,int k) {
		for(int j = 0; j<k ;j++) {
			x +=x;
		}
		System.out.println(x+y+z);
	}
}


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

#include <stdio.h>

int main (void)
{
  int a, b, c, k = 0;
  
  scanf_s("%d %d %d", &a, &b, &c);
  
  scanf_s("%d", &k);
  
  while(k!=0)
  {
    if(a < b)
  {
  	if(a<c)
  	{
  		if(c<b)
  		{
  			b*=2;
		  } else
		  {
		  		c*=2;
		  	}
	  } else
	  {
	  		b*=2;
	  	}
  } else
	{
		if(b<c)
		{
			if(a<c)
			{
				c*=2;
			} else
			{
				a*=2;
			}
		} else
		{
			a*=2;
		}
	}
	
	k--;
}


    if(a < b)
  {
  	if(a<c)
  	{
  		if(c<b)
  		{
  			printf("%d", b);
		  } else
		  {
		  		printf("%d", c);
		  	}
	  } else
	  {
	  		printf("%d", b);
	  	}
  } else
	{
		if(b<c)
		{
			if(a<c)
			{
				printf("%d", c);
			} else
			{
				printf("%d", a);
			}
		} else
		{
			printf("%d", a);
		}
	}
	
	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:7:3: error: implicit declaration of function 'scanf_s'; did you mean 'scanf'? [-Wimplicit-function-declaration]
    7 |   scanf_s("%d %d %d", &a, &b, &c);
      |   ^~~~~~~
      |   scanf
Language: C++

#include<iostream>
using namespace std;

int main(){

	int a[3],k;
	cin >> a[0] >> a[1] >> a[2] >> k;
	sort(a,a+3);
	int K = a[2];
	for(int i = 0; i < k; i++){
		K = 2 * K;
	}
	cout << K + a[0] + a[1] <<endl;



}


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

#include<bits/stdc++.h>
using namespace std;
int main()
{
	int a;
	int b;
	int c;
	int k;
	int s=0;
	cin>>a>>b>>c>>k;
	int t=max(a,max(b,c));
	if(a!=t)
		s+=a;
	if(b!=t)
		s+=b;
	if(c!=t)
		s+=c;
	for(int i=0;i<k;i++)
	{
		t*=2
	}
	s+=t;
	cout<<s;
	return 0;
} 

Compiler output:
a.cc: In function 'int main()':
a.cc:20:21: error: expected ';' before '}' token
   20 |                 t*=2
      |                     ^
      |                     ;
   21 |         }
      |         ~
Language: Java


import java.util.*;
import java.lang.*;
import java.io.*;

/* Name of the class has to be "Main" only if the class is public. */
class Ideone
{
	public static void main (String[] args) throws java.lang.Exception
	{
		Scanner sc = new Scanner(System.in);
		Queue<Integer> pq = new PriorityQueue<>(Collections.reverseOrder());
		
		pq.add(sc.nextInt());
		pq.add(sc.nextInt());
		pq.add(sc.nextInt());
		
		int q  = sc.nextInt();
		while(q-->0){
			pq.add(2*pq.poll());
		}
		int ans = 0;
		while(pq.size()>0){
			ans+=pq.poll();
		}
		System.out.println(ans)
		// your code goes here
	}
}

Compiler output:
Main.java:26: error: ';' expected
		System.out.println(ans)
		                       ^
1 error
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main()
{
	long long a,b,c,k,i,d,e;
	cin>>a>>b>>c;
	cin>>k;
	if(a<b<c)
	{
		for(i=1;i<=k;i++)
		{
			c=c*2;
			d=a+b+c;
		}
		
		cout<<d<<endl;
	}
	else{
		if(a<c<b)
	{
		for(i=1;i<=k;i++)
		{
			b=b*2;
			d=a+b+c;
		}
		
		cout<<d<<endl;
	}
	else{
		if(b<a<c)
	{
		for(i=1;i<=k;i++)
		{
			c=c*2;
			d=a+b+c;
		}
		
		cout<<d<<endl;
	}
	else{
		if(c<b<a)
	{
		for(i=1;i<=k;i++)
		{
			a=a*2;
			d=a+b+c;
		}
		
		cout<<d<<endl;
	}
	else{
		if(b<c<a)
	{
		for(i=1;i<=k;i++)
		{
			a=a*2;
			d=a+b+c;
		}
		
		cout<<d<<endl;
	}
	else{
		if(c<a<b)
	{
		for(i=1;i<=k;i++)
		{
			b*2;
			d=a+b+c;
		}
		
		cout<<d<<endl;
		else
		{
			if(c=a=b)
	{
		for(i=1;i<=k;i++)
		{
			b*2;
			d=a+b+c;
		}
		
		cout<<d<<endl;
		}
	}
	}
	}
	}
	}
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:72:17: error: expected '}' before 'else'
   72 |                 else
      |                 ^~~~
a.cc:64:9: note: to match this '{'
   64 |         {
      |         ^
Language: C++

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

#define rep(i, n) REP(i, 0, n)
#define REP(i,k,n) for(int i = k; i < n; i++)
//#define sum(start, end) accumulate(start, end, 0)
#define mmax(start, end) *max_element(start, end)
#define mmin(start, end) *min_element(start, end)
#define pb push_back
#define ALL(x) (x).begin(), (x).end()

typedef long long ll;
typedef string str;

using namespace std;
template<class T = ll> T in() {
    T _in;
    cin >> _in;
    return _in;
}

int choose (int a, int b, int c, int k) {
    if(k == 0)
        return a+b+c;

    return max(choose(a*2, b, c, k-1),
        max(choose(a, b*2, c, k-1), choose(a, b, c*2, k-1)));
}

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

    int ABC[3];
    rep(i, 3)
        ABC[i] = in<int>();
    int K=in<int>();

    // 再帰
    int res = choose(ABC[0], ABC[1], ABC[2]);

    cout << res << endl;

    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:40:21: error: too few arguments to function 'int choose(int, int, int, int)'
   40 |     int res = choose(ABC[0], ABC[1], ABC[2]);
      |               ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~
a.cc:22:5: note: declared here
   22 | int choose (int a, int b, int c, int k) {
      |     ^~~~~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main()
{
	int a;
	int b;
	int c;
	int k;
	int s=0;
	cin>>a>>b>>c>>k;
	int t=max(a,max(b,c));
	if(a!=t)
		s+=a;
	if(b!=t)
		s+=b;
	if(c!=t)
		s+=c;
	for(int i=0;i<k;i++)
	{
		s+=2*max(a,max(b,c));
		max(a,max(b,c))*=2;
	}
	cout<<s;
	return 0;
} 

Compiler output:
a.cc: In function 'int main()':
a.cc:21:32: error: assignment of read-only location 'std::max<int>(a, (* & std::max<int>(b, c)))'
   21 |                 max(a,max(b,c))*=2;
      |                 ~~~~~~~~~~~~~~~^~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main()
{
	int a;
	int b;
	int c;
	int k;
	int s=0;
	cin>>a>>b>>c>>k;
	int t=max(a,max(b,c));
	if(a!=t)
		s+=a;
	if(b!=t)
		s+=b;
	if(c!=t)
		s+=c;
	for(int i=0;i<k;i++)
	{
		s+=2*max(a,max(b,c));
		max(a,max(b,c))*=2
	}
	cout<<s;
	return 0;
} 

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

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

using namespace std;

int main() {
	vector<int> a(3);
	int K, c = 0;
	cin >> a.at(0) >> a.at(1) >> a.at(2) >>  K;
	int maxi = 0;
	for (int i = 0; i < 3; i++) {
		if (maxi < a.at(i)){
			maxi = a.at(i);
			 		
		}
		c += a.at(i);
	}
	int ans = 1;
	for (int j = 1; j =< K; j++)
		int ans = ans * 2;
	cout << c - maxi + maxi * ans << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:20:28: error: expected primary-expression before '<' token
   20 |         for (int j = 1; j =< K; j++)
      |                            ^
Language: C++

#include <iostream>
#include <stdio.h>
#include <string.h>
#include <vector>
#include <cassert>
#include <algorithm>
#include <functional>

using namespace std;

int main() {
	int a, b, c;
	int K;
	cin >> a >> b >> c;
	cin >> K;
	if (a == b && b == c) {
		for (int i = 0; i < K; i++) {
			a *= 2;
		}	
		cout << num[0] << endl;	
	} else {
		int ans = max({a, b, c});
		for (int j = 0; j < K; j++) {
			ans = ans * 2;
		}
		cout << ans << endl;
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:20:25: error: 'num' was not declared in this scope; did you mean 'enum'?
   20 |                 cout << num[0] << endl;
      |                         ^~~
      |                         enum
Language: C++

#include <iostream>
using namespace std;
int main()
{
    int A, B, C, K;
    cin >> A >> B >> C >> K;
    int ans = 0;
    for (int k1 = 0; k1 <= K; k1++) {
        const int a = A * (1 << K1);
        for (int k2 = 0; k1 + k2 <= K; k2++) {
            const int k3 = K - k1 - k2;
            const int b = B * (1 << k2);
            const int c = C * (1 << k3);
            ans = max(ans, a + b + c);
        }
    }
    cout << ans << endl;
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:9:33: error: 'K1' was not declared in this scope; did you mean 'k1'?
    9 |         const int a = A * (1 << K1);
      |                                 ^~
      |                                 k1
Language: C++

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

using namespace std;

int main() {
	vector<int> a(3);
	int K, c = 0;
	cin >> a.at(0) >> a.at(1) >> a.at(2) >>  K;
	int maxi = 0;
	for (int i = 0; i < 3; i++) {
		if (maxi < a.at(i)){
			maxi = a.at(i);
			 		
		}
		c += a.at(i);
	}
	int ans = c - maxi + maxi * std::pow(2, K);
	cout << ans << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:19:42: error: 'pow' is not a member of 'std'
   19 |         int ans = c - maxi + maxi * std::pow(2, K);
      |                                          ^~~
Language: C++

#include<iostream>
#include<string>
#include<string.h>
#include<map>
#include<set> 
#include<vector>
#include<stdio.h>
#include<math.h>
#include<algorithm>
#include<queue> 
using namespace std;
int main() 
{int s=1,a,b,c,k;
 cin>>a>>b>>c>>k;
 
 for (int i=1;i<=k;i++)s*=2;
 
 if (a>=b and a>=c){
 cout<<s*a+b+c;
 system("pause");
 return 0;}


 if (b>=c and b>=a){
 cout<<s*b+a+c;
 system("pause");
 return 0;}
 if (c>=a and c>=b){
 cout<<s*c+b+a;
 system("pause");
 return 0;}} 
 system("pause");
 return 0;}

Compiler output:
a.cc:32:8: error: expected constructor, destructor, or type conversion before '(' token
   32 |  system("pause");
      |        ^
a.cc:33:2: error: expected unqualified-id before 'return'
   33 |  return 0;}
      |  ^~~~~~
a.cc:33:11: error: expected declaration before '}' token
   33 |  return 0;}
      |           ^
Language: Java

public class Main {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        int a = in.nextInt();
        int b = in.nextInt();
        int c = in.nextInt();
        int k = in.nextInt();
        int sum = a + b + c;
        int max = Math.max(Math.max(a, b), c);
        sum = sum - max;
        for (int i = 0; i < k; i++) {
            max = max * 2;
        }
        sum = sum + max;
        System.out.println(sum);
    }

}

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

#include <iostream>
#include <stdio.h>
#include <string.h>
#include <vector>
#include <cassert>
#include <algorithm>
#include <functional>

using namespace std;

int main() {
	vector<int> num(3);
	int K;
	cin >> num[0] >> num[1] >> num[2];
	cin >> K;
	if (num[0] == num[1] && num[1] == num[2]) {
		for (int i = 0; i < K; i++) {
			num[0] = num[0] * 2;
		}	
		cout << num[0] << endl;	
	} else {
		int ans = max(num);
		for (int j = 0; j < K; j++) {
			ans = ans * 2;
		}
		cout << ans << endl;
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:22:30: error: no matching function for call to 'max(std::vector<int>&)'
   22 |                 int ans = max(num);
      |                           ~~~^~~~~
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
In file included from /usr/include/c++/14/algorithm:61,
                 from a.cc:6:
/usr/include/c++/14/bits/stl_algo.h:5706:5: note: candidate: 'template<class _Tp> constexpr _Tp std::max(initializer_list<_Tp>)'
 5706 |     max(initializer_list<_Tp> __l)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5706:5: note:   template argument deduction/substitution failed:
a.cc:22:30: note:   'std::vector<int>' is not derived from 'std::initializer_list<_Tp>'
   22 |                 int ans = max(num);
      |                           ~~~^~~~~
/usr/include/c++/14/bits/stl_algo.h:5716:5: note: candidate: 'template<class _Tp, class _Compare> constexpr _Tp std::max(initializer_list<_Tp>, _Compare)'
 5716 |     max(initializer_list<_Tp> __l, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5716:5: note:   candidate expects 2 arguments, 1 provided
Language: C++

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

int main() {
    int a,b,c,k;
    cin>>a>>b>>c>>k;
    if(a>b) swap(a,b);
    if(b>c) swap(b,c);
    cout<<a+b+c*pow(2,k)<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:17: error: 'pow' was not declared in this scope
   10 |     cout<<a+b+c*pow(2,k)<<endl;
      |                 ^~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
int a,b,c,d,k;
cin>>a>>b>>c;
cin>>d;
if(a>=b&&a>=c)
k=a;
else if(b>=a&&b>=c)
k=b;
else if(c>=a&&c>=b)
k=c;
if(d==1)
cout<<a+b+c+k<<endl;
else if(d>1)
cout<<a+b+c+d*k<<endl;
return 0;
}
#include<bits/stdc++.h>
using namespace std;
int main(){
int a,b,c,d,k;
cin>>a>>b>>c;
cin>>d;
if(a>=b&&a>=c)
k=a;
else if(b>=a&&b>=c)
k=b;
else if(c>=a&&c>=b)
k=c;
if(d==1)
cout<<a+b+c+k<<endl;
else if(d>1)
cout<<a+b+c+d*k<<endl;
return 0;
}


Compiler output:
a.cc:21:5: error: redefinition of 'int main()'
   21 | int main(){
      |     ^~~~
a.cc:3:5: note: 'int main()' previously defined here
    3 | int main(){
      |     ^~~~
Language: C++

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

int main() {
	int a,b,c;
	cin>>a>>b>>c;
	int k;
	cin>>k;
	int m;
	int j;
	if(a<b&&b<c)m=c,j=a+b;
	else if(b<a&&a<c)m=c,j=a+b;
	else if(c<a&&a<b)m=b,j=a+c;
	else if(a<c&&c<b)m=b,j=a+c;
	else if(c<b&&b<a)m=a,j=b+c;
	else if(b<c&&c<a)m=a,j=b+c;
	else if(a=&&b==c)m=c,j=a+b;
	else if(a==b&&b<c)m=c,j=a+b;
	else if(a==c&&c<b)m=b,j=a+c;
	else if(b==c&&c<a)m=a,j=b+c;
	for(int i=0;i<k;i++){
		m*=2;
		}
		cout<<m+j<<endl;
  return 0;
  }


Compiler output:
a.cc: In function 'int main()':
a.cc:18:22: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   18 |         else if(a=&&b==c)m=c,j=a+b;
      |                   ~~~^~~
a.cc:18:21: error: label 'b' used but not defined
   18 |         else if(a=&&b==c)m=c,j=a+b;
      |                     ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main (){
int a,b,c,d;
cin>>a>>b>>c>>d;
if(a>=b&&a>=c){
	if(d!=0){
	
	cout<<a*2*d+b+c;
}
else{
	cout<<a*2+b+c;
}
}
else if(b>a&&b>c){
	if(d!+0){
	
	cout<<b*2*d+a+c;
}
else{
	cout<<b*2+a+c;
}
}
else{
	if(d!=0){
	
	cout<<c*2*d+a+b;
}
else{
	cout<<c*2+a+b;
}
}
return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:16:13: error: expected ')' before '!' token
   16 |         if(d!+0){
      |           ~ ^
      |             )
Language: C++

#include <bits/stdc++.h>
using namespace std;
int a,b,c,k;

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


Compiler output:
a.cc: In function 'int main()':
a.cc:8:17: error: expected primary-expression before '>' token
    8 |     if (2*a+b+c=>a+2*b+c&&2*a+b+c=>a+b+2*c) a*=2;
      |                 ^
a.cc:8:35: error: expected primary-expression before '>' token
    8 |     if (2*a+b+c=>a+2*b+c&&2*a+b+c=>a+b+2*c) a*=2;
      |                                   ^
a.cc:9:22: error: expected primary-expression before '>' token
    9 |     else if (a+2*b+c=>2*a+b+c&&a+2*b+c=>a+b+2*c) b*=2;
      |                      ^
a.cc:9:40: error: expected primary-expression before '>' token
    9 |     else if (a+2*b+c=>2*a+b+c&&a+2*b+c=>a+b+2*c) b*=2;
      |                                        ^
a.cc:10:22: error: expected primary-expression before '>' token
   10 |     else if (a+b+2*c=>2*a+b+c&&a+b+2*c=>a+2*b+c) c*=2;
      |                      ^
a.cc:10:40: error: expected primary-expression before '>' token
   10 |     else if (a+b+2*c=>2*a+b+c&&a+b+2*c=>a+2*b+c) c*=2;
      |                                        ^
Language: C++

#include <iostream>
#include <algorithm>
#include<math>
using namespace std;
int main(void){
    int a, b, c, k,ans , answer;//r code here!
    cin >>a >> b >>c >> k;
    ans = max({a,b,c});
    answer =a + b + c + (ans*pow(2,k))-ans;
    
    cout << answer;
}

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

#include<stdio.h>

int main(){
	int a,b,c,k,maxv,x;
	long long ans;
	scanf("%d%d%d%d",&a,&b,&c,&k);
	maxv=a,x=1;
	if(b>maxv)maxv=b,x=2;
	if(c>maxv)maxv=c,x=3;
	ans=maxv<<k;
	if(x==1)ans+=long long(b+c);
	else if(x==2)ans+=long long(a+c);
	else ans+=long long(a+b);
	printf("%d\n",ans);
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:22: error: expected primary-expression before 'long'
   11 |         if(x==1)ans+=long long(b+c);
      |                      ^~~~
a.cc:12:27: error: expected primary-expression before 'long'
   12 |         else if(x==2)ans+=long long(a+c);
      |                           ^~~~
a.cc:13:19: error: expected primary-expression before 'long'
   13 |         else ans+=long long(a+b);
      |                   ^~~~
Language: C++

#include<cstdio>
 
using namespace std;
 
int main(){
int a, b, c, k,sum;
 
scanf("%d%d%d%d", &a, &b, &c, &k);
 
if(a <= b <= c || b <= a <= c){
goto maxc;
}else if(a <= c <= b || c <= a <= b){
goto maxb;
}else(b <= c <= a || c <= b <= a){
goto maxa;
}
 
maxa:
for(int i=1; i <= k; i++){
a = a * 2;
}
goto total;
 
maxb:
for(int i=1; i <= k; i++){
b = b * 2;
}
goto total;
 
maxc:
for(int i=1; i <= k; i++){
c = c * 2;
}
goto total;
 
total:
sum = a + b + c;
printf("%d", sum);
 
return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:34: error: expected ';' before '{' token
   14 | }else(b <= c <= a || c <= b <= a){
      |                                  ^
      |                                  ;
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main(){
	int a;
    vector<int> list(3);
    cin >> list.at(0) >> list.at(1) >> list.at(2) >> a;
    sort(list.begin(), list.end());
    list.at(2) *= 2**a;
    cout << list.at(0) + list.at(1) + list.at(2);
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:21: error: invalid type argument of unary '*' (have 'int')
    9 |     list.at(2) *= 2**a;
      |                     ^~
Language: C++

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


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

	if (a<b<c or b<a<c){
		ans = a+b+(c**K);
	}else if (a<c<b or c<a<b){
		ans = a+c+(b**K);
	}else if (b<c<a or c<b<a){
		ans = b+c+(a**K);
	}
	cout << ans;

	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:30: error: invalid type argument of unary '*' (have 'int')
   13 |                 ans = a+b+(c**K);
      |                              ^~
a.cc:15:30: error: invalid type argument of unary '*' (have 'int')
   15 |                 ans = a+c+(b**K);
      |                              ^~
a.cc:17:30: error: invalid type argument of unary '*' (have 'int')
   17 |                 ans = b+c+(a**K);
      |                              ^~
Language: C++

#include <iostream>
#include <stdio.h>
#include <string.h>
#include <vector>

using namespace std;

int main() {
	vector <int> num(3);
	int K;
	cin >> num[0] >> num[1] >> num[2];
	cin >> K;
	if (num[0] == num[1] && num[1] == num[2]) {
		for (int i = 0; i < K; i++) {
			num[0] = num[0] * 2;
		}	
		cout << num[0] << endl;	
	} else {
		int ans = max(num);
		for (int j = 0; j < K; j++) {
			ans = ans * 2;
		}
		cout << ans << endl;
	}
	return 0;
}

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

#include <iostream>

using namespace std;


int main(void) {
  int A, B, C, K;
  cin >> A >> B >> C >> K;
  int pos = A > B ? (A > C ? 0 : 2): B > C ? 1 : 2;
  for(int i = 0; i < K; i++) {
    switch(pos) {
      case 0:
        A *= 2;
        break;
      case 1:
        B *= 2;
        break;
      case 2:
        C *= 2;
        break;
      default:
        cout << "ERROR" << endl;
        break;
    }
    cout << A + B + C << endl;
 	return 0;   
}

Compiler output:
a.cc: In function 'int main()':
a.cc:27:2: error: expected '}' at end of input
   27 | }
      |  ^
a.cc:6:16: note: to match this '{'
    6 | int main(void) {
      |                ^
Language: C++

#include <iostream>
#include <algorithm>
using namespace std;
int main(void){
    int a, b, c, k,ans , answer;//r code here!
    cin >>a >> b >>c >> k;
    ans = max({a,b,c});
    answer =a + b + c + (ans*pow(2,k))-ans;
    
    cout << answer;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:30: error: 'pow' was not declared in this scope
    8 |     answer =a + b + c + (ans*pow(2,k))-ans;
      |                              ^~~
Language: C++

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

using namespace std;

int main() {
	vector<int> a(3);
	int K, c = 0;
	cin >> a.at(0) >> a.at(1) >> a.at(2);
	cin >> K;
	int maxi = 0;
	for (int i = 0; i < 3; i++) {
		if (maxi < a.at(i)){
			maxi = a.at(i);
			 		
		}
		c += a.at(i);
	}
	cout << c - maxi + maxi * pow(2,K) << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:20:35: error: 'pow' was not declared in this scope
   20 |         cout << c - maxi + maxi * pow(2,K) << endl;
      |                                   ^~~
Language: C++

#include <cstdio>
#include <cstdlib>
#include <iostream>
#include <fstream>
#include <sstream>
#include <set>
#include <map>
#include <vector>
#include <list>
#include <algorithm>
#include <cstring>
#include <cmath>
#include <string>
#include <queue>
#include <bitset>     //UWAGA - w czasie kompilacji musi byc znany rozmiar wektora - nie mozna go zmienic
#include <cassert>
#include <iomanip>        //do setprecision
#include <ctime>
#include <complex>
using namespace std;

#define FOR(i,b,e) for(int i=(b);i<(e);++i)
#define FORQ(i,b,e) for(int i=(b);i<=(e);++i)
#define FORD(i,b,e) for(int i=(b)-1;i>=(e);--i)
#define REP(x, n) for(int x = 0; x < (n); ++x)

#define ST first
#define ND second
#define PB push_back
#define MP make_pair
#define LL long long
#define ULL unsigned LL
#define LD long double

const double pi = 3.141592653589793238462643383279502884197169399375105820974944592307816406286208998628034825342;
const int mod=1000000007;

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


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

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

int main() {
  int A , B , C , K;
  cin >> A >> B >> C >> K;
  
  if(A>B){
    if(A>C){
   cout << A*(2^K)+B+C << endl;
      }
  }
  if(B>A){
    if(B>C){
   cout << A+B*(2^K)+C << endl;
      }
  }
  if(C>A){
    if(C>B)
   cout << A+B+C*(2^K) << endl;
    }
  }
  // ここにプログラムを追記
}


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

/***************************************************************
     File Name: B.cpp
     Created Time: 六  5/ 5 20:23:42 2018
 **************************************************************/
#define MEM0(x) memset(x,0,sizeof(x))
#define MEM1(x) memset(x,-1,sizeof(x))
#define MEMX(x) memset(x,0x3f,sizeof(x))
#include <vector>
#include <iostream>
using namespace std;

vector<int> v;
int main() {
  int a, b, c, k;
  while (cin >> a >> b >> c >> k) {
    v.clear();
    v.push_back(a);
    v.push_back(b);
    v.push_back(c);
    sort(v.begin(), v.end());
    cout << v[0] + v[1] + (v[2] << k) << endl;
  }
}


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

import java.util.*;

public class HelloWorld{

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

        int a,b,c,k,max,max_;
        a = Integer.parseInt(scan.next());   
        b = Integer.parseInt(scan.next());
        c = Integer.parseInt(scan.next());
        k = Integer.parseInt(scan.next());
        max = Math.max(a,b);
        max = Math.max(max,c);
        max_ = max;
        for(int i = 0;i < k;i++){
            max = max*2;
        }
        int ans;
        ans = max + a + b + c - max_;

        System.out.println(ans);
    }
}


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

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

int main(void)
{
int a, b, c, K;
cin >> a >> b >> c >> K;
long long z = pow(max(a, b, c), K);
cout << a + b + c - max(a, b, c) + z << endl;
return 0;
}

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

using namespace std;

int main() {
	int A, B, C, K;
	cin >> A >> B >> C;
	cin >> K;
	if (A == B && B == C) {
		for (int i = 0; i < K; i++) {
			A *= 2;
		}	
		cout << A << endl;	
	} else {
		int ans = max(A, B, C);
		for (int j = 0; j < K; j++) {
			ans *= 2;
		}
		cout << ans <<endl;
	}
	return 0;
}

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

int main() {
	int A, B, C, K;
	cin >> A >> B >> C;
	cin >> K;
	if (A == B && B == C) {
		for (int i = 0; i < K; i++) {
			A *= 2;
		}	
		cout << A << endl;	
	} else {
		int ans = max(A, B, C);
		for (int j = 0; j < K; j++) {
			ans *= 2;
		}
		cout << ans <<endl;
	}
	return 0;
}

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

using namespace std;

int main() {
  int a,b,c,k;
  int mt;
  vector<int> m;

  cin >> a >>b>>c>>k;

  int max3 = (a>b) ? max(a,c) : max(b,c);
  // for (auto l : m) {
  // }

  int x2 = max3 * (pow(2,k));

  cout<<x2+ a+b+c-max3<<endl;
  
  // int minn = *min_element(p.begin(), p.end());
  // cout << minn << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:19:20: error: 'pow' was not declared in this scope
   19 |   int x2 = max3 * (pow(2,k));
      |                    ^~~