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

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;


namespace ACprac
{
    class Program
    {
        static void Main(string[] args)
        {
            string[] itmp = Console.ReadLine().Split(' ');
            int m = int.Parse(itmp[0]);
            int d = int.Parse(itmp[1]);

            if (m <= d)
            {
                Console.WriteLine(m);
            }
            else
            {
                Console.WriteLine(m-1);
            }
        }
    }
}

Compiler output:
a.cc:1:7: error: expected nested-name-specifier before 'System'
    1 | using System;
      |       ^~~~~~
a.cc:2:7: error: expected nested-name-specifier before 'System'
    2 | using System.Collections.Generic;
      |       ^~~~~~
a.cc:3:7: error: expected nested-name-specifier before 'System'
    3 | using System.Linq;
      |       ^~~~~~
a.cc:4:7: error: expected nested-name-specifier before 'System'
    4 | using System.Text;
      |       ^~~~~~
a.cc:5:7: error: expected nested-name-specifier before 'System'
    5 | using System.Threading.Tasks;
      |       ^~~~~~
a.cc:12:26: error: 'string' has not been declared
   12 |         static void Main(string[] args)
      |                          ^~~~~~
a.cc:12:35: error: expected ',' or '...' before 'args'
   12 |         static void Main(string[] args)
      |                                   ^~~~
a.cc:27:6: error: expected ';' after class definition
   27 |     }
      |      ^
      |      ;
a.cc: In static member function 'static void ACprac::Program::Main(int*)':
a.cc:14:13: error: 'string' was not declared in this scope
   14 |             string[] itmp = Console.ReadLine().Split(' ');
      |             ^~~~~~
a.cc:14:20: error: expected primary-expression before ']' token
   14 |             string[] itmp = Console.ReadLine().Split(' ');
      |                    ^
a.cc:15:21: error: expected primary-expression before 'int'
   15 |             int m = int.Parse(itmp[0]);
      |                     ^~~
a.cc:16:21: error: expected primary-expression before 'int'
   16 |             int d = int.Parse(itmp[1]);
      |                     ^~~
a.cc:20:17: error: 'Console' was not declared in this scope
   20 |                 Console.WriteLine(m);
      |                 ^~~~~~~
a.cc:24:17: error: 'Console' was not declared in this scope
   24 |                 Console.WriteLine(m-1);
      |                 ^~~~~~~
Language: C

#include<stdio.h>
int main(){
   int a,b,c;
   scanf("%d %d",&a,&b);
   if(a＜＝b){
      c=a+1};
   else{
      c=a};
   printf("%d",c);
   return 0;
}



Compiler output:
main.c: In function 'main':
main.c:5:7: error: 'a\U0000ff1c\U0000ff1db' undeclared (first use in this function)
    5 |    if(a＜＝b){
      |       ^~~~~~
main.c:5:7: note: each undeclared identifier is reported only once for each function it appears in
main.c:6:12: error: expected ';' before '}' token
    6 |       c=a+1};
      |            ^
      |            ;
main.c:7:4: error: 'else' without a previous 'if'
    7 |    else{
      |    ^~~~
main.c:8:10: error: expected ';' before '}' token
    8 |       c=a};
      |          ^
      |          ;
Language: C++

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

int main() {
	int a,b;
	cin>>a>>b;
	if(a<b)cout<<a<<endl;
	else if(a==b)cout<<a<<endl
	else cout<<b<<endl;
  return 0;
  }

Compiler output:
a.cc: In function 'int main()':
a.cc:9:35: error: expected ';' before 'else'
    9 |         else if(a==b)cout<<a<<endl
      |                                   ^
      |                                   ;
   10 |         else cout<<b<<endl;
      |         ~~~~
Language: C

// ABC096-A
// OrangeStar

#include<stdio.h>

int main(void){
  int a, b;

  scanf("%d %d", &a, &b);

  if(a>b){
    printf("%d", a)
  }else{
    printf("%d", b)
  }

  return 0;
}


Compiler output:
main.c: In function 'main':
main.c:12:20: error: expected ';' before '}' token
   12 |     printf("%d", a)
      |                    ^
      |                    ;
   13 |   }else{
      |   ~                 
main.c:14:20: error: expected ';' before '}' token
   14 |     printf("%d", b)
      |                    ^
      |                    ;
   15 |   }
      |   ~
Language: C++

#include<iostream>

int main(){
  int a, b;
  cin >> a >> b;
  if( a >= b ) cout << a << endl;
  else cout << a - 1 << endl;

  return 0;
}

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

