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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:8:20: error: no matching function for call to 'max(<brace-enclosed initializer list>)'
    8 |   long long m = 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
a.cc:10:11: error: 'ans' was not declared in this scope; did you mean 'abs'?
   10 |   cout << ans << endl;
      |           ^~~
      |           abs
Language: C++

#include<iostream>
#include <vector>
#include <queue>
#include <cmath>
#include <iterator>
using namespace std;

int main()
{
	int A, B, C;
	int K;
	int max;
	int ans;

	cin >> A >> B >> C;
	cin >> K;

	vector<int> v;

	v.push_back(A);
	v.push_back(B);
	v.push_back(C);
	sort(v.begin(), v.end());
	max = v[2];
	ans = max;
	for (int i = 0; i < K; ++i)
	{
		ans *= 2;
	}

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

	cout << ans << endl;

	return 0;

}

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

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

int main()
{
	int A, B, C;
	int K;
	int max;
	int ans;

	cin >> A >> B >> C;
	cin >> K;

	vector<int> v;

	v.push_back(A);
	v.push_back(B);
	v.push_back(C);
	sort(v.begin(),v.end());
	max = v[2];
	ans = max;
	for (int i = 0; i < K; ++i)
	{
		ans *= 2;
	}

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

	cout << ans << endl;

	return 0;

}

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

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

int main()
{
	int A, B, C;
	int K;
	int max;
	int ans;

	cin >> A >> B >> C;
	cin >> K;

	std::vector<int> v;

	v.push_back(A);
	v.push_back(B);
	v.push_back(C);
	sort(v.begin(), v.end());
	max = v[2];
	ans = max;
	for (int i = 0; i < K; ++i)
	{
		ans *= 2;
	}

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

	cout << ans << endl;

	return 0;

}

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

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

int main()
{
	int A, B, C;
	int K;
	int max;
	int ans;

	cin >> A >> B >> C;
	cin >> K;

	std::vector<int> v;

	v.push_back(A);
	v.push_back(B);
	v.push_back(C);
	sort(v.begin(), v.end());
	max = v[2];
	ans = max;
	for (int i = 0; i < K; ++i)
	{
		ans *= 2;
	}

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

	cout << ans << endl;

	return 0;

}

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

import java.util.Scanner;

public class Main {
    
    
    public static void main(String[] args){
        
        Scanner in = new Scanner(System.in);
        
        int x = in.nextInt();
        
        int y = in.nextInt();
        
        int z = in.nextInt();
        
        int k = in.nextInt();
        
        int x1=x;
        
        int y1=y;
        
        
        int res[]=new int[3];
        
        for(int i=0;i<3;i++){
            
            for(int j=0;j<k;j++){
                
                if(i==0){
                   
                    x=x*2;
                    res[0]=x+y+z;
                   
                }
                
                if(i==1){
                    
                    x=x1;
                    y=y*2;
                    res[1]=x+y+z; 
                }
                
                if(i==2){
                   
                    y=y1;
                    z =z*2;
                    res[2]=x+y+z; 
                    
                }
            }
            
        }
        
        Arrays.sort(res);
        
        System.out.println(res[res.length-1]);
       
       
    }
    
}


Compiler output:
Main.java:54: error: cannot find symbol
        Arrays.sort(res);
        ^
  symbol:   variable Arrays
  location: class Main
1 error
Language: C++

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

