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

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

int main(){
    int A, B, C, K;
    cin >> A >> B >> C >> K;
    int m = max( {A, B, C});
    int d = pow(2,K);
    cout << (A + B + C - m) + m * d << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:16: error: no matching function for call to 'max(<brace-enclosed initializer list>)'
    8 |     int 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
Language: C++

#include<iostream>
#include<string>
#include<vector>
#include<algorithm>
#include<bits/stdc++.h>
#include<cmath>
#include<bitset>
#define ll long long
#define FOR(i,a,b) for(int i=(a);i<(b);++i)
#define FFOR(i,a,b) for(int i=(a);i<=(b);++i)
#define REP(i,n)  FOR(i,0,n)
#define RREP(i,n)  FFOR(i,0,n)
#define SORT(V) sort((V).begin(),(V).end())
#define INF ((1LL<<62)-(1LL<<31))
#define MOD 1000000007
using namespace std;

int main(){
  int A,B,C,K;
  cin>>A>>B>>C>>K;
  int t=max(A,max(B,C));
  int l=t;
  REP(i,N){
    t*=2;
  }
  cout<<t+A+B+C-l<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:23:9: error: 'N' was not declared in this scope
   23 |   REP(i,N){
      |         ^
a.cc:9:37: note: in definition of macro 'FOR'
    9 | #define FOR(i,a,b) for(int i=(a);i<(b);++i)
      |                                     ^
a.cc:23:3: note: in expansion of macro 'REP'
   23 |   REP(i,N){
      |   ^~~
Language: Java


    }

    private class MyScanner {
        String[] s;
        int i;
        BufferedReader br;
        String reg = " ";
        MyScanner () {
            s = new String[0];
            i = 0;
            br = new BufferedReader(new InputStreamReader(System.in));
        }
        public String next() {
            try {
                if (i < s.length) return s[i++];
                String line = br.readLine();
                while (line.equals("")) {line = br.readLine();}
                s = line.split(reg, 0);
                i = 0;return s[i++];
            } catch (Exception e) {e.printStackTrace();}
            return null;
        }
        public int nextInt() {
            try {return Integer.parseInt(next());} catch (Exception e) {e.printStackTrace();}
            return -1;
        }
        public double nextDouble() {
            try {return Double.parseDouble(next());} catch (Exception e) {e.printStackTrace();}
            return -1;
        }
        public long nextLong()  {
            try {return Long.parseLong(next());} catch (Exception e) {e.printStackTrace();}
            return -1;
        }
    }
}

Compiler output:
Main.java:2: error: class, interface, enum, or record expected
    }
    ^
Main.java:37: error: class, interface, enum, or record expected
}
^
2 errors
Language: Java

import java.io.BufferedReader;
import java.io.InputStreamReader;

public class Main {
    public static void main(String[] args) {
        Main main = new Main();
        main.solve(args);
    }

    public void solve(String[] args) {
        MyScanner scanner = new MyScanner();

        int a = scanner.nextInt();
        int b = scanner.nextInt();
        int c = scanner.nextInt();

        int k = scanner.nextInt();

        int max = a;
        if(max<b) {
        	max=b;
        }
        if(max<c) {
        	max=c;
        }

        int sabun = a + b + c - max;

        System.out.println(sabun + (max * 2^k));


    }