#include <bits/stdc++.h>
using namespace std;
int main(){
  const ll MOD = 1000000007;
  int a, b;
  cin >> a >> b;
  if(a > b){
      a--;
  }
  cout << a << endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:4:9: error: 'll' does not name a type
    4 |   const ll MOD = 1000000007;
      |         ^~
Language: C++

#include<cstdio>

using namespace std;

int main(){
int a, b, ans;

scanf("%d,%d", &a, &b);

if(a == 1){
printf('1');
}else if(a > b){
a = a - 1;
printf("%d", a);
}else{
printf("%d", a);
}

return 0;
}



Compiler output:
a.cc: In function 'int main()':
a.cc:11:8: error: invalid conversion from 'char' to 'const char*' [-fpermissive]
   11 | printf('1');
      |        ^~~
      |        |
      |        char
In file included from /usr/include/c++/14/cstdio:42,
                 from a.cc:1:
/usr/include/stdio.h:363:43: note:   initializing argument 1 of 'int printf(const char*, ...)'
  363 | extern int printf (const char *__restrict __format, ...);
      |                    ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~
Language: C++


#include <bits/stdc++.h>
using namespace std;
typedef signed long long ll;

#undef _P
#define _P(...) (void)printf(__VA_ARGS__)
#define FOR(x,to) for(x=0;x<(to);x++)
#define FORR(x,arr) for(auto& x:arr)
#define ITR(x,c) for(__typeof(c.begin()) x=c.begin();x!=c.end();x++)
#define ALL(a) (a.begin()),(a.end())
#define ZERO(a) memset(a,0,sizeof(a))
#define MINUS(a) memset(a,0xff,sizeof(a))
//-------------------------------------------------------

int N;


void solve() {
	int i,j,k,l,r,x,y; string s;
	int a, b;
	cin>>a>>b;

        if(a>b){
            return a-1;
        }else{
            return a;
        }
        
}


int main(int argc,char** argv){
	string s;int i;
	if(argc==1) ios::sync_with_stdio(false), cin.tie(0);
	FOR(i,argc-1) s+=argv[i+1],s+='\n'; FOR(i,s.size()) ungetc(s[s.size()-1-i],stdin);
	cout.tie(0); solve(); return 0;
}


Compiler output:
a.cc: In function 'void solve()':
a.cc:25:21: error: return-statement with a value, in function returning 'void' [-fpermissive]
   25 |             return a-1;
      |                    ~^~
a.cc:27:20: error: return-statement with a value, in function returning 'void' [-fpermissive]
   27 |             return a;
      |                    ^
Language: C++

#include <iostream>
using namespace std;

int main() {
	int a, b;
	cin >> a >> b;
	if (a <= b) {
		cout << a << endl;
	} else (a > b) {
		cout << a - 1 << endl;
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:23: error: expected ';' before '{' token
    9 |         } else (a > b) {
      |                       ^~
      |                       ;
Language: C++

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


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

def main():
    a, b = input().split()
    a = int(a)
    b = int(b)

    if a > b:
        print(a-1)
    else:
        print(a)

if __name__ == "__main__":
        main()


Compiler output:
a.cc:1:1: error: 'def' does not name a type
    1 | def main():
      | ^~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main (){
int a,b;
cin>>a>>b;
if(a<=b){
	cout<<a;
}
else if(a==0||b==0){
	cout<<'0;'
}
else{
	cout<<b;
}
return 0;
}

Compiler output:
a.cc:10:15: warning: multi-character character constant [-Wmultichar]
   10 |         cout<<'0;'
      |               ^~~~
a.cc: In function 'int main()':
a.cc:10:19: error: expected ';' before '}' token
   10 |         cout<<'0;'
      |                   ^
      |                   ;
   11 | }
      | ~
Language: C++

#include <bits/stdc++.h>
using namespace std;
#define LL long long
#undef INT_MIN
#undef INT_MAX
#define INT_MIN -2147483648
#define INT_MAX 2147483647
#define LL_MIN -9223372036854775808
#define LL_MAX 9223372036854775807
int main(){
    int a,b;
    cin >> a >> b;
    if(a < b) cout << a << endl;
    else cout << a-1 << endl;
    
    retu

Compiler output:
a.cc: In function 'int main()':
a.cc:16:5: error: 'retu' was not declared in this scope
   16 |     retu
      |     ^~~~
a.cc:16:9: error: expected '}' at end of input
   16 |     retu
      |         ^
a.cc:10:11: note: to match this '{'
   10 | int main(){
      |           ^
Language: C++

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

Compiler output:
a.cc:10:15: warning: multi-character character constant [-Wmultichar]
   10 |         cout<<'0;'
      |               ^~~~
a.cc: In function 'int main()':
a.cc:10:19: error: expected ';' before '}' token
   10 |         cout<<'0;'
      |                   ^
      |                   ;
   11 | }
      | ~
Language: C++

import std.stdio;
import std.string;
import std.conv;
import std.algorithm;

void main() {
    int[] buf = readln.chomp.split.to!(int[]);
    int a = buf[0], b = buf[1];
    int ans = a - 1 + (a <= b ? 1 : 0);

    writeln(ans);
}

Compiler output:
a.cc:1:1: error: 'import' does not name a type
    1 | import std.stdio;
      | ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:2:1: error: 'import' does not name a type
    2 | import std.string;
      | ^~~~~~
a.cc:2:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:3:1: error: 'import' does not name a type
    3 | import std.conv;
      | ^~~~~~
a.cc:3:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:4:1: error: 'import' does not name a type
    4 | import std.algorithm;
      | ^~~~~~
a.cc:4:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:6:1: error: '::main' must return 'int'
    6 | void main() {
      | ^~~~
a.cc: In function 'int main()':
a.cc:7:8: error: structured binding declaration cannot have type 'int'
    7 |     int[] buf = readln.chomp.split.to!(int[]);
      |        ^~
a.cc:7:8: note: type must be cv-qualified 'auto' or reference to cv-qualified 'auto'
a.cc:7:8: error: empty structured binding declaration
a.cc:7:11: error: expected initializer before 'buf'
    7 |     int[] buf = readln.chomp.split.to!(int[]);
      |           ^~~
a.cc:8:13: error: 'buf' was not declared in this scope
    8 |     int a = buf[0], b = buf[1];
      |             ^~~
a.cc:9:29: error: 'b' was not declared in this scope
    9 |     int ans = a - 1 + (a <= b ? 1 : 0);
      |                             ^
a.cc:11:5: error: 'writeln' was not declared in this scope
   11 |     writeln(ans);
      |     ^~~~~~~
Language: C++

#include <iostream>
using namespace std;
int main(void){
    int a, b;
    cin >> a >> b
    if(a <= b){
        return a
    }else if (a > b){
        return a - 1
    }
    
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:18: error: expected ';' before 'if'
    5 |     cin >> a >> b
      |                  ^
      |                  ;
    6 |     if(a <= b){
      |     ~~            
a.cc:8:6: error: 'else' without a previous 'if'
    8 |     }else if (a > b){
      |      ^~~~
a.cc:9:21: error: expected ';' before '}' token
    9 |         return a - 1
      |                     ^
      |                     ;
   10 |     }
      |     ~
Language: C++

#include <cstdio>

using namespce std;

int main(){
    int a,b;
    scanf("%d%d",&a,&b);
    if(a<=b){
        printf("%d",a);
    }
    else if(b<=12){
        printf("%d",b);
    }
    else printf("12");
    return 0;
}

Compiler output:
a.cc:3:7: error: expected nested-name-specifier before 'namespce'
    3 | using namespce std;
      |       ^~~~~~~~
Language: C++

import Data.Array.IO
import Control.Applicative
import Data.List
import Control.Monad

getLineN :: Int -> IO [String]
getLineN n = replicateM n getLine

getNum = read <$> getLine :: IO Int
getNumList = map read.words <$> getLine :: IO [Int]

main = do
    [a,b] <- getNumList
    putStrLn.show $ length $ filter (\(c,d) -> c <=a && d <= b) $ zip [1..12] [1..12]

Compiler output:
a.cc:14:38: error: stray '\' in program
   14 |     putStrLn.show $ length $ filter (\(c,d) -> c <=a && d <= b) $ zip [1..12] [1..12]
      |                                      ^
a.cc:14:72: error: too many decimal points in number
   14 |     putStrLn.show $ length $ filter (\(c,d) -> c <=a && d <= b) $ zip [1..12] [1..12]
      |                                                                        ^~~~~
a.cc:14:80: error: too many decimal points in number
   14 |     putStrLn.show $ length $ filter (\(c,d) -> c <=a && d <= b) $ zip [1..12] [1..12]
      |                                                                                ^~~~~
a.cc:1:1: error: 'import' does not name a type
    1 | import Data.Array.IO
      | ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
Language: C++

#include<iostream>
#include<algorithm>
#include<math.h>
using namespace std;
using ll = long long;

int main() {
	int a, b;
	cin >> a >> b;
	if (a > b)cout << a - 1<<endl;;
	else cout << a<<endl;;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:11:9: error: 'else' without a previous 'if'
   11 |         else cout << a<<endl;;
      |         ^~~~
Language: C++

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

int main(){
    int a , int b;
    cin>>a>>b;
    cout<<min(a,b);
}


Compiler output:
a.cc: In function 'int main()':
a.cc:8:13: error: expected unqualified-id before 'int'
    8 |     int a , int b;
      |             ^~~
a.cc:9:13: error: 'b' was not declared in this scope
    9 |     cin>>a>>b;
      |             ^
Language: C++

int main()
{
	int A, B, C, X, Y,a,b;
	cin >> A >> B ;

	if (B > A)
		A++;

	cout << A;

	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:4:9: error: 'cin' was not declared in this scope
    4 |         cin >> A >> B ;
      |         ^~~
a.cc:9:9: error: 'cout' was not declared in this scope
    9 |         cout << A;
      |         ^~~~
Language: C++

#include<bits/stdc++.h>

#define REP(i,s,n) for(int i=s;i<n;++i)
#define rep(i,n) REP(i,0,n)
#define ALL(x) x.begin(),x.end()
#define EPS (1e-8)
#define equals(a,b) (fabs((a)-(b))<EPS)

using namespace std;

typedef long long ll;

bool LT(double a,double b) { return !equals(a,b) && a < b; }
bool LTE(double a,double b) { return equals(a,b) || a < b; }


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

#include<iostream>
#include<algorithm>
#include<cstdio>
#include<cstdlib>
#include<cmath>
#include<vector>
#include<string>
#include<sstream>
using namespace std;
int inf = 1000000000;

int main(){

  int a, b;
  cin >> a >> b;

  if( a <= b ) cout << a << endl;
  else cout << a-1A << endl;

  return 0;
}





//


Compiler output:
a.cc: In function 'int main()':
a.cc:18:18: error: unable to find numeric literal operator 'operator""A'
   18 |   else cout << a-1A << endl;
      |                  ^~
Language: C++

#include <cstdio>

using namespce std;

int main(){
    int a,b;
    scanf("%d%d",&a,&b);
    if(a<=b){
        printf(a);
    }
    else if(b<=12){
        printf(b);
    }
    else printf("12");
    return 0;
}

Compiler output:
a.cc:3:7: error: expected nested-name-specifier before 'namespce'
    3 | using namespce std;
      |       ^~~~~~~~
a.cc: In function 'int main()':
a.cc:9:16: error: invalid conversion from 'int' to 'const char*' [-fpermissive]
    9 |         printf(a);
      |                ^
      |                |
      |                int
In file included from /usr/include/c++/14/cstdio:42,
                 from a.cc:1:
/usr/include/stdio.h:363:43: note:   initializing argument 1 of 'int printf(const char*, ...)'
  363 | extern int printf (const char *__restrict __format, ...);
      |                    ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~
a.cc:12:16: error: invalid conversion from 'int' to 'const char*' [-fpermissive]
   12 |         printf(b);
      |                ^
      |                |
      |                int
/usr/include/stdio.h:363:43: note:   initializing argument 1 of 'int printf(const char*, ...)'
  363 | extern int printf (const char *__restrict __format, ...);
      |                    ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~
Language: C++

#include <iostream>

int main(void){
	int a,b;
	cin >> a >> b;
	if(a > b)
		cout << a -1;
	
	else
		cout << a;
		
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:9: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    5 |         cin >> a >> b;
      |         ^~~
      |         std::cin
In file included from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:7:17: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    7 |                 cout << a -1;
      |                 ^~~~
      |                 std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:10:17: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   10 |                 cout << a;
      |                 ^~~~
      |                 std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
Language: C++

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

int main()
{
    int a,b;
    scanf("%d%d",&a,&b);
    printf("%d\n",b>=a?a,a-1);
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:9:29: error: expected ':' before ')' token
    9 |     printf("%d\n",b>=a?a,a-1);
      |                             ^
      |                             :
a.cc:9:29: error: expected primary-expression before ')' token
Language: C++

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

typedef long long ll;
typedef pair<ll,ll> P;

const double PI = 3.14159265358979323846;
const double EPS = 1e-12;
const ll INF = 1LL<<29;
const ll mod = 1e9+7;

#define rep(i, a, b) for(ll (i) = (a); (i) < (b);++i)

int main()
{
  ll a, b;
  cin >> a >> b;
  if (a > b)
  {
    cut << a-1 << endl;
  }else{
    cout << a << endl;
  }
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:20:5: error: 'cut' was not declared in this scope
   20 |     cut << a-1 << endl;
      |     ^~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
#define ll long long
#define FOR(i,n,m) for(ll i=(n);i<(m);i++)
#define REP(i,n) FOR(i,0,n)
#define REPR(i,n) for(ll i=(n);i>=0;i--)
#define all(vec) vec.begin(),vec.end()
using vi=vector<int>;
using vvi=vector<vi>;
using vl=vector<ll>;
using vvl=vector<vl>;
using P=pair<ll,ll>;
using PP=pair<ll,P>;
using vp=vector<P>;
using vpp=vector<PP>;
using vs=vector<string>;
#define fi first
#define se second
#define pb push_back
template<class T>bool chmax(T &a,const T &b){if(a<b){a=b;return true;}return false;}
template<class T>bool chmin(T &a,const T &b){if(a>b){a=b;return true;}return false;}
const ll MOD=1000000007LL;
const int INF=1<<30;
const ll LINF=1LL<<60;
int main(){
    int a,b;
    cin>>>a>>b;
    int ans=0;
    FOR(i,1,a+1){
        if(i==a&&i>=b){
            continue;
        }
        ans++;
    }
    cout<<ans<<endl;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:27:10: error: expected primary-expression before '>' token
   27 |     cin>>>a>>b;
      |          ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define rep(i,l,r) for(ll i=(l);i<(r);i++)
string s;
int main(void){
    int a,b,c;
    cin>>a>>b
    if(a>b)a--;
    cout<<a<<endl;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:14: error: expected ';' before 'if'
    8 |     cin>>a>>b
      |              ^
      |              ;
    9 |     if(a>b)a--;
      |     ~~
Language: C++

#include <iostream>
#include <algorithm>
#include <vector>
#include <queue>
#include <map>
#include <set>
#include <bitset>
#include <cmath>
#include <string>
#include <iterator>
#define FI first
#define SE second
#define PF push_front
#define PB push_back
#define POF pop_front
#define POB pop_back
#define MA make_pair
#define ll long long
#define PA pair<ll,ll>
#define VE vector<ll>
#define VP vector<pair<ll,ll> >
#define FOR(i,a,b) for(int i=a;i<b;i++)
#define ROF(i,a,b) for(int i=b-1;i>=a;i--)
#define YES(i) cout<<(i?"YES":"NO")<<endl
#define Yes(i) cout<<(i?"Yes":"No")<<endl
using namespace std;
//
const int INF=1e9+7;
const int mod=1e9+7;
//
int main(){
  int A,B;
  cin>>>A>>B;
  if(A<=B){
    cout<<A<<endl;
  }else{
    cout<<A-1<<endl;
  }
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:33:8: error: expected primary-expression before '>' token
   33 |   cin>>>A>>B;
      |        ^
Language: C++

#include <iostream>
#include <cmath>
#include <vector>
#include <map>
#include <iomanip>
#include <algorithm>
#include <sstream>
#include <string>
#include <math.h>
#include <set>
#include <deque>
#include <queue>
#include <list>
using namespace std;
typedef long long ll;
const int mod = 1000000007;

int main() {
    ios::sync_with_stdio(false);
	int a[3], k;
	for (int i = 0 ; i < 3 ; i++) cin >> a[i];
	sort(a, a + 3);
	b = a[2];
	for (int i = 0 ; i < k ; i++) b *= 2;
	cout << a[0] + a[1] + b;  
}

Compiler output:
a.cc: In function 'int main()':
a.cc:23:9: error: 'b' was not declared in this scope
   23 |         b = a[2];
      |         ^
Language: C++

#include <iostream>
#include <map>
#include <algorithm>
#include <vector>
#include <iomanip>
#include <sstream>
#include <cmath>
#include <math.h>
#include <string>
#include <set>
#include <queue>
#include <utility>
using namespace std;
typedef long long ll;
 
int main() {
    ios::sync_with_stdio(false);
    cin.tie(0);
    double a , b , c , k;
    cin >> a >> b >> c >> k;
    cout >> a + b + c - max( a , max( b , c ) ) + max( a , max( b , c ) * pow( 2 , k );
}


Compiler output:
a.cc: In function 'int main()':
a.cc:21:87: error: expected ')' before ';' token
   21 |     cout >> a + b + c - max( a , max( b , c ) ) + max( a , max( b , c ) * pow( 2 , k );
      |                                                      ~                                ^
      |                                                                                       )
Language: C++

// #include <bits/stdc++.h>
#include <iostream>
#include <cmath>

#define fastio ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL);
#define endl "\n"

using namespace std;
using ll = long long;

const ll MOD = 1000000007LL; // = 10^9 + 7
const double PI = 3.14159265358979;

void solve()
{
  int a, b, c, k;
  cin >> a >> b >> c >> k;
  cout << a + b + c + max({a, b, c}) * (pow(2, k) - 1);
}

int main()
{
  fastio;
  solve();

  return 0;
}

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

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

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

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

#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
using P = pair<int,int>;

int main(void){
    int a, b, c, k; cin >> a >> b >> c >> k;
  	priority_queue<int> nums;
    nums.push(a);  nums.push(b);  nums.push(c);
  	while(k){
    	k--;
      	int max_num = nums.top();
      nums.pop();
      nums.push(max_num * 2);
    }
  
  int ans = 0;
  	while(!nums.empty()){
    	ans += nums.top();
      nums.pop()
    }
  cout << ans << endl;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:20:17: error: expected ';' before '}' token
   20 |       nums.pop()
      |                 ^
      |                 ;
   21 |     }
      |     ~
Language: C++

#include <iostream> // cout, endl, cin
#include <string> // string, to_string, stoi
#include <vector> // vector
#include <algorithm> // min, max, swap, sort, reverse, lower_bound, upper_bound
#include <utility> // pair, make_pair
#include <tuple> // tuple, make_tuple
#include <cstdint> // int64_t, int*_t
#include <cstdio> // printf
#include <map> // map
#include <queue> // queue, priority_queue
#include <set> // set
#include <stack> // stack
#include <deque> // deque
#include <unordered_map> // unordered_map
#include <unordered_set> // unordered_set
#include <bitset> // bitset
#include <cctype> // isupper, islower, isdigit, toupper, tolower, islower

#define rep(i,n) for(int i = 0; i < n; i++)
using namespace std;
using ll = long long; using ld = long double;
using P = pair<int, int>;

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

    int max = 0, maxi = 0;

    rep(i,3) {
      if (max < a[i]) {
        max = a[i];
        maxi = i;
      }
    }

    a[maxi] = a[maxi] * pow(2,k);
    
    int ans = 0;
    rep(i,3) {
      ans += a[i];
    }
    cout << ans << endl;
    return 0;
}



Compiler output:
a.cc: In function 'int main()':
a.cc:38:25: error: 'pow' was not declared in this scope
   38 |     a[maxi] = a[maxi] * pow(2,k);
      |                         ^~~
Language: C++

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

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


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

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

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


Compiler output:
a.cc: In function 'int main()':
a.cc:9:16: error: 'k' was not declared in this scope
    9 |         rep(i, k){
      |                ^
a.cc:3:45: note: in definition of macro 'rep'
    3 | #define rep(i, n) for (int i = 0; i < (int)(n); i++)
      |                                             ^
a.cc:10:33: error: assignment of read-only location 'std::max<int>((* & std::max<int>(a, b)), c)'
   10 |                 max(max(a,b),c) *= 2;
      |                 ~~~~~~~~~~~~~~~~^~~~
Language: C++

#include <bits/stdc++.h>
#include <math.h>
using namespace std;
typedef long long ll;
typedef vector<int> vint;
#define rep(i,n) for (ll i = 0; i < (ll)(n); ++i)
#define rrep(i,j,n) for(ll i = (ll)(j); i < (ll)(n); i++)
#define mrep(i,n) for (ll i = (ll)(n-1); i > 0; i--)
#define be(v) (v).begin(), (v).end()
#define scout cout << fixed << setprecision(20) 
ll INF = 1LL << 60;
ll mod = 1e9 + 7;

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


Compiler output:
a.cc: In function 'int main()':
a.cc:15:16: error: 'n' was not declared in this scope
   15 |         vint a(n);
      |                ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
using ll=long long;
using ld=long double;
using st=string;
using ch=char;
typedef pair<ll,ll> P;
typedef vector<ll> vl;
typedef vector<vl> vvl;
typedef vector<P> vP;
typedef vector<ch> vc;
typedef vector<vc> vvc;
#define FOR(i,a,b) for(ll i=a;i<b;i++)
#define rep(i,n) FOR(i,0,n)
#define ROF(i,a,b) for(ll i=a;i>=b;i--)
#define per(i,a) ROF(i,a,0)
const ll MOD=1000000007;
const ll MOD2=998244353;
const ld PI=acos(-1);
const ll INF=1e18;
st abc="abcdefghijklmnopqrstuvwxyz";
st ABC="ABCDEFGHIJKLMNOPQRSTUVWXYZ";
struct edge{ll to,cost;};

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


Compiler output:
a.cc: In function 'int main()':
a.cc:29:10: error: 'k' was not declared in this scope
   29 |   cin >> k;
      |          ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
 
int main() {
    int A,B,C,K;
    cin >> A >> B >> C >> K;
    int D=max(A,max(B,C));
    int ans=D;
    for(int i=0;i<N;i++){
        ans*=2;
    }
    cout << A+B+C-D+ans << endl;
}

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

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:26:25: error: expected ';' before '{' token
   26 |     else (c > a && c >b) {
      |                         ^~
      |                         ;
Language: C++

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:26:25: error: expected ';' before '{' token
   26 |     else (c > a && c >b) {
      |                         ^~
      |                         ;
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:12:4: error: no match for call to '(std::vector<int>) (int)'
   12 |   A(2)=A(2)*pow(2,K);
      |   ~^~~
a.cc:12:9: error: no match for call to '(std::vector<int>) (int)'
   12 |   A(2)=A(2)*pow(2,K);
      |        ~^~~
Language: C++

#include <iostream>

using namespace std;
using ll = long long;

template <typename T>
T power(T x, int n) {
  T ans{1};
  while (n) {
    if (n % 2) ans *= x;
    x *= x;
    n >>= 1;
  }
  return ans;
}

void solve(ll A, ll B, ll C, ll K) {
  ll ma = max({A,B,C});
  cout << A+B+C+(power(2,K)-1)*ma << endl;
}

int main() {
  ll A;
  cin >> A;
  ll B;
  cin >> B;
  ll C;
  cin >> C;
  ll K;
  cin >> K;
  solve(A, B, C, K);
  return 0;
}


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

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

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

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:7:14: error: cannot resolve overloaded function 'max' based on conversion to type 'int'
    7 |   int saidai=max{(a,b,c)};
      |              ^~~
Language: C++

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

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


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

a,b,c=map(int,input().split())
k=int(input())
x=max(a,b,c)
y=(a+b+c)-x
print(y+x*(2**k))

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

#include <stdio.h>
#include <math.h>
int main(void){
  int a,b,c,k,s,t[3],i;
  scanf("%d%d%d",&a,&b,&c);
  scanf("%d",&k);
  if(a>b){ 
    if(a>c) {t[0]=a;t[1]=b;[2]=c;}
    else {t[0]=c;t[1]=a;t[2]=b;}
  }
  else if(a<b){ 
    if(b>c) {t[0]=b;t[1]=a;t[2]=c;}
  }
  s=t[0]*pow(2,k)+t[1]+t[2];
  printf("%d",s);
  return 0;
}
  

Compiler output:
main.c: In function 'main':
main.c:8:28: error: expected expression before '[' token
    8 |     if(a>c) {t[0]=a;t[1]=b;[2]=c;}
      |                            ^
Language: C++

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

int main() {
  int a, b, c;
  cin >> a >> b >> c;
  
  int A = a;
  int B = b;
  int C = c;
  
  for (int i = 0; i < K; i++) {
    A *= 2;
    B *= 2;
    C *= 2;
  }
  
  A += b + c;
  B += c + a;
  C += a + b;
  
  int ans = A;
  if (ans < B) ans = B;
  if (ans < C) ans = C;
  
  cout << ans << endl;
  
}

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

#include <bits/stdc++.h> // 万能头文件之华丽的开始
using namespace std;

int main() {
    int a, b, c, k, pro = 1;// 定义a、b、c和k。
    cin >> a >> b >> c >> k; // 我们校长都看得懂的输入
    int mx = max(max(a, b), c);
    pro = pow(2, k); 使用pro计算2的乘方
    cout << mx * pro + a + b + c - mx << endl;//输出和，注意mx是abc中的，还是要减去以免重复的...
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:22: error: '\U00004f7f\U00007528pro\U00008ba1\U00007b972\U00007684\U00004e58\U000065b9' was not declared in this scope
    8 |     pro = pow(2, k); 使用pro计算2的乘方
      |                      ^~~~~~~~~~~~~~~~~~
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:10:29: error: expected ')' before ';' token
   10 |   sum=p+a+b+c-max(a,max(b,c);
      |                  ~          ^
      |                             )
Language: C++

#include <iostream>
#include<vector>
#include<algorithm>
#include<string>
#include<map>
#include<set>
#include<stack>
#include<queue>
#include<math.h>
using namespace std;
typedef long long ll;
#define int long long
typedef vector<int> VI;
typedef pair<int, int> pii;
typedef vector<pii> VP;
typedef vector<string> VS;
typedef priority_queue<int> PQ;
template<class T>bool chmax(T &a, const T &b) { if (a < b) { a = b; return 1; } return 0; }
template<class T>bool chmin(T &a, const T &b) { if (b < a) { a = b; return 1; } return 0; }
#define fore(i,a) for(auto &i:a)
#define REP(i,n) for(int i=0;i<n;i++)
#define eREP(i,n) for(int i=0;i<=n;i++)
#define FOR(i,a,b) for(int i=(a);i<(b);++i)
#define eFOR(i,a,b) for(int i=(a);i<=(b);++i)
#define SORT(c) sort((c).begin(),(c).end())
#define rSORT(c) sort((c).rbegin(),(c).rend())
#define LB(x,a) lower_bound((x).begin(),(x).end(),(a))
#define UB(x,a) upper_bound((x).begin(),(x).end(),(a))
#define INF 1000000000
#define LLINF 9223372036854775807
#define mod 1000000007
//priority_queue<int,vector<int>, greater<int> > q2;


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

	PQ Q;
	REP(i, 3) {
		int a; cin >> a;
		Q.push(a);

	}
	int K; cin >> K;
	REP(i, K) {
		Q.top() *= 2;
	}
	int sum = 0;
	REP(i, 3) {
		sum += Q.top();
		Q.pop();
	}
	cout << sum << endl;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:47:25: error: assignment of read-only location 'Q.std::priority_queue<long long int>::top()'
   47 |                 Q.top() *= 2;
      |                 ~~~~~~~~^~~~
Language: C++

#include <bits/stdc++.h>
#define rep(i,n) for (int i = 0; i < (n); ++i)
#define rrep(i,n) for(int i = 1; i <= (n); ++i)
#define drep(i,n) for(int i = (n)-1; i >= 0; --i)
#define srep(i,s,t) for (int i = s; i < t; ++i)
#define pb push_back
using namespace std;
using P = pair<int,int>;
typedef long long ll;
typedef vector<int> vi;
typedef vector<vi> vvi;
typedef vector<ll> vl;
typedef tuple<int,int,int> T;
typedef vector<P> vp;
typedef vector<T> vt;

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: In function 'int main()':
a.cc:26:12: error: expected '}' at end of input
   26 |   return 0;
      |            ^
a.cc:18:15: note: to match this '{'
   18 | int main(void){
      |               ^
Language: C++

#include <bits/stdc++.h>
#define rep(i,n) for (int i = 0; i < (n); ++i)
#define rrep(i,n) for(int i = 1; i <= (n); ++i)
#define drep(i,n) for(int i = (n)-1; i >= 0; --i)
#define srep(i,s,t) for (int i = s; i < t; ++i)
#define pb push_back
using namespace std;
using P = pair<int,int>;
typedef long long ll;
typedef vector<int> vi;
typedef vector<vi> vvi;
typedef vector<ll> vl;
typedef tuple<int,int,int> T;
typedef vector<P> vp;
typedef vector<T> vt;

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];
  return 0



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

import java.util.*;

public class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    int[] a = new int[3];
    a[0] = sc.nextInt();
    a[1] = sc.nextInt();
    a[2] = sc.nextInt();
    Arrays.sort(a);
    int k = sc.nextInt();
    int ans = a[0] + a[1];
    for(int i = 0; i < k; i++) {
      a[2] *= 2;
    }
    ans += a[2];
    System.out.println(ans);
  }

Compiler output:
Main.java:18: error: reached end of file while parsing
  }
   ^
1 error
Language: C++

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

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

#define i_cin(X) scanf("%d", &X)
#define i_cin2(X,Y) scanf("%d %d",&X,&Y)
#define i_cin3(X,Y,Z) scanf("%d %d %d",&X,&Y,&Z)
#define l_cin(X) scanf("%ld",&X)
#define l_cin2(X,Y) scanf("%ld %ld",&X,&Y)
#define s_cin(X) scanf("%s",&X)

#define  i_cout(X) printf("%d\n",X)
#define  i_cout2(X,Y) printf("%d %d\n",X,Y)
#define  l_cout(X) printf("%ld\n",X)
#define  s_cout(X) printf("%s\n",X)
#define  ll_cout(X) printf("%lld\n",X)

typedef long long int lli;
#define rept(x, s, n) for (int x = s; x < n; x++)


int i_cins(int n, int* A);
int l_cins2(int n, long* A,long* B);
int s_dsort(const void* a, const void* b);

int main(void) {
	int   A[3],K;
	i_cins(3, A);
	i_cin(K);
	
	qsort((void*)A, 3, sizeof(A[0]), s_dsort);
	i_cout(A[0] * K*2 + A[1] + A[2]);

	return 0;
}


//降順
int s_dsort(const void* a, const void* b) {
	return(*(int*)b-*(int*)a);
}
//
int l_cins2(int* n, long* a, long* b) {
	int i;
	rept(i, 0, n) {
		l_cin2(*(a+i), *(b+i));
	}
	return 0;
}
int i_cins(int* n, int* a) {
	int i;
	rept(i, 0, n) {
		i_cin(*(a+i));
	}
	return 0;
}


Compiler output:
main.c:44:5: error: conflicting types for 'l_cins2'; have 'int(int *, long int *, long int *)'
   44 | int l_cins2(int* n, long* a, long* b) {
      |     ^~~~~~~
main.c:24:5: note: previous declaration of 'l_cins2' with type 'int(int,  long int *, long int *)'
   24 | int l_cins2(int n, long* A,long* B);
      |     ^~~~~~~
main.c: In function 'l_cins2':
main.c:20:41: warning: comparison between pointer and integer
   20 | #define rept(x, s, n) for (int x = s; x < n; x++)
      |                                         ^
main.c:46:9: note: in expansion of macro 'rept'
   46 |         rept(i, 0, n) {
      |         ^~~~
main.c: At top level:
main.c:51:5: error: conflicting types for 'i_cins'; have 'int(int *, int *)'
   51 | int i_cins(int* n, int* a) {
      |     ^~~~~~
main.c:23:5: note: previous declaration of 'i_cins' with type 'int(int,  int *)'
   23 | int i_cins(int n, int* A);
      |     ^~~~~~
main.c: In function 'i_cins':
main.c:20:41: warning: comparison between pointer and integer
   20 | #define rept(x, s, n) for (int x = s; x < n; x++)
      |                                         ^
main.c:53:9: note: in expansion of macro 'rept'
   53 |         rept(i, 0, n) {
      |         ^~~~
Language: Java

import java.util.Scanner;

public class E {
    public static void main(String[] args) {

        Scanner sc = new Scanner(System.in);
        int[] num = new int[3];
        int largest = 0;
        int index = 0;
        int sum = 0;

        for (int i = 0; i < 3; i++) {
            num[i] = sc.nextInt();
            if (num[i] > largest) {
                largest = num[i];
                index = i;
            }
        }
        int k = sc.nextInt();
        for (int i = 0; i < 3; i++) {
            if (i == index) {
                sum += num[i]* Math.pow(2, k);
            } else {
                sum += num[i];
            }
        }
        System.out.println(sum);
    }
}

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