int main()
{
int a[3],k;

cin>>a[0]>>a[1]>>a[2]>>k;
while(k--)
{
    sort(a);
    a[2]*=2;
}
cout<<a[0]+a[1]+a[2];
     
return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:12:9: error: no matching function for call to 'sort(int [3])'
   12 |     sort(a);
      |     ~~~~^~~
In file included from /usr/include/c++/14/algorithm:61,
                 from a.cc:2:
/usr/include/c++/14/bits/stl_algo.h:4762:5: note: candidate: 'template<class _RAIter> void std::sort(_RAIter, _RAIter)'
 4762 |     sort(_RandomAccessIterator __first, _RandomAccessIterator __last)
      |     ^~~~
/usr/include/c++/14/bits/stl_algo.h:4762:5: note:   candidate expects 2 arguments, 1 provided
/usr/include/c++/14/bits/stl_algo.h:4793:5: note: candidate: 'template<class _RAIter, class _Compare> void std::sort(_RAIter, _RAIter, _Compare)'
 4793 |     sort(_RandomAccessIterator __first, _RandomAccessIterator __last,
      |     ^~~~
/usr/include/c++/14/bits/stl_algo.h:4793:5: note:   candidate expects 3 arguments, 1 provided
In file included from /usr/include/c++/14/algorithm:86:
/usr/include/c++/14/pstl/glue_algorithm_defs.h:292:1: note: candidate: 'template<class _ExecutionPolicy, class _RandomAccessIterator, class _Compare> __pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, void> std::sort(_ExecutionPolicy&&, _RandomAccessIterator, _RandomAccessIterator, _Compare)'
  292 | sort(_ExecutionPolicy&& __exec, _RandomAccessIterator __first, _RandomAccessIterator __last, _Compare __comp);
      | ^~~~
/usr/include/c++/14/pstl/glue_algorithm_defs.h:292:1: note:   candidate expects 4 arguments, 1 provided
/usr/include/c++/14/pstl/glue_algorithm_defs.h:296:1: note: candidate: 'template<class _ExecutionPolicy, class _RandomAccessIterator> __pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, void> std::sort(_ExecutionPolicy&&, _RandomAccessIterator, _RandomAccessIterator)'
  296 | sort(_ExecutionPolicy&& __exec, _RandomAccessIterator __first, _RandomAccessIterator __last);
      | ^~~~
/usr/include/c++/14/pstl/glue_algorithm_defs.h:296:1: note:   candidate expects 3 arguments, 1 provided
Language: C++

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

int main()
{
int a[3],k;

cin>>a[0]>>a[1]>>a[2]>>k;
while(k--)
{
    sort(a);
    a[2]*=2;
}
cout<<a[0]+a[1]+a[2];
     
return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:9: error: no matching function for call to 'sort(int [3])'
   12 |     sort(a);
      |     ~~~~^~~
In file included from /usr/include/c++/14/algorithm:61,
                 from a.cc:2:
/usr/include/c++/14/bits/stl_algo.h:4762:5: note: candidate: 'template<class _RAIter> void std::sort(_RAIter, _RAIter)'
 4762 |     sort(_RandomAccessIterator __first, _RandomAccessIterator __last)
      |     ^~~~
/usr/include/c++/14/bits/stl_algo.h:4762:5: note:   candidate expects 2 arguments, 1 provided
/usr/include/c++/14/bits/stl_algo.h:4793:5: note: candidate: 'template<class _RAIter, class _Compare> void std::sort(_RAIter, _RAIter, _Compare)'
 4793 |     sort(_RandomAccessIterator __first, _RandomAccessIterator __last,
      |     ^~~~
/usr/include/c++/14/bits/stl_algo.h:4793:5: note:   candidate expects 3 arguments, 1 provided
In file included from /usr/include/c++/14/algorithm:86:
/usr/include/c++/14/pstl/glue_algorithm_defs.h:292:1: note: candidate: 'template<class _ExecutionPolicy, class _RandomAccessIterator, class _Compare> __pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, void> std::sort(_ExecutionPolicy&&, _RandomAccessIterator, _RandomAccessIterator, _Compare)'
  292 | sort(_ExecutionPolicy&& __exec, _RandomAccessIterator __first, _RandomAccessIterator __last, _Compare __comp);
      | ^~~~
/usr/include/c++/14/pstl/glue_algorithm_defs.h:292:1: note:   candidate expects 4 arguments, 1 provided
/usr/include/c++/14/pstl/glue_algorithm_defs.h:296:1: note: candidate: 'template<class _ExecutionPolicy, class _RandomAccessIterator> __pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, void> std::sort(_ExecutionPolicy&&, _RandomAccessIterator, _RandomAccessIterator)'
  296 | sort(_ExecutionPolicy&& __exec, _RandomAccessIterator __first, _RandomAccessIterator __last);
      | ^~~~
/usr/include/c++/14/pstl/glue_algorithm_defs.h:296:1: note:   candidate expects 3 arguments, 1 provided
Language: Java

import java.util.Scanner;

public class Main {
	
	public static int check(int a,int b,int c){
		int data;
		
		if(a>=b)data=a;
		else data=b;
		if(data>=c){}
		else data=c;
		
		return data;
	}

	public static void main(String[] args) {
		// TODO Auto-generated method stub
		System.out.print("a");
		Scanner s=new Scanner(System.in);
		int A=s.nextInt();
		int B=s.nextInt();
		int C=s.nextInt();
		int K=s.nextInt();
		int d;
		int all=0;
		
		d=b.check(A,B,C);
		if(d==A)all=B+C;
		if(d==B)all=A+C;
		if(d==C)all=B+A;
		for(int i=0;i<K;i++){
			d*=2;
		}
		System.out.print(all+d);

	}

}

Compiler output:
Main.java:27: error: cannot find symbol
		d=b.check(A,B,C);
		  ^
  symbol:   variable b
  location: class Main
1 error
Language: Java

import java.util.Scanner;

public class Main {
	
	public static int check(int a,int b,int c){
		int data;
		
		if(a>=b)data=a;
		else data=b;
		if(data>=c){}
		else data=c;
		
		return data;
	}

	public static void main(String[] args) {
		// TODO Auto-generated method stub
		System.out.print("a");
		Scanner s=new Scanner(System.in);
		int A=s.nextInt();
		int B=s.nextInt();
		int C=s.nextInt();
		int K=s.nextInt();
		int d,all=0;
		d=b.check(A,B,C);
		if(d==A)all=B+C;
		if(d==B)all=A+C;
		if(d==C)all=B+A;
		for(int i=0;i<K;i++){
			d*=2;
		}
		System.out.print(all+d);

	}

}

Compiler output:
Main.java:25: error: cannot find symbol
		d=b.check(A,B,C);
		  ^
  symbol:   variable b
  location: class Main
1 error
Language: Java

import java.util.Scanner;

public class Main {
	
	public static int check(int a,int b,int c){
		int data;
		
		if(a>=b)data=a;
		else data=b;
		if(data>=c){}
		else data=c;
		
		return data;
	}

	public static void main(String[] args) {
		// TODO Auto-generated method stub
		System.out.print("a");
		Scanner s=new Scanner(System.in);
		int A=s.nextInt();
		int B=s.nextInt();
		int C=s.nextInt();
		int K=s.nextInt();
		int d,all=0;
		
		d=b.check(A,B,C);
		if(d==A)all=B+C;
		if(d==B)all=A+C;
		if(d==C)all=B+A;
		for(int i=0;i<K;i++){
			d*=2;
		}
		System.out.print(all+d);

	}

}

Compiler output:
Main.java:26: error: cannot find symbol
		d=b.check(A,B,C);
		  ^
  symbol:   variable b
  location: class Main
1 error
Language: Java

import java.util.Scanner;

public class Main {
	
	public static int check(int a,int b,int c){
		int data;
		
		if(a>=b)data=a;
		else data=b;
		if(data>=c){}
		else data=c;
		
		return data;
	}

	public static void main(String[] args) {
		// TODO Auto-generated method stub
		Scanner s=new Scanner(System.in);
		int A=s.nextInt();
		int B=s.nextInt();
		int C=s.nextInt();
		int K=s.nextInt();
		int d,all=0;
		
		d=b.check(A,B,C);
		if(d==A)all=B+C;
		if(d==B)all=A+C;
		if(d==C)all=B+A;
		for(int i=0;i<K;i++){
			d*=2;
		}
		System.out.print(all+d);

	}

}


Compiler output:
Main.java:25: error: cannot find symbol
		d=b.check(A,B,C);
		  ^
  symbol:   variable b
  location: class Main
1 error
Language: C++

#include <iostream>
#include <algorithm>
#include <array>

int main(int argc, char const *argv[])
{
	std::array<int,3> a;
	int k;
	std::cin >> a[0] >> a[1] >> a[2] >> k;

	std::sort(a.begin(),a.end());
	std::cout << a[0]+a[1]+pow(a[2],k);
	return 0;
}

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

#Include <stdio.h>

int main() {
  int a, b, c, k;
  scanf("%d %d %d %d", a, b, c, k);
  int ans = a + b + c;
  ans += ((a > b ? (a > c ? a : c) : (b > c ? b : c)) << k);
  return 0;
}

Compiler output:
main.c:1:2: error: invalid preprocessing directive #Include; did you mean #include?
    1 | #Include <stdio.h>
      |  ^~~~~~~
      |  include
main.c: In function 'main':
main.c:5:3: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
    5 |   scanf("%d %d %d %d", a, b, c, k);
      |   ^~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
  +++ |+#include <stdio.h>
    1 | #Include <stdio.h>
main.c:5:3: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
    5 |   scanf("%d %d %d %d", a, b, c, k);
      |   ^~~~~
main.c:5:3: note: include '<stdio.h>' or provide a declaration of 'scanf'
Language: C++

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

int main () {
  int a , b ,c ,k;
  cin >> a >> b >> c >> k;
  int sort[3] = {a,b,c};
  int temp;
  
  for(int i = 0 ; i < 3;i++ ){
    for(int j = i+1 ;j < 3 ; j++){
  		if(sort[i] > sort[j]) {
          tmp = sort[i];
          sort[i] = sort[j];
          sort[j] = tmp;
        }
    }
  }
  for(int i = 0 ; i < k ; i++){
    sort[0] *= 2;
  }
  cout << sort[0] + sort[1] + sort[2] << endl;
              
}
   
  
  

Compiler output:
a.cc: In function 'int main()':
a.cc:13:11: error: 'tmp' was not declared in this scope; did you mean 'temp'?
   13 |           tmp = sort[i];
      |           ^~~
      |           temp
Language: C++

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

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

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

Compiler output:
In file included from /usr/include/c++/14/algorithm:60,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_algobase.h: In instantiation of 'constexpr const _Tp& std::max(const _Tp&, const _Tp&, _Compare) [with _Tp = int; _Compare = int]':
a.cc:7:12:   required from here
    7 |     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 <math.h>
#include <algorithm>
#include <vector>
#include <numeric>
#include <string>
using namespace std;
const double PI = acos(-1.0);
const string alp = "abcdefghijklmnopqrstuvwxyz";
const string ALP = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
#define EXIST(s,e) ((s).find(e)!=(s).end())
#define SORT(c) sort((c).begin(),(c).end())
#define FOR(i,a,b) for(int i=(a);i<(b);++i)
#define REP(i,n) FOR(i,0,n)
#define SUM(c) accumulate((c).begin(),(c).end(),0)
#define Yn(b) puts(b?"Yes":"No")
#define YN(b) puts(b?"YES":"NO")

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

Compiler output:
a.cc: In function 'int main()':
a.cc:22:7: error: expected primary-expression before ')' token
   22 |   if ()
      |       ^
Language: Java

import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.Scanner;
 
public class Main {
	public static void main(String[] args){
		Scanner s = new Scanner(System.in);
		int a = s.nextInt();
		int b = s.nextInt();
		int c = s.nextInt();

		int k = s.nextInt();

		int coefficient = Math.pow(2, k);

		if(a > b && a > c){
			a *= coefficient;
		} else if (a < b && b > c){
			b *= coefficient;
		} else if (a < c && b < c){
			c *= coefficient;
		}

		System.out.println(a + b + c);
	}
}

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

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

int main()
{
  int tmp,A,B,C,K,res=0;
  scanf("%d %d %d",&A,&B,&C);
  scanf("%d",&K);
  if(A < B){
    tmp = A;
    A = B;
    B = tmp;
  }
  if(A < C){
    tmp = C;
    C = A;
    A = tmp;
  }
  for(int i=0;i<K;i++)
     A *= 2;
  prin

Compiler output:
a.cc: In function 'int main()':
a.cc:22:3: error: 'prin' was not declared in this scope; did you mean 'printf'?
   22 |   prin
      |   ^~~~
      |   printf
a.cc:22:7: error: expected '}' at end of input
   22 |   prin
      |       ^
a.cc:6:1: note: to match this '{'
    6 | {
      | ^
Language: C++

#include<iostream>
using namespace std;
int main()
{
    int a=0,b=0,c=0,k=0,max=0,min=0,f=0,h=0,middle=0,result=0;
    cin>>a>>b>>c>>k;
    if(a>b)
	{
		max=a;
	} 
	else
	{
        if(b>c)
        {
        	max=b;
		}
		else
		{
			max=c;
		}
	}
	if(a<b&&a<c)
	{
		min=a;
	}
	else
	{
		if(b<c)
		min=b;
		min=c;
	}
	if(a!=min||a!=max)
	{
		if(b!=min||b!=max)
		{
			middle=c;
		}
	}
	else
	{	
	if(a!=min||a!=max)
	{
		if(c!=min||c!=max)
		{
			middle=b;
		}
	}
	middle=a;
	}
	f=k/3;
	h=k%3;
	if(h==0)
	{
        for(f>0;f--)
        {
    	    result=2*(max+min+middle);
    	    cout<<result;
	    }
    }
    if(h==1)
    {
        for(f>0;f--)
        {
    	    result=2*(max+min+middle)+max*2;
    	    cout<<result;
	    }
	}
	if(h==2)
	{
		for(f>0;f--)
        {
    	    result=2*(max+min+middle)+max*2+middle*2;
    	    cout<<result;
	    }
	}
	return 0;
} 

Compiler output:
a.cc: In function 'int main()':
a.cc:54:20: error: expected ';' before ')' token
   54 |         for(f>0;f--)
      |                    ^
      |                    ;
a.cc:62:20: error: expected ';' before ')' token
   62 |         for(f>0;f--)
      |                    ^
      |                    ;
a.cc:70:28: error: expected ';' before ')' token
   70 |                 for(f>0;f--)
      |                            ^
      |                            ;
Language: C++

#include<iostream>
#include<bits/stdc++.h>
#include<cmath>
#include <algorithm>
using namespace std;
int main(){
	int a,b,c,x,k,s,t;
	cin>>a>>b>>c;
	cin>>k;
	t=max(a,max(b,c))
	s=t;
	t=k*t;
	x=a+b+c+t-s;
	cout<<x;
	return 0;
} 

Compiler output:
a.cc: In function 'int main()':
a.cc:10:26: error: expected ';' before 's'
   10 |         t=max(a,max(b,c))
      |                          ^
      |                          ;
   11 |         s=t;
      |         ~
Language: C++

#include<bits\stdc++.h>
using namespace std;
int main()
{
	int a,b,c,k,m,s;
	cin>>a>>b>>c>>k;
	m=max(a,max(b,c));
	s=m;
	m=m*pow(2,k);
	cout<<a+b+c+m-s;
	return 0;
} 

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

#include<bits\stdc++.h>
using namespace std;
int main()
{
	int a,b,c,k,m,s;
	cin>>a>>b>>c>>k;
	int m=max(a,max(b,c));
	s=t;
	t=t*pow(2,k);
	cout<<a+b+c+t-s;
	return 0;
} 

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

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

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

#include<bits\stdc++.h>
using namespace std;
int main()
{
	int a,b,c,k,m;
	cin>>a>>b>>c>>k;
	if(c>a&&c>b)
	{
		cout<<a+b+c*2*k;
		
	}
	if(a>b&&a>c)
	{
		cout<<a*2*k+b+c;
		
	}
	if(b>a&&b>c)
	{
		cout<<a+b*2*k+c;
	}
	return 0;
} 

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

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

int main() {
    int a, b , c, k;
    cin >> a >> b >> c >> k;
    int max_num = max(a, max(b, c));
    int sum_rest = a + b + c - max_num;
    cout << 1ll * pow(max_num * 1ll, k + 1) + sum_rest << endl;
}

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

#include <bits/stdc++.h>
using namespace std;
#define repr(i,k,n) for(int i = (k); i < (n); i++)
#define rep(i,n) repr(i,0,n)
#define ALL(a) begin(a),end(a)
const int INF = 114514810;
const int MOD = 1000000007;
typedef vector<int> vi;
typedef vector<string> vs;
typedef long long ll;
int main() {
	cin.tie(0);
	ios::sync_with_stdio(false);
	int A,B,C,K,M;
	cin >> A >> B >> C >> K;
	M=max({A,B,C});
	rep(i,k){
		M*=2;
	}
	M+=A+B+C-max({A,B,C});
	cout << M << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:17:15: error: 'k' was not declared in this scope
   17 |         rep(i,k){
      |               ^
a.cc:3:43: note: in definition of macro 'repr'
    3 | #define repr(i,k,n) for(int i = (k); i < (n); i++)
      |                                           ^
a.cc:17:9: note: in expansion of macro 'rep'
   17 |         rep(i,k){
      |         ^~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
#define repr(i,k,n) for(int i = (k); i < (n); i++)
#define rep(i,n) repr(i,0,n)
#define ALL(a) begin(a),end(a)
const int INF = 114514810;
const int MOD = 1000000007;
typedef vector<int> vi;
typedef vector<string> vs;
typedef long long ll;
int main() {
	cin.tie(0);
	ios::sync_with_stdio(false);
	int A,B,C,K,M;
	cin >> A >> B >> C >> K;
	M=max({A,B,C});
	M*=2*K;
	M+=A+B+C-max({A,B,C})
	cout << M << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:18:30: error: expected ';' before 'cout'
   18 |         M+=A+B+C-max({A,B,C})
      |                              ^
      |                              ;
   19 |         cout << M << endl;
      |         ~~~~
Language: C++

#include<bits/stdc++.h> 
using namespace std;
int main()
{
	int a,b,c,k,n,m;
	cin>>a>>b>>c>>k;
	if(a>=b)
	    n=a;
	if(a<b)
	    n=b;
	if(n>=c)
	    n=n;
	if(n<c)
	    n=c;
    int m=(2^k-1)*n+a+b+c;
	cout<<w;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:15:9: error: redeclaration of 'int m'
   15 |     int m=(2^k-1)*n+a+b+c;
      |         ^
a.cc:5:23: note: 'int m' previously declared here
    5 |         int a,b,c,k,n,m;
      |                       ^
a.cc:16:15: error: 'w' was not declared in this scope
   16 |         cout<<w;
      |               ^
Language: C++

#include<bits/stdc++.h> 
using namespace std;
int main()
{
	int a,b,c,k,n,m;
	cin>>a>>b>>c>>k;
	if(a>=b)
	    n=a,m=b;
	if(a<b)
	    n=b,m=a;
	if(n>=c)
	    n=n,m=m+c;
	if(n<c)
	    m=m+n;
	    n=c;
    int w=(2^k*n)+m
	cout<<w;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:17:9: error: expected ',' or ';' before 'cout'
   17 |         cout<<w;
      |         ^~~~
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:15:13: error: redeclaration of 'int m'
   15 |         int m=2*k*n;
      |             ^
a.cc:5:23: note: 'int m' previously declared here
    5 |         int a,b,c,k,n,m;
      |                       ^
Language: C++

#include<iostream>
#include<string>
#include<algorithm>

int main(void) {
	int A, B, C, K;
	std::cin >> A >> B >> C >> K;
	if (A > B && A > C) {
		std::cout << A * pow(2, K) + B + C << std::endl;
	}
	else if (B > A && B > C) {
		std::cout << B * pow(2, K) + A + C << std::endl;
	}
	else if (C > A && C > B) {
		std::cout << C * pow(2, K) + A + B << std::endl;
	}

	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:34: error: 'pow' was not declared in this scope
    9 |                 std::cout << A * pow(2, K) + B + C << std::endl;
      |                                  ^~~
a.cc:12:34: error: 'pow' was not declared in this scope
   12 |                 std::cout << B * pow(2, K) + A + C << std::endl;
      |                                  ^~~
a.cc:15:34: error: 'pow' was not declared in this scope
   15 |                 std::cout << C * pow(2, K) + A + B << std::endl;
      |                                  ^~~
Language: C++

#include<iostream>
using namespace std;
int main(void)
{
int A,B,C,K;
cin>>A>>B>>C>>D>>K;
cout<<A+B+C+max({A,B,C})*((1<<K)-1)<<'\n';
return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:15: error: 'D' was not declared in this scope
    6 | cin>>A>>B>>C>>D>>K;
      |               ^
a.cc:7:16: error: no matching function for call to 'max(<brace-enclosed initializer list>)'
    7 | cout<<A+B+C+max({A,B,C})*((1<<K)-1)<<'\n';
      |             ~~~^~~~~~~~~
In file included from /usr/include/c++/14/string:51,
                 from /usr/include/c++/14/bits/locale_classes.h:40,
                 from /usr/include/c++/14/bits/ios_base.h:41,
                 from /usr/include/c++/14/ios:44,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_algobase.h:257:5: note: candidate: 'template<class _Tp> constexpr const _Tp& std::max(const _Tp&, const _Tp&)'
  257 |     max(const _Tp& __a, const _Tp& __b)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:257:5: note:   candidate expects 2 arguments, 1 provided
/usr/include/c++/14/bits/stl_algobase.h:303:5: note: candidate: 'template<class _Tp, class _Compare> constexpr const _Tp& std::max(const _Tp&, const _Tp&, _Compare)'
  303 |     max(const _Tp& __a, const _Tp& __b, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:303:5: note:   candidate expects 3 arguments, 1 provided
Language: C++

#include<iostream>
using namespace std;
int main() {
  int a, b, c, d, m;
  cin >> a >> b >> c >> d;
  m = max({a, b, c});
  for(int i = 0; i < d; i++) {
    m *= 2;
  }
  cout << a + b + c - max({a, b, c}) +  m << endl;
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:6:10: error: no matching function for call to 'max(<brace-enclosed initializer list>)'
    6 |   m = 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
a.cc:10:26: error: no matching function for call to 'max(<brace-enclosed initializer list>)'
   10 |   cout << a + b + c - max({a, b, c}) +  m << endl;
      |                       ~~~^~~~~~~~~~~
/usr/include/c++/14/bits/stl_algobase.h:257:5: note: candidate: 'template<class _Tp> constexpr const _Tp& std::max(const _Tp&, const _Tp&)'
  257 |     max(const _Tp& __a, const _Tp& __b)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:257:5: note:   candidate expects 2 arguments, 1 provided
/usr/include/c++/14/bits/stl_algobase.h:303:5: note: candidate: 'template<class _Tp, class _Compare> constexpr const _Tp& std::max(const _Tp&, const _Tp&, _Compare)'
  303 |     max(const _Tp& __a, const _Tp& __b, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:303:5: note:   candidate expects 3 arguments, 1 provided
Language: C++

#include<iostream>
using namespace std;
int main() {
  int a, b, c, d, m;
  cin >> a >> b >> c >> d;
  m = max({a, b, c})
  for(int i = 0; i < d; i++) {
    m *= 2;
  }
  cout << a + b + c - max({a, b, c}) +  m<< endl;
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:6:10: error: no matching function for call to 'max(<brace-enclosed initializer list>)'
    6 |   m = 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
a.cc:7:18: error: 'i' was not declared in this scope
    7 |   for(int i = 0; i < d; i++) {
      |                  ^
a.cc:10:26: error: no matching function for call to 'max(<brace-enclosed initializer list>)'
   10 |   cout << a + b + c - max({a, b, c}) +  m<< endl;
      |                       ~~~^~~~~~~~~~~
/usr/include/c++/14/bits/stl_algobase.h:257:5: note: candidate: 'template<class _Tp> constexpr const _Tp& std::max(const _Tp&, const _Tp&)'
  257 |     max(const _Tp& __a, const _Tp& __b)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:257:5: note:   candidate expects 2 arguments, 1 provided
/usr/include/c++/14/bits/stl_algobase.h:303:5: note: candidate: 'template<class _Tp, class _Compare> constexpr const _Tp& std::max(const _Tp&, const _Tp&, _Compare)'
  303 |     max(const _Tp& __a, const _Tp& __b, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:303:5: note:   candidate expects 3 arguments, 1 provided
Language: C++

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

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

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

int main(void) {
	int D[3],K;
	cin >> D[0] >> D[1] >> D[2] >>K;
	sort(D, D + 3);
	cout << D[1]+D[0] +pow(2.0,K)*D[2]<<endl;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:28: error: 'pow' was not declared in this scope
   10 |         cout << D[1]+D[0] +pow(2.0,K)*D[2]<<endl;
      |                            ^~~
Language: C++

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

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

Compiler output:
a.cc:2:13: warning: extra tokens at end of #include directive
    2 | #include<al>#include <algorithm>
      |             ^
a.cc:2:9: fatal error: al: No such file or directory
    2 | #include<al>#include <algorithm>
      |         ^~~~
compilation terminated.
Language: C++

#include<iostream>
using namespace std;

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

Compiler output:
a.cc: In function 'int main()':
a.cc:10:11: error: no matching function for call to 'max(<brace-enclosed initializer list>)'
   10 |     if(max({a,b,c}) == a){
      |        ~~~^~~~~~~~~
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:13:16: error: no matching function for call to 'max(<brace-enclosed initializer list>)'
   13 |     else if(max({a,b,c}) == b){
      |             ~~~^~~~~~~~~
/usr/include/c++/14/bits/stl_algobase.h:257:5: note: candidate: 'template<class _Tp> constexpr const _Tp& std::max(const _Tp&, const _Tp&)'
  257 |     max(const _Tp& __a, const _Tp& __b)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:257:5: note:   candidate expects 2 arguments, 1 provided
/usr/include/c++/14/bits/stl_algobase.h:303:5: note: candidate: 'template<class _Tp, class _Compare> constexpr const _Tp& std::max(const _Tp&, const _Tp&, _Compare)'
  303 |     max(const _Tp& __a, const _Tp& __b, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:303:5: note:   candidate expects 3 arguments, 1 provided
Language: C++

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

using namespace std;

int A, B, C, K;

int main() {
  cin >> A >> B >> C >> K;

  int MAX = INT_MIN;
  if(A > MAX) MAX = A;
  if(B > MAX) MAX = B;
  if(C > MAX) MAX = C;

  cout << A + B + C + MAX * pow(2, K)  << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:11:13: error: 'INT_MIN' was not declared in this scope
   11 |   int MAX = INT_MIN;
      |             ^~~~~~~
a.cc:3:1: note: 'INT_MIN' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>'
    2 | #include <math.h>
  +++ |+#include <climits>
    3 |
Language: C++

#include <iostream>

using namespace std;

int A, B, C, K;

int main() {
  cin >> A >> B >> C >> K;

  int MAX = INT_MIN;
  if(A > MAX) A = MAX;
  if(B > MAX) B = MAX;
  if(C > MAX) C = MAX;

  cout << A + B + C + MAX * ((1 << K) - 1) << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:10:13: error: 'INT_MIN' was not declared in this scope
   10 |   int MAX = INT_MIN;
      |             ^~~~~~~
a.cc:2:1: note: 'INT_MIN' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>'
    1 | #include <iostream>
  +++ |+#include <climits>
    2 |
Language: C++

int K;

int main()
{
    //ios_base::sync_with_stdio(false); cin.tie(NULL);
    int maxnum = 0;
    int currsum = 0;
    for (int i = 0; i < 3; i++) {
        int a; cin >> a;
        maxnum = max(maxnum,a);
        currsum += a;
    }
    currsum -= maxnum;
    cin >> K;
    currsum += maxnum * (1 << K);
    cout << currsum << '\n';



    return 0;
}



Compiler output:
a.cc: In function 'int main()':
a.cc:9:16: error: 'cin' was not declared in this scope
    9 |         int a; cin >> a;
      |                ^~~
a.cc:10:18: error: 'max' was not declared in this scope
   10 |         maxnum = max(maxnum,a);
      |                  ^~~
a.cc:14:5: error: 'cin' was not declared in this scope
   14 |     cin >> K;
      |     ^~~
a.cc:16:5: error: 'cout' was not declared in this scope
   16 |     cout << currsum << '\n';
      |     ^~~~
Language: C++

#include <iostream>
#include <algorithm>

using namespace std;

int main(void){
long long int a, b, c, k;

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

long long int t = max(a, max(b, c));

for (int i = 0; i < k; i++){
t *= 2;
}

cout << t + a + b + c - max(a, b, c) << endl;
}

Compiler output:
In file included from /usr/include/c++/14/string:51,
                 from /usr/include/c++/14/bits/locale_classes.h:40,
                 from /usr/include/c++/14/bits/ios_base.h:41,
                 from /usr/include/c++/14/ios:44,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_algobase.h: In instantiation of 'constexpr const _Tp& std::max(const _Tp&, const _Tp&, _Compare) [with _Tp = long long int; _Compare = long long int]':
a.cc:17:28:   required from here
   17 | cout << t + a + b + c - max(a, b, c) << endl;
      |                         ~~~^~~~~~~~~
/usr/include/c++/14/bits/stl_algobase.h:306:17: error: '__comp' cannot be used as a function
  306 |       if (__comp(__a, __b))
      |           ~~~~~~^~~~~~~~~~
Language: C++

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


Compiler output:
a.cc: In function 'int main()':
a.cc:9:40: error: 'pow' was not declared in this scope
    9 |         if (a >= b && a >= c)ans = a * pow(2, k) + b + c;
      |                                        ^~~
a.cc:10:45: error: 'pow' was not declared in this scope
   10 |         else if (b >= a && b >= c)ans = b * pow(2, k) + a + c;
      |                                             ^~~
a.cc:11:24: error: 'pow' was not declared in this scope
   11 |         else ans = c * pow(2, k) + a + b;
      |                        ^~~
Language: C++

#include <string>
#include <queue>
#include <stack>
#include <vector>
#include <sstream>
#include <algorithm>
#include <deque>
#include <set>
#include <map>
#include <unordered_set>
#include <unordered_map>
#include <list>
#include <cstdio>
#include <iostream>
#include <cmath>
#include <climits>
#include <bitset>
#include <functional>
#include <numeric>
#include <ctime>
#include <cassert>
#include <cstring>
#include <fstream>
 
using namespace std;
int a[3];
int main(void){
  int K;
  cin>>a[0]>>a[1]>>a[2]>>K;
  sort(a,a+3);
  for(int i=0;i<K;i++){
    a[2]*=2;}
  cout<<a[0]+a[1]+a[2]<<endl;
}
return 0;
}

Compiler output:
a.cc:35:1: error: expected unqualified-id before 'return'
   35 | return 0;
      | ^~~~~~
a.cc:36:1: error: expected declaration before '}' token
   36 | }
      | ^
Language: C++

#include<cmath>
#include<iostream>
#include<algorithm>
using namespace std;
int main(){
int a[3],k;
cin>>a[0]>>a[1]>>a[2]>>k;
sort(a,a+3);
cout<<a+b+c*pow(2,k);
}

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

#include <iostream>
#include <algorithm>
#include <cmath>
#include <limits>
#include <vector>
#include <cstdio>
#include <bits/stdc++.h>
#include <set>
using namespace std;
using ll =long long;

int main (void) {
  int A,B,C;
  cin >> A >> B >> C;
  int t=max(A,B,C);
  int p,K;
  cin >> K;
  p=t*(2**K);
  ans=p-t+A+B+C;
  cout << ans;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:18:10: error: invalid type argument of unary '*' (have 'int')
   18 |   p=t*(2**K);
      |          ^~
a.cc:19:3: error: 'ans' was not declared in this scope; did you mean 'abs'?
   19 |   ans=p-t+A+B+C;
      |   ^~~
      |   abs
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:12:   required from here
   15 |   int t=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

/*
AtCoder Beginner Contest 096 B - Maximum Sum 結果:

*/

//#include<stdio.h>
//#include<string.h>
//#include<math.h>
//#include<stdlib.h>

//#define DEBUG1
//#define DEBUG2
//#define DEBUGF
//
//#ifdef DEBUG1
//#ifdef DEBUG2
//#ifdef DEBUGF
//#endif
//#define int long long

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

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

int main(void) {
	int num[3];
	int k;
	scanf("%d %d %d", &num[0], &num[1], &num[2]);
	scanf("%d", &k);
	qsort(num, 3, sizeof(int), desc);
	int a = pow(2, k)
	printf("%d\n", num[0] * a + num[1] + num[2]);
#ifdef DEBUGF
	getch();
#endif
	return 0;
}

//a = (int)sqrt((double)n) + 1;
//int ngflg = 0;
//scanf("%d", &n);
//scanf("%lld", &N);
//
//#define int long long
//signed main() {
//int *x = (int *)malloc(sizeof(int) * N);
//int *y = (int *)malloc(sizeof(int) * N);
//int desc(const void *a, const void *b) {return *(int *)b - *(int *)a;}
//qsort(num, 3, sizeof(int), desc);
//int d = pow(2, k);


Compiler output:
main.c: In function 'main':
main.c:36:9: error: expected ',' or ';' before 'printf'
   36 |         printf("%d\n", num[0] * a + num[1] + num[2]);
      |         ^~~~~~
Language: C++

#include<algorithm>
#include<cmath>
using namespace std;
int main()
{
	int a,b,c,k;
	cin>>a>>b>>c;
	cin>>k;
	int n=max(c,max(a,b));
	int sum=0;
	if(c==n)
	{
		sum+=a+b+c*pow(2,k);
	}
	else if(a==n)
	{
		sum+=b+c+a*pow(2,k);
	}
	else
	{
		sum+=a+c+b*pow(2,k);
	}
	cout<<sum<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:9: error: 'cin' was not declared in this scope
    7 |         cin>>a>>b>>c;
      |         ^~~
a.cc:3:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
    2 | #include<cmath>
  +++ |+#include <iostream>
    3 | using namespace std;
a.cc:23:9: error: 'cout' was not declared in this scope
   23 |         cout<<sum<<endl;
      |         ^~~~
a.cc:23:9: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:23:20: error: 'endl' was not declared in this scope
   23 |         cout<<sum<<endl;
      |                    ^~~~
a.cc:3:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
    2 | #include<cmath>
  +++ |+#include <ostream>
    3 | using namespace std;
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 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: In function 'int max_sum(int, int, int, int)':
a.cc:19:16: error: 'pow' is not a member of 'std'
   19 |   int r = std::pow(2, k);
      |                ^~~