    private class MyScanner {
        String[] s;
        int i;
        BufferedReader br;
        String reg = " ";
        MyScanner () {
            s = new String[0];
            i = 0;
            br = new BufferedReader(new InputStreamReader(System.in));
        }
        public String next() {
            try {
 

Compiler output:
Main.java:45: error: reached end of file while parsing
            try {
                 ^
Main.java:45: error: 'try' without 'catch', 'finally' or resource declarations
            try {
            ^
2 errors
Language: Java

import java.util.*;
class Main {
    public static void main(String[] args) {

	Scanner sc = new Scanner(System.in);
		int A = sc.nextInt();
		int B = sc.nextInt();
		int C = sc.nextInt();
		int X = sc.nextInt();

    	int ans;		
    	
    	if(A>B&A>C){
    	ans =	A * (X+1);
    	}else if(B>A&&B>C){
    	ans = B * (X+1);
    	}else if(C>A&&C>B){
    	ans = C * (X+1);	
    	}
    	System.out.println(ans);
    }
}

Compiler output:
Main.java:20: error: variable ans might not have been initialized
    	System.out.println(ans);
    	                   ^
1 error
Language: C++

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

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

Compiler output:
a.cc:2:7: error: expected nested-name-specifier before 'namespaced'
    2 | using namespaced std;
      |       ^~~~~~~~~~
a.cc: In function 'int main()':
a.cc:5:15: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    5 |   int a,b,c,k;cin>>a>>b>>c>>k;
      |               ^~~
      |               std::cin
In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:146,
                 from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:6:17: error: 'max' was not declared in this scope; did you mean 'std::max'?
    6 |   int s=a+b+c,m=max({a,b,c});
      |                 ^~~
      |                 std::max
In file included from /usr/include/c++/14/algorithm:61,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51:
/usr/include/c++/14/bits/stl_algo.h:5716:5: note: 'std::max' declared here
 5716 |     max(initializer_list<_Tp> __l, _Compare __comp)
      |     ^~~
a.cc:8:3: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    8 |   cout<<s+m<<endl;
      |   ^~~~
      |   std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:8:14: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
    8 |   cout<<s+m<<endl;
      |              ^~~~
      |              std::endl
In file included from /usr/include/c++/14/istream:41,
                 from /usr/include/c++/14/sstream:40,
                 from /usr/include/c++/14/complex:45,
                 from /usr/include/c++/14/ccomplex:39,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:127:
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
Language: C

#include <stdio.h>

int main(){
  int a[3]
  scanf("%d%d%d",&a[0],&a[1],&a[2]);
  int k;
  scanf("%d",&k);
  int max = 0;
  int x;
  for(int i=0;i<3;i++){
    if(a[i] > max){
      max = a[i];
      x = i;
    }
  }
  for(int j=0;j<k;j++){
    max *= 2;
  }
  int y = 0;
  while(y < 3){
    if(y != x){
      max += a[y];
    }
    y++;
  }
  printf("%d",max);
}

Compiler output:
main.c: In function 'main':
main.c:5:3: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'scanf'
    5 |   scanf("%d%d%d",&a[0],&a[1],&a[2]);
      |   ^~~~~
main.c:5:19: error: 'a' undeclared (first use in this function)
    5 |   scanf("%d%d%d",&a[0],&a[1],&a[2]);
      |                   ^
main.c:5:19: note: each undeclared identifier is reported only once for each function it appears in
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:5:3: error: 't' was not declared in this scope
    5 |   t=max({a,b,c})
      |   ^
a.cc:6:16: error: 'i' was not declared in this scope
    6 |   for (int i=1;i<k;i++){
      |                ^
Language: C++

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

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

#include<iostream>
#include<algorithm>
using namespace std;
int main(void){
  int a,b,c,k;
  cin>>a>>b>>c>>k;
  cout<<max({a,b,c})*(2*k-1)+a+b+c<<endl;
  return 0;
}

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

#include<iostream>
#include<cmath>

using namespace std;

int main(){
  int K;
  cin >> K;
  long long int ans = 0;
  for(int i = 1; i <= K-2;i++){
    for(int j = 1; j  <= K-1; j++){
      if(i + j + 1 > K) continue;
      int k = K - i - j;
      long long int tmp = pow(2,k) + pow(2,i) + pow(2,j);
      max = max(ans,tmp);
    }
  }
  cout << ans;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:15:24: error: overloaded function with no contextual type information
   15 |       max = max(ans,tmp);
      |                        ^
Language: C++

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

int main(){
    int A,B,C;
    cin >> A >> B >> C;
    int K ;
    cin >> K;
    int max ;
    int total= A + B + C;
    
    max = max(max(A,B),C);
    
    if(max == A){
        total -=A; 
    }else if(max == B){
        total -=B;
    }else if(max == C){
        total -=C;
    }

    for(int i = 0;i<K;i++){
        max = max * 2;
    }

    cout << total + max;

}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:18: error: 'max' cannot be used as a function
   12 |     max = max(max(A,B),C);
      |               ~~~^~~~~
a.cc:12:14: error: 'max' cannot be used as a function
   12 |     max = max(max(A,B),C);
      |           ~~~^~~~~~~~~~~~
Language: C++

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

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

    int x[] = {A, B, C};

    sort(x, x+3);

    for(int i = 1; i <= K; i++) {
        x[2] *= 2;
    }

    int ans = x[0] + x[1] + x[2];

    cout << ans;

    cout << endl;
    return 0;

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

#include <bits/stdc++.h>

using namespace std;


int main(){

	int a,b,c,k;
	cin>>a>>b>>c>>k;
  	vector<int> arr;
    arr.push_back(a);
    arr.push_back(b);
  	arr.push_back(c);
  	sort(arr);
  	cout<<arr[2] + arr[1] + arr[0];
	cout<<m;
	return 0;

}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:13: error: no matching function for call to 'sort(std::vector<int>&)'
   14 |         sort(arr);
      |         ~~~~^~~~~
In file included from /usr/include/c++/14/algorithm:61,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51,
                 from a.cc:1:
/usr/include/c++/14/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
a.cc:16:15: error: 'm' was not declared in this scope
   16 |         cout<<m;
      |               ^
Language: C++

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


Compiler output:
a.cc: In function 'int main()':
a.cc:8:35: error: 'pow' was not declared in this scope
    8 |         cout << a+b+c+max(a,b,c)*(pow(2,k)-1) << 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: In instantiation of 'constexpr const _Tp& std::max(const _Tp&, const _Tp&, _Compare) [with _Tp = int; _Compare = int]':
a.cc:8:19:   required from here
    8 |         cout << a+b+c+max(a,b,c)*(pow(2,k)-1) << endl;
      |                       ~~~^~~~~~~
/usr/include/c++/14/bits/stl_algobase.h:306:17: error: '__comp' cannot be used as a function
  306 |       if (__comp(__a, __b))
      |           ~~~~~~^~~~~~~~~~
Language: C++

#include <algorithm>
#include <iostream>
#include <numeric>
#include <string>
#include <vector>

using namespace std;

int main()
{
    int A, B, C, K;
    cin >> A >> B >> C >> K;
    int maxNum = max({ A, B, C });
    cout << A + B + C - maxNum + maxNum * pow(2, K) << endl;

    return 0;
}

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

#include<iostream>
#include<vector>
#include<string>
#include<queue>
#include<stack>
using namespace std;
int main() {
	int a, b,c; cin >> a >> b >> c;
	int mx = max({ a,b,c });
	int k; cin >> k;
	mx *= (1 << k) - 1;
	cout << a + b + c + mx << endl;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:21: error: no matching function for call to 'max(<brace-enclosed initializer list>)'
    9 |         int mx = 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 <iostream>
#include <algorithm>
using namespace std;

int main() {
	int a, b, c, k; cin >> a >> b >> c >> k;
	int sum = a + b + c - max({ a,b,c });

	sum = sum + max({ a,b,c }) * pow(2, k);

	cout << sum << endl;

	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:38: error: 'pow' was not declared in this scope
    9 |         sum = sum + max({ a,b,c }) * pow(2, k);
      |                                      ^~~
Language: C++

#include<iostream>
#include<string>
#include<vector>
#include<algorithm>
#include<math.h>
using namespace std;
int main(){
	int a, b, c, k;
	cin>> a >> b >> c >> k;

	int MAX;
	MAX = max (a,max(b,c));

	for(int i = 0;i<k;i++){
		MAX *= 2;
	}
	if(MAX == a)
	a = MAX;

	else if(MAX == b)
	b = MAX;

	else if
	c = MAX;

	
	cout<< a + b + c <<endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:24:9: error: expected '(' before 'c'
   24 |         c = MAX;
      |         ^
      |         (
Language: C++

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

int main() {
  vector<int> ans(3);
  for(int i = 0; i<3 ;i++){
    cin >> ans.at(i);
  }
  int k;
  cin >> k;
  sort(ans.begin(), ans.end());
  for(int i=0 ; i<k,i++){
    ans.at(2) = 2*ans.at(2);
  }
  int x;
  for(int i=0;i<3;i++){
    x += ans.at(i);
  }
  
  cout << x << endl;
}


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

import java.io.*;
import java.util.*;
public class Main{
    public static void main(String[] args) throws IOException{
        Reader r = new Reader();    
        int[] data = r.ii();
        int K = r.i();
        for(int i = 0; i < K; i++){
            Arrays.sort(data);
            data[2] *= 2;
        }
        print(data[0]+data[1]+data[2]);
    }
    static void print(Object o){
        System.out.println(o.toString());
    }
    static class Reader extends BufferedReader{
        Reader(){
            super(new InputStreamReader(System.in));
        }
        String s() throws IOException{
            return readLine();
        }
        String[] ss() throws IOException{
            return s().split(" ");
        }
        int Int(String s){
            return Integer.parseInt(s);
        }
        int i() throws IOException{
            return Int(s());
        }
        int[] ii() throws IOException{
            String[] ss = ss();
            int size = ss.length;
            int[] ii = new int[size];
            for(int j = 0; j < size; j++) ii[j] = Int(ss[j]);
            return ii;
        }
    }
}

Compiler output:
main.c:1:1: error: unknown type name 'import'
    1 | import java.io.*;
      | ^~~~~~
main.c:1:12: error: expected '=', ',', ';', 'asm' or '__attribute__' before '.' token
    1 | import java.io.*;
      |            ^
main.c:2:1: error: unknown type name 'import'
    2 | import java.util.*;
      | ^~~~~~
main.c:2:12: error: expected '=', ',', ';', 'asm' or '__attribute__' before '.' token
    2 | import java.util.*;
      |            ^
main.c:3:1: error: unknown type name 'public'
    3 | public class Main{
      | ^~~~~~
main.c:3:14: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'Main'
    3 | public class Main{
      |              ^~~~
Language: C++

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

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


Compiler output:
a.cc: In function 'int main()':
a.cc:6:3: error: expected ',' or ';' before 'long'
    6 |   long long Y;
      |   ^~~~
a.cc:7:25: error: 'Y' was not declared in this scope
    7 |  cin>>a[0]>>a[1]>>a[2]>>Y;
      |                         ^
Language: C++

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

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


Compiler output:
a.cc: In function 'int main()':
a.cc:6:3: error: expected ',' or ';' before 'long'
    6 |   long long Y;
      |   ^~~~
a.cc:7:25: error: 'Y' was not declared in this scope
    7 |  cin>>a[0]>>a[1]>>a[2]>>Y;
      |                         ^
a.cc:10:8: error: expected ';' before '}' token
   10 | a[2]*=2
      |        ^
      |        ;
   11 | }
      | ~
Language: C++

#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define pii  pair<int,int>
#define vpii vector<pii>
#define vll  vector<ll>
#define vi  vector<int>
#define pb push_back
#define f  first
#define s  second
  

int main() {

   int a,b,c;
   cin>>a>>b>>c;
   
   int arr[3] = {a,b,c};
   
   sort(arr,arr+3);
   cout<<arr[0]+arr[1]+(2*k*arr[2]);
	return 0;
}

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

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

int main(){
    int n;
    int k[3];
    cin>>k[0]>>k[1]>>k[2]>>n;
    sort(k.begin(), k.end());

    cout<<k[0]+k[1]+k[2]*pow(2, n)<<endl;

    
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:9:12: error: request for member 'begin' in 'k', which is of non-class type 'int [3]'
    9 |     sort(k.begin(), k.end());
      |            ^~~~~
a.cc:9:23: error: request for member 'end' in 'k', which is of non-class type 'int [3]'
    9 |     sort(k.begin(), k.end());
      |                       ^~~
a.cc:11:26: error: 'pow' was not declared in this scope
   11 |     cout<<k[0]+k[1]+k[2]*pow(2, n)<<endl;
      |                          ^~~
Language: C++

A, B, C = map(int, input().split())
K = int(input())

ans = A + B + C - max(A, B, C) * (K - 1) *2
  
print(int(ans))

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

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:11:11: error: expected unqualified-id before '=' token
   11 |   for(int =0;i<K;i++){
      |           ^
a.cc:11:10: error: expected ';' before '=' token
   11 |   for(int =0;i<K;i++){
      |          ^~
      |          ;
a.cc:11:11: error: expected primary-expression before '=' token
   11 |   for(int =0;i<K;i++){
      |           ^
a.cc:11:14: error: 'i' was not declared in this scope
   11 |   for(int =0;i<K;i++){
      |              ^
a.cc:11:17: error: expected ')' before ';' token
   11 |   for(int =0;i<K;i++){
      |      ~          ^
      |                 )
a.cc:11:18: error: 'i' was not declared in this scope
   11 |   for(int =0;i<K;i++){
      |                  ^
Language: C++

#include <iostream>
#include <vector>
#include <map>
#include <set>
#include <string>
using namespace std;
typedef long long ll;

int main()
{
    vector<int> nums(3);
    for (int i = 0; i < 3; i++)
        cin >> nums.at(i);
    int K;
    cin >> K;

    sort(nums.begin(), nums.end());
    for (int i = 0; i < K; i++)
    {
        nums.at(2) *= 2;
    }

    cout << nums.at(0) + nums.at(1) + nums.at(2) << endl;
}

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

#include <iostream>
using namespace std;

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

Compiler output:
a.cc: In function 'int main()':
a.cc:9:18: error: no matching function for call to 'max(<brace-enclosed initializer list>)'
    9 |     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<iostream>
using namespace std;

int main() {
  int A,B,C,K;
  cin >> A >> B >> C >> K;
  if(A => B && A => C) {
   cout << A * ( 2 * K ) + B + C << endl;
  }
  if(B => A && B => C) {
   cout << B * ( 2 * K ) + A + C << endl;
  }
  if(C => A && C => B) {
    cout << C * ( 2 * K ) + A + B << endl;
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:9: error: expected primary-expression before '>' token
    7 |   if(A => B && A => C) {
      |         ^
a.cc:7:19: error: expected primary-expression before '>' token
    7 |   if(A => B && A => C) {
      |                   ^
a.cc:10:9: error: expected primary-expression before '>' token
   10 |   if(B => A && B => C) {
      |         ^
a.cc:10:19: error: expected primary-expression before '>' token
   10 |   if(B => A && B => C) {
      |                   ^
a.cc:13:9: error: expected primary-expression before '>' token
   13 |   if(C => A && C => B) {
      |         ^
a.cc:13:19: error: expected primary-expression before '>' token
   13 |   if(C => A && C => B) {
      |                   ^
Language: C++

#include<iostream>
using namespace std;

int main() {
  int A,B,C,K
  cin >> A >> B >> C >> K;
  if(A => B && A => C) {
   cout << A * ( 2 * K ) + B + C << endl;
  }
  if(B => A && B => C) {
   cout << B * ( 2 * K ) + A + C << endl;
  }
  if(C => A && C => B) {
    cout << C * ( 2 * K ) + A + B << endl;
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:3: error: expected initializer before 'cin'
    6 |   cin >> A >> B >> C >> K;
      |   ^~~
a.cc:7:9: error: expected primary-expression before '>' token
    7 |   if(A => B && A => C) {
      |         ^
a.cc:7:19: error: expected primary-expression before '>' token
    7 |   if(A => B && A => C) {
      |                   ^
a.cc:8:22: error: 'K' was not declared in this scope
    8 |    cout << A * ( 2 * K ) + B + C << endl;
      |                      ^
a.cc:10:9: error: expected primary-expression before '>' token
   10 |   if(B => A && B => C) {
      |         ^
a.cc:10:19: error: expected primary-expression before '>' token
   10 |   if(B => A && B => C) {
      |                   ^
a.cc:11:22: error: 'K' was not declared in this scope
   11 |    cout << B * ( 2 * K ) + A + C << endl;
      |                      ^
a.cc:13:9: error: expected primary-expression before '>' token
   13 |   if(C => A && C => B) {
      |         ^
a.cc:13:19: error: expected primary-expression before '>' token
   13 |   if(C => A && C => B) {
      |                   ^
a.cc:14:23: error: 'K' was not declared in this scope
   14 |     cout << C * ( 2 * K ) + A + B << endl;
      |                       ^
Language: C++

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

int main()
{
    int kk;
    vector<int> abc(3);
    cin >> abc[0] >> abc[1] >> abc[2] >> kk;
    int sum,max,index;
    for(int i = 0; i < k; i++){
        max = 0;
        for(int j = 0; j < 3; j++){
            sum = 0;
            for(int k = 0; k < 3; k++){
                if(j == k){
                    sum += abc[k]*2;
                }else{
                    sum += abc[k];
                }
            }
            if(max > sum){
                max = sum;
                index = j;
            }
        }
        abc[index] *= 2;
    }
    cout << abc[0]+abc[1]+abc[2] << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:24: error: 'k' was not declared in this scope
   10 |     for(int i = 0; i < k; i++){
      |                        ^
Language: C++

abc = list(map(int,input().split()))
K = int(input())


def my_pow(b,p):
    tmp = 1
    for i in range(0,p):
        tmp *= b
    return tmp


abc = sorted(abc)

print(abc[0] + abc[1] + abc[2] * my_pow(2,K))

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

#include<iostream>
#include<vector>
#include<algorithm>
using namespace std;
const long long MOD = 1e9 + 7, INF = 1e18;
int main() {
	int k;
	vector<int>a(3);
	cin >> a[0] >> a[1] >> a[2] >> k;
	sort(a.begin(),a.end());
	cout << a[0] + a[1] + a[2] * pow(2,k) << endl;
}





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

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

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

	cin >> num[0] >> num[1] >> num[2] >> k;

	sort(num, num + 3);
	sum = num[0] + num[1];
	for (int i = 1; i <= k; i++) {
		num[2] *= 2 ;
	}
	cout << num[0] + num[1] + num[3] << endl;
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:11:9: error: 'sum' was not declared in this scope; did you mean 'num'?
   11 |         sum = num[0] + num[1];
      |         ^~~
      |         num
Language: C++

#include<iostream>
#include<algorithm>

using namespace std;

int main(){
    int num[3], k;
    cin >> num[0] >> num[1] >> num[2] >> k;

    sort(num, num+3);
    for(int i=0;i<k;i++)num *= 2;
    cout << num[0] + num[1] + num[2] << endl;

}


Compiler output:
a.cc: In function 'int main()':
a.cc:11:29: error: invalid operands of types 'int [3]' and 'int' to binary 'operator*'
   11 |     for(int i=0;i<k;i++)num *= 2;
      |                         ~~~~^~~~
a.cc:11:29: note:   in evaluation of 'operator*=(int [3], int)'
Language: C++

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


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

#include <iostream>
#include <stdio.h>
#include <string>
#include <algorithm>
#include <cmath>
#include <vector>
#include <cstdlib>
using namespace std;
#define REP(i,n) for(int i = 0;i < (int)(n);i++)

int main() {
	int a,b,c,k,ans,x;
	cin >> a >> b >> c >> k ;
	x = max(a, b, c);
	ans = a + b + c;
	REP(i, k) {
		ans += x;
		x *= 2;
	}
	cout << ans;
	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:9:   required from here
   14 |         x = 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 <stdio.h>
int main(void){
int a,b,c,k;
  scanf("%d %d %d",&a,&b,&c);
  scanf("%d",&k);
  for(;;)
    if(a=>b&&a=>c){c=c*2; k--;}
      else if(b=>a&&b=>c){b=b*2; k--;}
  		else if(c=>a&&c=>b){c=c*2; k--;}
  if(k==0){break;}
  
  printf("%d",a+b+c);
return 0;
}

Compiler output:
main.c: In function 'main':
main.c:7:10: error: expected expression before '>' token
    7 |     if(a=>b&&a=>c){c=c*2; k--;}
      |          ^
main.c:8:17: error: expected expression before '>' token
    8 |       else if(b=>a&&b=>c){b=b*2; k--;}
      |                 ^
main.c:9:27: error: expected expression before '>' token
    9 |                 else if(c=>a&&c=>b){c=c*2; k--;}
      |                           ^
main.c:10:12: error: break statement not within loop or switch
   10 |   if(k==0){break;}
      |            ^~~~~
Language: C++

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:9:13: error: expected ';' before 'for'
    9 |     s = a[2]
      |             ^
      |             ;
   10 |     for(i=0; i<k; i++){
      |     ~~~      
a.cc:10:22: error: expected ';' before ')' token
   10 |     for(i=0; i<k; i++){
      |                      ^
      |                      ;
Language: C++

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

int main(){
    int a, b, c, k, m, i;
    long int s;
    cin >> a >> b >> c >> k;
    m = (s = max(a, b, c));
    for(i=0; i<k; i++){
        s *= 2;
    }
    if(m != a){
        s += a;
    }
    if(m != b){
        s += b;
    }
    if(m != c){
        s += c;
    }
    cout << s;
    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:8:17:   required from here
    8 |     m = (s = max(a, b, c));
      |              ~~~^~~~~~~~~
/usr/include/c++/14/bits/stl_algobase.h:306:17: error: '__comp' cannot be used as a function
  306 |       if (__comp(__a, __b))
      |           ~~~~~~^~~~~~~~~~
Language: C++

#include<bits/stdc++.h>
#define REP(i,n) for(int i=0;i<(n);i++)
#define ALL(v) (v).begin(),(v).end()
#define int long long
using namespace std;
typedef vector<int>   vint;
typedef pair<int,int> pint;

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


Compiler output:
In file included from /usr/include/c++/14/algorithm:60,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_algobase.h: In instantiation of 'constexpr const _Tp& std::max(const _Tp&, const _Tp&, _Compare) [with _Tp = long long int; _Compare = long long int]':
a.cc:13:24:   required from here
   13 |     int ans=(a+b+c)+max(a,b,c)*((1<<k)-1);
      |                     ~~~^~~~~~~
/usr/include/c++/14/bits/stl_algobase.h:306:17: error: '__comp' cannot be used as a function
  306 |       if (__comp(__a, __b))
      |           ~~~~~~^~~~~~~~~~
Language: Java

import java.util.Scanner;
public class Practice190216 {
	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int A = scan.nextInt();
		int B = scan.nextInt();
		int C = scan.nextInt();
		int K = scan.nextInt();
		int max;
		if(A <= B) {
			if(B <= C) {
				max = C;
			}else {
				max = B;
			}
		}else {
			if(A <= C) {
				max = C;
			}else {
				max = A;
			}
		}
		if(max == A) {
			max = max * (K * 2);
			max = max + B + C;
		}else if(max == B) {
			max = max * (K * 2);
			max = max + A + C;
		}else {
			max = max * (K * 2);
			max = max + B + A;
		}
		System.out.println(max);
	}
}

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

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

int main(){
  int i,j,k;
  int A[N];
  scanf("%d %d %d",&A[0],&A[1],&A[2]);
  scanf("%d",&k);
  int tmp;
  for (i=0; i<3; ++i) {
    for (j=i+1; j<3; ++j) {
      if (A[i] > A[j]) {
        tmp =  A[i];
        A[i] = A[j];
        A[j] = tmp;
      }
    }
  }

  for(i=0;i<k;i++)
    A[2]*=2;
  
  printf("%d\n",A[0]+A[1]+A[2]);
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:6:9: error: 'N' undeclared (first use in this function)
    6 |   int A[N];
      |         ^
main.c:6:9: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include<stdio.h>
#define max(a,b) ((a)>(b)?(a):(b))

int main(){
  int a,b,c,k,i;
  scanf("%d%d%d%d",&a,&b,&c,&k);
  for(i=0;i<k;i++){
    max(a,max(b,c))*=2;
  }
  printf("%d",a+b+c);
}

Compiler output:
main.c: In function 'main':
main.c:8:20: error: lvalue required as left operand of assignment
    8 |     max(a,max(b,c))*=2;
      |                    ^~
Language: C

#include<stdio.h>

int main(){
  int A, B, C, X;
  scanf("%d %d %d", &A, &B, &C);
  scanf("%d", &K);
  
  for (int i = 0; i < K; i++){
    if(A >= B && A >= C){
      A *= 2;
    } else if(B >= A && B >= C){
      B *= 2;
    } else {
      C *= 2;
    }
  }
  
  printf("%d\n", A + B + C);
  
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:6:16: error: 'K' undeclared (first use in this function)
    6 |   scanf("%d", &K);
      |                ^
main.c:6:16: note: each undeclared identifier is reported only once for each function it appears in
Language: C

a, b, c = (int(x) for x in input().split())
k = int(input())
res =0

res += sum((a,b,c)) + max(a,b,c)*(2**k) - max(a,b,c)

print(res)

Compiler output:
main.c:1:1: warning: data definition has no type or storage class
    1 | a, b, c = (int(x) for x in input().split())
      | ^
main.c:1:1: error: type defaults to 'int' in declaration of 'a' [-Wimplicit-int]
main.c:1:4: error: type defaults to 'int' in declaration of 'b' [-Wimplicit-int]
    1 | a, b, c = (int(x) for x in input().split())
      |    ^
main.c:1:7: error: type defaults to 'int' in declaration of 'c' [-Wimplicit-int]
    1 | a, b, c = (int(x) for x in input().split())
      |       ^
main.c:1:16: error: expected ')' before 'x'
    1 | a, b, c = (int(x) for x in input().split())
      |                ^
      |                )
main.c:1:18: error: expected ')' before 'for'
    1 | a, b, c = (int(x) for x in input().split())
      |           ~      ^~~~
      |                  )
main.c:2:1: error: expected ',' or ';' before 'k'
    2 | k = int(input())
      | ^
Language: C++

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:9:7: error: redeclaration of 'int a'
    9 |   int a=1;
      |       ^
a.cc:6:7: note: 'int a' previously declared here
    6 |   int a,b,c,k;
      |       ^
Language: C++

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

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

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

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:11:21: error: invalid type argument of unary '*' (have 'int')
   11 |     cout << max_num**k + a+b+c - max_num << endl;
      |                     ^~
Language: C++

#include <iostream>
#include <cmath>

int main() {
    int A, B, C, K;
    std::cin >> A >> B >> C >> K;
    
    int ans = (A + B + C) + std::max({A, B, C}) * std::pow(2, K) - std::max({A, B, C});
    std::cout << ans << std::endl;
}

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



#include <stdio.h>

using namespace std;

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

Compiler output:
a.cc: In function 'int main()':
a.cc:9:3: error: 'cin' was not declared in this scope
    9 |   cin >> a >> b >> c >>k;
      |   ^~~
a.cc:4:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
    3 | #include <stdio.h>
  +++ |+#include <iostream>
    4 | 
a.cc:11:13: error: 'max' was not declared in this scope
   11 |   int d=max(max(a,b),c);
      |             ^~~
a.cc:11:9: error: 'max' was not declared in this scope
   11 |   int d=max(max(a,b),c);
      |         ^~~
a.cc:16:3: error: 'cout' was not declared in this scope
   16 |   cout << answer+e-d << endl;
      |   ^~~~
a.cc:16:3: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:16:25: error: 'endl' was not declared in this scope
   16 |   cout << answer+e-d << endl;
      |                         ^~~~
a.cc:4:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
    3 | #include <stdio.h>
  +++ |+#include <ostream>
    4 |
Language: C++

#include <stdio.h>

using namespace std;

int main() {
   vector<int> vec(3);
  for(int i=0;i<3;i++){
    cin >> vec.at(i);
  }
  sort(vec.begin(), vec.end());
  int answer=vec.at(1)+vec.at(0);
  int k;
  cin >> k;
  int d=vec.at(2);
  for(int i=0;i<k;i++){
    d=d*2;
  }
  cout << answer+d << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:4: error: 'vector' was not declared in this scope
    6 |    vector<int> vec(3);
      |    ^~~~~~
a.cc:2:1: note: 'std::vector' is defined in header '<vector>'; this is probably fixable by adding '#include <vector>'
    1 | #include <stdio.h>
  +++ |+#include <vector>
    2 | 
a.cc:6:11: error: expected primary-expression before 'int'
    6 |    vector<int> vec(3);
      |           ^~~
a.cc:8:5: error: 'cin' was not declared in this scope
    8 |     cin >> vec.at(i);
      |     ^~~
a.cc:2:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
    1 | #include <stdio.h>
  +++ |+#include <iostream>
    2 | 
a.cc:8:12: error: 'vec' was not declared in this scope
    8 |     cin >> vec.at(i);
      |            ^~~
a.cc:10:8: error: 'vec' was not declared in this scope
   10 |   sort(vec.begin(), vec.end());
      |        ^~~
a.cc:10:3: error: 'sort' was not declared in this scope; did you mean 'short'?
   10 |   sort(vec.begin(), vec.end());
      |   ^~~~
      |   short
a.cc:13:3: error: 'cin' was not declared in this scope
   13 |   cin >> k;
      |   ^~~
a.cc:13:3: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:18:3: error: 'cout' was not declared in this scope
   18 |   cout << answer+d << endl;
      |   ^~~~
a.cc:18:3: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:18:23: error: 'endl' was not declared in this scope
   18 |   cout << answer+d << endl;
      |                       ^~~~
a.cc:2:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
    1 | #include <stdio.h>
  +++ |+#include <ostream>
    2 |
Language: C++

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:11:28: error: expected ')' before ';' token
   11 |   for(int i = 0; i < k; i++;){
      |      ~                     ^
      |                            )
a.cc:11:29: error: expected primary-expression before ')' token
   11 |   for(int i = 0; i < k; i++;){
      |                             ^
a.cc:14:37: error: expected '}' at end of input
   14 |   cout << n + a + b + c - m << endl;
      |                                     ^
a.cc:6:1: note: to match this '{'
    6 | {
      | ^