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

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

int main(){

  int a,b;

  cin>>a>>b;

  if(a>b || ( a-1) > b ) cout<<a + (a-1)<<endl;

  else if(a>b || (a-1) = b) cout<<a+b<<endl;

  else if(a=b) cout<<a+b<<endl;

  else if(b>a || (b-1) > a ) cout<< b + (b-1) <<endl;

  else if(b>a || (b-1) = b ) cout<<a+b<<endl;

  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:12:15: error: lvalue required as left operand of assignment
   12 |   else if(a>b || (a-1) = b) cout<<a+b<<endl;
      |           ~~~~^~~~~~~~
a.cc:18:15: error: lvalue required as left operand of assignment
   18 |   else if(b>a || (b-1) = b ) cout<<a+b<<endl;
      |           ~~~~^~~~~~~~
Language: C++

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

int main(){
  int A,B;
  cin >> A >> B;
  int R = max(A,B) R1 = max(R - 1,min(A,B));
  cout << R + R1 << endl;
}
  

Compiler output:
a.cc: In function 'int main()':
a.cc:7:20: error: expected ',' or ';' before 'R1'
    7 |   int R = max(A,B) R1 = max(R - 1,min(A,B));
      |                    ^~
a.cc:8:15: error: 'R1' was not declared in this scope; did you mean 'R'?
    8 |   cout << R + R1 << endl;
      |               ^~
      |               R
Language: C++

#include <bits/stdc++.h>
#define FOR(i, begin, end) for(ll i=(begin);i<(end);i++)
#define REP(i, n) FOR(i,0,n)
#define IFOR(i, begin, end) for(ll i=(begin);i>(end);i--)
#define IREP(i, n) IFOR(i,0,n)
#define SORT(a) sort(a.begin(), a.end())
#define ISORT(a) sort(a.begin(), a.end(),greater<ll>())
#define REVERSE(a) reverse(a.begin(), a.end())
#define debug(x) cout << #x << "=" << x << endl;
#define vdebug(v) cout << #v << "=(" <<; REP(i_debug, v.size()){ cout << v[i_debug] << ","; } cout << ")" << endl;
#define mdebug(m) cout << #m << "=" << endl; REP(i_debug, m.size()){ REP(j_debug, m[i_debug].size()){ cout << m[i_debug][j_debug] << ","; } cout << endl;}

#define ll long long
#define f first
#define s second
#define pb push_back
#define INF 1000000000000000000
using namespace std;

using vec = vector<ll>;
using mat = vector<vec>;
using Pii = pair<ll, ll>;
using PiP = pair<ll, Pii>;
using PPi = pair<Pii, ll>;

int main()
{
	ll A, B,;
	cin >> A >> B;

	cout << max(2 * A - 1, max(2 * B - 1, A + B)) << endl;

	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:28:17: error: expected unqualified-id before ';' token
   28 |         ll A, B,;
      |                 ^
Language: Java

import java.util.Scanner;

public class Main{
	public static void main(String[] args){
    Scanner sc= new Scanner(System.in){
    int A = sc.nextInt();
    int B = sc.nextInt();
    int c ;
    int first;
    int second;
    if (B>=A){
     c=A;
     A=B;
     B=c;
    }
    first=A;
    A--;
      
    if (B>=A){
      c=A;
      A=B;
      B=c;
    }
      second=A;
      
      System.out.println(first+second);
      
    
    }
    }
}

Compiler output:
Main.java:11: error: illegal start of type
    if (B>=A){
    ^
Main.java:11: error: <identifier> expected
    if (B>=A){
         ^
Main.java:11: error: <identifier> expected
    if (B>=A){
            ^
Main.java:16: error: <identifier> expected
    first=A;
         ^
Main.java:17: error: <identifier> expected
    A--;
     ^
Main.java:19: error: illegal start of type
    if (B>=A){
    ^
Main.java:19: error: <identifier> expected
    if (B>=A){
         ^
Main.java:19: error: <identifier> expected
    if (B>=A){
            ^
Main.java:24: error: <identifier> expected
      second=A;
            ^
Main.java:26: error: <identifier> expected
      System.out.println(first+second);
                        ^
Main.java:26: error: <identifier> expected
      System.out.println(first+second);
                              ^
Main.java:29: error: ';' expected
    }
     ^
12 errors
Language: Java

import java.util.Scanner;

public class Main{
	public static void main(String[] args){
    Scanner sc=new Scanner(System.in){
    int A = sc.nextInt();
    int B = sc.nextInt();
    int c ;
    int first;
    int second;
      if (B>=A){
       c=A;
       A=B;
       B=c;
      }
      first=A;
      A--;
      
      if (B>=A){
       c=A;
       A=B;
       B=c;
      }
      second=A;
      
      System.out.println(first+second);
      
    
    }
    }
}

Compiler output:
Main.java:11: error: illegal start of type
      if (B>=A){
      ^
Main.java:11: error: <identifier> expected
      if (B>=A){
           ^
Main.java:11: error: <identifier> expected
      if (B>=A){
              ^
Main.java:16: error: <identifier> expected
      first=A;
           ^
Main.java:17: error: <identifier> expected
      A--;
       ^
Main.java:19: error: illegal start of type
      if (B>=A){
      ^
Main.java:19: error: <identifier> expected
      if (B>=A){
           ^
Main.java:19: error: <identifier> expected
      if (B>=A){
              ^
Main.java:24: error: <identifier> expected
      second=A;
            ^
Main.java:26: error: <identifier> expected
      System.out.println(first+second);
                        ^
Main.java:26: error: <identifier> expected
      System.out.println(first+second);
                              ^
Main.java:29: error: ';' expected
    }
     ^
12 errors
Language: Java

import java.util.Scanner;

public class Main{
	public static void main(String[] args){
    Scanner sc=new　Scanner(System.in){
    int A = sc.nextInt();
    int B = sc.nextInt();
    int c ;
    int first;
    int second;
      if (B>=A){
       c=A;
       A=B;
       B=c;
      }
      first=A;
      A--;
      
      if (B>=A){
       c=A;
       A=B;
       B=c;
      }
      second=A;
      
      System.out.println(first+second);
      
    
    }
    }
}

Compiler output:
Main.java:5: error: illegal character: '\u3000'
    Scanner sc=new?Scanner(System.in){
                  ^
Main.java:5: error: ';' expected
    Scanner sc=new?Scanner(System.in){
                                     ^
2 errors
Language: C++


#include <bits/stdc++.h>
using namespace std;
int main() {
    int A,B;
    cin >> A >>  B;
    int sum = 0;
    if (A > B){
        sum += A; A--;
    }else{
        sum += B; B--;
    }
    if (A > B){
        sum += A; A--;
    }else{
        sum += B; B--;
    }
    cout << sum << endl;
}
#include <bits/stdc++.h>
using namespace std;
int main() {
    int A,B;
    cin >> A >>  B;
    int sum = 0;
    if (A > B){
        sum += A; A--;
    }else{
        sum += B; B--;
    }
    if (A > B){
        sum += A; A--;
    }else{
        sum += B; B--;
    }
    cout << sum << endl;
}

Compiler output:
a.cc:22:5: error: redefinition of 'int main()'
   22 | int main() {
      |     ^~~~
a.cc:4:5: note: 'int main()' previously defined here
    4 | int main() {
      |     ^~~~
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 sum = 0;
        if(a > b){
            sum += a;
            a -= 1;
        }else if(a<=b){
            sum += b;
            b -= 1;
        }
              if(a > b){
            sum += a;
            a -= 1;
        }else if(a<=b){
            sum += b;
            b -= 1;
        }
System.out.println(sum)
    }

}


Compiler output:
Main.java:24: error: ';' expected
System.out.println(sum)
                       ^
1 error
Language: Java

import java.util.*;

public class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    int button_a, buton_b, answer;
    button_a = Integer.parseInt(sc.next());
    button_b = Integer.parseInt(sc.next());
    if(button_a > button_b) {
      answer = 2 * button_a - 1;
    } else if(button_b > button_a) {
      answer = 2 * button_b -1;
    } else {
      answer = 2 * button_a;
    }
    System.out.println(answer);
  }
}


Compiler output:
Main.java:8: error: cannot find symbol
    button_b = Integer.parseInt(sc.next());
    ^
  symbol:   variable button_b
  location: class Main
Main.java:9: error: cannot find symbol
    if(button_a > button_b) {
                  ^
  symbol:   variable button_b
  location: class Main
Main.java:11: error: cannot find symbol
    } else if(button_b > button_a) {
              ^
  symbol:   variable button_b
  location: class Main
Main.java:12: error: cannot find symbol
      answer = 2 * button_b -1;
                   ^
  symbol:   variable button_b
  location: class Main
4 errors
Language: C++

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

int main(int argc, char const *argv[]) {
  int a, b
  std::cin >> a >> b;
  if (a>b) {
    std::cout << 2*a-1 << '\n';
  }
  else if (a<b) {
    std::cout << 2*b-1 << '\n';
  }
  else{
    std::cout << 2*a << '\n';
  }
}



Compiler output:
a.cc: In function 'int main(int, const char**)':
a.cc:6:3: error: expected initializer before 'std'
    6 |   std::cin >> a >> b;
      |   ^~~
a.cc:7:9: error: 'b' was not declared in this scope
    7 |   if (a>b) {
      |         ^
Language: C++

a, b = map(int, input().split())
if a < b:
    print(2*b-1)
elif a == b:
    print(2*a)
else:
    print(2*a-1)

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:14:14: error: expected ';' before '{' token
   14 |   else(A = B){
      |              ^
      |              ;
Language: C++

#include <iostream>
using namespace std;
int a, b, ans;
cin >> a >> b;
if(a<b) ans = 2*b-1;
else if(a==b) ans = 2*a;
else ans = 2*a-1;
cout << ans;
return 0;
}


Compiler output:
a.cc:4:1: error: 'cin' does not name a type
    4 | cin >> a >> b;
      | ^~~
a.cc:5:1: error: expected unqualified-id before 'if'
    5 | if(a<b) ans = 2*b-1;
      | ^~
a.cc:6:1: error: expected unqualified-id before 'else'
    6 | else if(a==b) ans = 2*a;
      | ^~~~
a.cc:7:1: error: expected unqualified-id before 'else'
    7 | else ans = 2*a-1;
      | ^~~~
a.cc:8:1: error: 'cout' does not name a type
    8 | cout << ans;
      | ^~~~
a.cc:9:1: error: expected unqualified-id before 'return'
    9 | return 0;
      | ^~~~~~
a.cc:10:1: error: expected declaration before '}' token
   10 | }
      | ^
Language: C++

include <iostream>

using namespace std;

int main(){
   int a,b, ans =0 ;
   cin >> a >> b;

   if(a>b){
      ans += a;
      //ans = ans + a でもよい
      a -= 1;
   }
   
   else {
      ans += b;
      b -= 1;
   }

   // once more
    if(a>b){
      ans += a;
      //ans = ans + a
      a -= 1;
   }
   
   else {
      ans += b;
      b -= 1;
   }

   cout << ans << endl;
}

   

Compiler output:
a.cc:1:1: error: 'include' does not name a type
    1 | include <iostream>
      | ^~~~~~~
a.cc: In function 'int main()':
a.cc:7:4: error: 'cin' was not declared in this scope
    7 |    cin >> a >> b;
      |    ^~~
a.cc:32:4: error: 'cout' was not declared in this scope
   32 |    cout << ans << endl;
      |    ^~~~
a.cc:32:19: error: 'endl' was not declared in this scope
   32 |    cout << ans << endl;
      |                   ^~~~
Language: C++

#include <bits/stdc++.h>
#include <algorithm>

using namespace std;

#define llint long long int
#define REP(i,s,l) for(llint i=s;i<l;i++)
#define DEBUG 0
#define INF (1LL<<50)
#define MOD 1000000007

int main() {


    int getA,getB,max;
    int getTotal[3];

    if(getA > getB) max = 2*getA - 1;
    if(getB > getA) max = 2*getB - 1;
    if(getA ==getB) max = getA+getB

    cout << max << endl;    

    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:20:36: error: expected ';' before 'cout'
   20 |     if(getA ==getB) max = getA+getB
      |                                    ^
      |                                    ;
   21 | 
   22 |     cout << max << endl;
      |     ~~~~
Language: C++

#include <iostream>
using namespace std;
int main(){
  int a, b;
  cin >> a >> b;
  cout << max({a + b, a + a-1, b + b - 1}) << '\n';
  return 0;
}

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

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

void solve() {
  int a,b;
  cin >> a >> b;
  return max(max(a+a-1,b+b-1),a+b);
}

int main() {
  ios::sync_with_stdio(false);
  cin.tie(0), cout.tie(0);
  solve();
  return 0;
}

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

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

int main(){
  int a,b;
  scanf("%d %d",&a,&b);
  printf("%d",max(2*a-1,2*b-1,a+b));
  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:9:18:   required from here
    9 |   printf("%d",max(2*a-1,2*b-1,a+b));
      |               ~~~^~~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/stl_algobase.h:306:17: error: '__comp' cannot be used as a function
  306 |       if (__comp(__a, __b))
      |           ~~~~~~^~~~~~~~~~
Language: C++

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

int main(){
  int a,b;
  scanf("%d %d",&a,&b);
  printf("%d",max(2*a-1,2*b-1,a+b));
  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:9:18:   required from here
    9 |   printf("%d",max(2*a-1,2*b-1,a+b));
      |               ~~~^~~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/stl_algobase.h:306:17: error: '__comp' cannot be used as a function
  306 |       if (__comp(__a, __b))
      |           ~~~~~~^~~~~~~~~~
Language: C++

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

int main(){
  int a,b;
  scanf("%d %d",&a,&b);
  printf("%d",max(2*a-1,2*b-1,a+b));
  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:8:18:   required from here
    8 |   printf("%d",max(2*a-1,2*b-1,a+b));
      |               ~~~^~~~~~~~~~~~~~~~~
/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 <cstdio>
#include<algorithm>
using namespace std;

int main(){
  int a,b;
  scanf("%d %d",&a,&b);
  printf("%d",max(2*a-1,2*b-1,a+b));
  return 0;
}
  

Compiler output:
In file included from /usr/include/c++/14/algorithm:60,
                 from a.cc:2:
/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:18:   required from here
    8 |   printf("%d",max(2*a-1,2*b-1,a+b));
      |               ~~~^~~~~~~~~~~~~~~~~
/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++

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

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:6:17: error: 'cout' was not declared in this scope
    6 |                 cout <<b+(b-1);
      |                 ^~~~
a.cc:10:17: error: 'cout' was not declared in this scope
   10 |                 cout <<a+(a-1)<<endl;
      |                 ^~~~
a.cc:10:33: error: 'endl' was not declared in this scope
   10 |                 cout <<a+(a-1)<<endl;
      |                                 ^~~~
a.cc:14:17: error: 'cout' was not declared in this scope
   14 |                 cout << a * 2 << endl;
      |                 ^~~~
a.cc:14:34: error: 'endl' was not declared in this scope
   14 |                 cout << a * 2 << endl;
      |                                  ^~~~
Language: C

#include<stdio.h>

int main(){
	int A,B;
	int Ans;
	scanf("%d%d",&A,&B);
	if(A>B){
		Ans=2*A-1;
	}else if(A<B){
		Ans=2*B-1;
	}else{
		Ans=2*A
	}
	printf("%d",Ans);
	
	return(0);
}

Compiler output:
main.c: In function 'main':
main.c:12:24: error: expected ';' before '}' token
   12 |                 Ans=2*A
      |                        ^
      |                        ;
   13 |         }
      |         ~
Language: C++

#include<stdio.h>

int main(){
	int A,B;
	scanf("%d%d",&A,&B);
	
	if(A==B){
	 printf(A*2-1);
	}
	
	if(A>B){
		printf(A*2-1);
	}
	if(B>A){
		printf(B*2-1);
	}
	return(0);
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:20: error: invalid conversion from 'int' to 'const char*' [-fpermissive]
    8 |          printf(A*2-1);
      |                 ~~~^~
      |                    |
      |                    int
In file included 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:27: error: invalid conversion from 'int' to 'const char*' [-fpermissive]
   12 |                 printf(A*2-1);
      |                        ~~~^~
      |                           |
      |                           int
/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:15:27: error: invalid conversion from 'int' to 'const char*' [-fpermissive]
   15 |                 printf(B*2-1);
      |                        ~~~^~
      |                           |
      |                           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>
#include <string>
using namespace std;

int main() {
	int x = 0, y = 0;
	int coin = 0;
	cin >> x >> y;

	if (x > y) {
		coin += x;
		x -= 1;
	}
	else {
		coin += y;
		y -= 1;
	}

	if (x > y) {
		coin += x;
		x -= 1;
	}
	else {
		coin += y;
		y -= 1;
	}
	cout << coin << endl;

Compiler output:
a.cc: In function 'int main()':
a.cc:27:30: error: expected '}' at end of input
   27 |         cout << coin << endl;
      |                              ^
a.cc:5:12: note: to match this '{'
    5 | int main() {
      |            ^
Language: C++

#include <iostream>

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

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:7:5: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    7 |     cout << a+b << 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:20: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
    7 |     cout << a+b << 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:11:5: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   11 |     cout << a + b - 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:11:26: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   11 |     cout << a + b - 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<iostream>
using namespace std;
int main(){
int A,B;
cin >> A >> B;
int T,roop;
for(roop=0;roop<2;roop++){
if(A>B){
T+=A;
A--;
}else{
T+=B;
B--;
}
cout << T << endl;
return 0;
}

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

#Include<iostream>
#include<algorithm>
using namespace std;
int main(){
int A,B;
  cin>>A>>B;
  int ans=0;
  ans=max(ans,A+A-1);
  ans=max(ans,A+B);
  ans=max(ans,B+B-1);
  cout<<ans<<endl;
  system("pause");
 return 0;
}

Compiler output:
a.cc:1:2: error: invalid preprocessing directive #Include; did you mean #include?
    1 | #Include<iostream>
      |  ^~~~~~~
      |  include
a.cc: In function 'int main()':
a.cc:6:3: error: 'cin' was not declared in this scope
    6 |   cin>>A>>B;
      |   ^~~
a.cc:3:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
    2 | #include<algorithm>
  +++ |+#include <iostream>
    3 | using namespace std;
a.cc:11:3: error: 'cout' was not declared in this scope
   11 |   cout<<ans<<endl;
      |   ^~~~
a.cc:11:3: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:11:14: error: 'endl' was not declared in this scope
   11 |   cout<<ans<<endl;
      |              ^~~~
a.cc:3:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
    2 | #include<algorithm>
  +++ |+#include <ostream>
    3 | using namespace std;
Language: Java

import java.util.Scanner;

public class A {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int a = sc.nextInt(), b = sc.nextInt();
		
		if(a - b >= 2)
			System.out.println(a + a - 1);
		else if(b - a >= 2)
			System.out.println(b + b - 1);
		else
			System.out.println(a + b);
	}
}


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

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

typedef long long ll;
typedef vector<ll> vll;
typedef vector<string> vs;
typedef vector<vll> vvll;
typedef pair<ll ,ll> pii;
typedef pair<string ,ll> psi;
typedef pair<ll,string > pis;
typedef pair<ll , vll> plv;

#define REP(i,a,b) for(ll i=ll(a);i<=ll(b);++i)
#define REPR(i,a,b) for(ll i=ll(a);i>=ll(b);--i)
#define pb push_back
#define mp make_pair
#define all(v) (v).begin(),(v).end()

template <typename T> T absolute(T a,T b){ return a>=0?a:-a; }
template <typename T> T sqr(T a){return a*a;}

ll read(){
    ll res,f=1;register char ch;
    while((ch=getc())>'9'||ch<'0')(ch=='-')&&(f=-1);
    for(res=ch-'0';(ch=getc())>='0'&&ch<='9';res=res*10+ch-'0');
    return res*f;
}

int main(){
    ll a,b;scanf("%lld%lld",&a,&b);
    if(a>b)swap(a,b);
    cout<<max(a+b,2*b-1)<<endl;
    return 0;
}

Compiler output:
a.cc: In function 'll read()':
a.cc:23:30: warning: ISO C++17 does not allow 'register' storage class specifier [-Wregister]
   23 |     ll res,f=1;register char ch;
      |                              ^~
a.cc:24:19: error: too few arguments to function 'int getc(FILE*)'
   24 |     while((ch=getc())>'9'||ch<'0')(ch=='-')&&(f=-1);
      |               ~~~~^~
In file included from /usr/include/c++/14/cstdio:42,
                 from /usr/include/c++/14/ext/string_conversions.h:45,
                 from /usr/include/c++/14/bits/basic_string.h:4154,
                 from /usr/include/c++/14/string:54,
                 from /usr/include/c++/14/bitset:52,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:52,
                 from a.cc:1:
/usr/include/stdio.h:576:12: note: declared here
  576 | extern int getc (FILE *__stream) __nonnull ((1));
      |            ^~~~
a.cc:25:28: error: too few arguments to function 'int getc(FILE*)'
   25 |     for(res=ch-'0';(ch=getc())>='0'&&ch<='9';res=res*10+ch-'0');
      |                        ~~~~^~
/usr/include/stdio.h:576:12: note: declared here
  576 | extern int getc (FILE *__stream) __nonnull ((1));
      |            ^~~~
Language: C++

#include<iostream.h>
using namespace std;
int A,B;
int main(){
  cin>>A>>B;
  cout<<public static int max(A,B)<<endl;
}

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

#include "bits/stdc++.h"

using namespace std;
int main()
{
	int n;
	int count = 0;
	cin >> n;
	vector<int> a(n);
	for (int i = 0; i < n; i++)
		cin >> a[i];
	for (int i = n-1; i > -1; i++) {
		for (int j = i; j > -1; j++) {
			if (a[i] < a[j])
				break;
		}
		count++
	}
	cout << count << endl;
}



Compiler output:
a.cc: In function 'int main()':
a.cc:17:24: error: expected ';' before '}' token
   17 |                 count++
      |                        ^
      |                        ;
   18 |         }
      |         ~
Language: C

#include <stdio.h>
int main(){
  int n=0,i;
  char S[100000];
  
  scanf("%s",&S);
  
  for(i=0;S[i+1]!='\0';i++){
    if((S[i]==S[i+1] && (S[i]=='0')){
      n++;
      S[i+1]='1';
    }
    if((S[i]==S[i+1]) && (S[i]=='1')){
      n++;
      S[i+1]='0';
    }
  }
  printf("%d\n",n);     
}

Compiler output:
main.c: In function 'main':
main.c:9:37: error: expected ')' before '{' token
    9 |     if((S[i]==S[i+1] && (S[i]=='0')){
      |       ~                             ^
      |                                     )
main.c:17:3: error: expected expression before '}' token
   17 |   }
      |   ^
Language: C

#include <stdio.h>
#include <stdlib.h>
int main(void){
    
    int x,y;
    char line[100];
    //fgets(line,sizeof(line),stdin);
    scanf("%d",&x,);
    //fgets(line,sizeof(line),stdin);
    scanf("%d",&y);
    
  	if( x-y  == 0){
    	printf("%d",x+y);  
    }else{
      if(x>=y){
        printf("%d",(x*2)-1);
      }else{
        printf("%d",(y*2)-1);
      }
    }   
    return 0;
}

Compiler output:
main.c: In function 'main':
main.c:8:19: error: expected expression before ')' token
    8 |     scanf("%d",&x,);
      |                   ^
Language: C++

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:7:36: error: expected ';' before ')' token
    7 |   cout << max(max(b+b-1,a+a-1),a+b)) <<endl;
      |                                    ^
      |                                    ;
Language: C

#include <stdio.h>
int main(){
  int a,b;
  int c=0;
  int i;
  scanf("%d %d",&a,&b);
  for(i=0;i<2;i++){
  	if(a>b){
   	 c+=a;
   	 a--;
 	 }else{
   	 c+=b;
   	 b--;
	 }
  }
  print("%d\n",c);
  return 0;
}


Compiler output:
main.c: In function 'main':
main.c:16:3: error: implicit declaration of function 'print'; did you mean 'printf'? [-Wimplicit-function-declaration]
   16 |   print("%d\n",c);
      |   ^~~~~
      |   printf
Language: C

#include <stdio.h>
int main(){
  int a,b;
  int c=0;
  scanf("%d %d",&a,&b);
  for(int i=0;i<2;i++){
  	if(a>b){
   	 c+=a;
   	 a--;
 	 }else{
   	 c+=b;
   	 b--;
	 }
  }
  print("%d\n",c);
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:15:3: error: implicit declaration of function 'print'; did you mean 'printf'? [-Wimplicit-function-declaration]
   15 |   print("%d\n",c);
      |   ^~~~~
      |   printf
Language: C++

include<iostream>
using namespace std;

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

Compiler output:
a.cc:1:1: error: 'include' does not name a type
    1 | include<iostream>
      | ^~~~~~~
a.cc: In function 'int main()':
a.cc:6:3: error: 'cin' was not declared in this scope
    6 |   cin >>a>>b;
      |   ^~~
a.cc:8:5: error: 'cout' was not declared in this scope
    8 |     cout<< 2a;
      |     ^~~~
a.cc:8:12: error: unable to find numeric literal operator 'operator""a'
    8 |     cout<< 2a;
      |            ^~
a.cc:11:3: error: 'cout' was not declared in this scope
   11 |   cout <<2*( max(a,b))-1 << endl;
      |   ^~~~
a.cc:11:14: error: 'max' was not declared in this scope
   11 |   cout <<2*( max(a,b))-1 << endl;
      |              ^~~
a.cc:11:29: error: 'endl' was not declared in this scope
   11 |   cout <<2*( max(a,b))-1 << endl;
      |                             ^~~~
a.cc:13:3: error: 'return0' was not declared in this scope
   13 |   return0;
      |   ^~~~~~~
Language: C

#include<stdio.h>
int main(void){
  int A,B,X,i;
  X=0;
  scanf("%d %d",&A,&B);
  for(i=1,i<=2,i++){
    if(A>=B){
      X=X+A,A=A-1;}
    else{
      X=X+B,B=B-1;}
  }
  printf("%d",&X);
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:6:19: error: expected ';' before ')' token
    6 |   for(i=1,i<=2,i++){
      |                   ^
      |                   ;
main.c:6:19: error: expected expression before ')' token
Language: C

#include<stdio.h>
int main(){
  int A,B,n,sum=0;
  scnaf("%d %d",&A,&B);
  for(n=1;n<=2;n++){
    if(A>=B){
      sum+=A;
      A--;
    }
    else{
      sum+=B;
      B--;
    }
  }
  printf("%d\n",sum);
  return 0;
}

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

#include <bits/stdc++.h>

using namespace std;

int main(){
ios_base::sync_with_studio(0);cin.tie(0);
int a,b;
cin >> a >> b;
if(a>b) cout<< 2*a-1;
else if (a==b) cout << 2*a;
else cout << 2*b-1;
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:6:11: error: 'sync_with_studio' is not a member of 'std::ios_base'
    6 | ios_base::sync_with_studio(0);cin.tie(0);
      |           ^~~~~~~~~~~~~~~~
Language: C++

include <bits/stdc++.h>

using namespace std;

int main(){
ios::sync_with_studio(0);cin.tie(0);
int a,b;
cin >> a >> b;
if(a>b) cout<< 2*a-1;
else if (a==b) cout << 2*a;
else cout << 2*b-1;
  return 0;
}

Compiler output:
a.cc:1:1: error: 'include' does not name a type
    1 | include <bits/stdc++.h>
      | ^~~~~~~
a.cc: In function 'int main()':
a.cc:6:1: error: 'ios' has not been declared
    6 | ios::sync_with_studio(0);cin.tie(0);
      | ^~~
a.cc:6:26: error: 'cin' was not declared in this scope
    6 | ios::sync_with_studio(0);cin.tie(0);
      |                          ^~~
a.cc:9:9: error: 'cout' was not declared in this scope
    9 | if(a>b) cout<< 2*a-1;
      |         ^~~~
a.cc:10:16: error: 'cout' was not declared in this scope
   10 | else if (a==b) cout << 2*a;
      |                ^~~~
a.cc:11:6: error: 'cout' was not declared in this scope
   11 | else cout << 2*b-1;
      |      ^~~~
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:15:4: error: expected '}' at end of input
   15 |   }
      |    ^
a.cc:4:11: note: to match this '{'
    4 | int main(){
      |           ^
Language: C++

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

int main(){
  int A, B;
  cin >> A >>B;
  if(A > B){
cout << 2A-1 << endl;
  }
if (B > A){
  cout  << 2B-1 << endl;
}
  else {
   cout << A+B <<endl;
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:9: error: unable to find numeric literal operator 'operator""A'
    8 | cout << 2A-1 << endl;
      |         ^~
a.cc:11:12: error: unable to find numeric literal operator 'operator""B'
   11 |   cout  << 2B-1 << endl;
      |            ^~
Language: C

#include<stdio.h>
int main()
{
  int n,m;
  scanf("%d%d",&n,&m);
  print("%d",n+m);

}

Compiler output:
main.c: In function 'main':
main.c:6:3: error: implicit declaration of function 'print'; did you mean 'printf'? [-Wimplicit-function-declaration]
    6 |   print("%d",n+m);
      |   ^~~~~
      |   printf
Language: C++

#include <iostream>
using namespace std;

int main(){
  int A,B,mx;
  
  cin >> A >> B;
  if(A == B){
    mx = 2*A;
  }else if(A < B){
    mx = B + B -1;
  }else if(A > B){
    mx = A + A - 1
  }
  cout << mx << endl;
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:13:19: error: expected ';' before '}' token
   13 |     mx = A + A - 1
      |                   ^
      |                   ;
   14 |   }
      |   ~
Language: C++

#include <iostream>
using namespace std;

int main(){
  int A,B,mx;
  
  cin >> A >> B;
  if(A == B){
    mx = 2*A;
  }else if(A < B){
    mx = B + B -1;
  }else if(A > B){
    mx = A + A - 1
  }
  cout << mx << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:13:19: error: expected ';' before '}' token
   13 |     mx = A + A - 1
      |                   ^
      |                   ;
   14 |   }
      |   ~
Language: C++

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

typedef long long ll;
const int N = 1e5 + 100;

ll a, b;

int main() {
	ios::sync_with_stdio(false), cin.tie(0);
	cin >> a >> b;
  	cout << max(a + b, max(2 * a - 1, max(2 * b - 1)));
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:46: error: no matching function for call to 'max(ll)'
   12 |         cout << max(a + b, max(2 * a - 1, max(2 * b - 1)));
      |                                           ~~~^~~~~~~~~~~
In file included from /usr/include/c++/14/algorithm:60,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_algobase.h:257:5: note: candidate: 'template<class _Tp> constexpr const _Tp& std::max(const _Tp&, const _Tp&)'
  257 |     max(const _Tp& __a, const _Tp& __b)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:257:5: note:   candidate expects 2 arguments, 1 provided
/usr/include/c++/14/bits/stl_algobase.h:303:5: note: candidate: 'template<class _Tp, class _Compare> constexpr const _Tp& std::max(const _Tp&, const _Tp&, _Compare)'
  303 |     max(const _Tp& __a, const _Tp& __b, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:303:5: note:   candidate expects 3 arguments, 1 provided
In file included from /usr/include/c++/14/algorithm:61:
/usr/include/c++/14/bits/stl_algo.h:5706:5: note: candidate: 'template<class _Tp> constexpr _Tp std::max(initializer_list<_Tp>)'
 5706 |     max(initializer_list<_Tp> __l)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5706:5: note:   template argument deduction/substitution failed:
a.cc:12:46: note:   mismatched types 'std::initializer_list<_Tp>' and 'long long int'
   12 |         cout << max(a + b, max(2 * a - 1, max(2 * b - 1)));
      |                                           ~~~^~~~~~~~~~~
/usr/include/c++/14/bits/stl_algo.h:5716:5: note: candidate: 'template<class _Tp, class _Compare> constexpr _Tp std::max(initializer_list<_Tp>, _Compare)'
 5716 |     max(initializer_list<_Tp> __l, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5716:5: note:   candidate expects 2 arguments, 1 provided
Language: C

#include <stdio.h>
int button(int*,int*);
int process(int*,int*,int*);

int main(){
    int A,B,coin=0;
    scanf("%d",&A);
    scanf("%d",&B);

    process(&coin,&A,&B);
    process(&coin,&A,&B);
    
    printf("%d",coin);
    return 0;
}

int button(int *C,int *X){
    *C = *C + *X;
    *X = *X - 1;
    return 0;
}

int process(int *c,int *a,int *b){
    if(*a>*b){
        button(c,a)
    }else{
        button(c,b)
        }
    return 0;
}


Compiler output:
main.c: In function 'process':
main.c:25:20: error: expected ';' before '}' token
   25 |         button(c,a)
      |                    ^
      |                    ;
   26 |     }else{
      |     ~               
main.c:27:20: error: expected ';' before '}' token
   27 |         button(c,b)
      |                    ^
      |                    ;
   28 |         }
      |         ~
Language: C

#include <stdio.h>
int button(int*,int*)
int process(int*,int*,int*)

int main(){
    int A,B,coin=0;
    scanf("%d",&A);
    scanf("%d",&B);

    process(&coin,&A,&B);
    process(&coin,&A,&B);
    
    printf("%d",coin);
    return 0;
}

int button(int *C,int *X){
    *C = *C + *X;
    *X = *X - 1;
    return 0;
}

int process(int *c,int *a,int *b){
    if(*a>*b){
        button(c,a)
    }else{
        button(c,b)
        }
    return 0;
}


Compiler output:
main.c: In function 'button':
main.c:5:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'int'
    5 | int main(){
      | ^~~
main.c:17:26: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
   17 | int button(int *C,int *X){
      |                          ^
main.c:23:34: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
   23 | int process(int *c,int *a,int *b){
      |                                  ^
main.c:31: error: expected '{' at end of input
Language: C

#include <stdio.h>
int button(int*,int*)
int process(int *,int *,int *)
  
int main(){
    int A,B,coin=0;
    scanf("%d",&A);
    scanf("%d",&B);

    process(&coin,&A,&B);
    process(&coin,&A,&B);
    
    printf("%d",coin);
    return 0;
}
int button(int *C,int *X){
    *C = *C + *X;
    *X = *X - 1;
    return 0;
}
int process(int *C,int *a,int *b){
    if(*a>*b){button(C,a);
    }else{button(C,b);}
    return 0;
}


Compiler output:
main.c: In function 'button':
main.c:5:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'int'
    5 | int main(){
      | ^~~
main.c:16:26: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
   16 | int button(int *C,int *X){
      |                          ^
main.c:21:34: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
   21 | int process(int *C,int *a,int *b){
      |                                  ^
main.c:26: error: expected '{' at end of input
Language: C++

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

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


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

#include <bits/stdc++.h>
using namespace std;
int main(){
  int A,B;
  cin >> A >> B;
  int S,M;
  if (A<B){
    S=B;
    M=A;
  }
  else {
    S=A;
    M=B
  }
  if (S-1<M){
    S+=M;
  }
  else{
    S+=S-1;
  }
  cout << S << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:8: error: expected ';' before '}' token
   13 |     M=B
      |        ^
      |        ;
   14 |   }
      |   ~
Language: C++

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

int main() {
int a,b;
scanf("%d%d",&a,&b);
if(a==b) {printf("%d",a+b);}
else {printf("%d",max(a,b)+max(a+b)-1);}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:31: error: no matching function for call to 'max(int)'
    8 | else {printf("%d",max(a,b)+max(a+b)-1);}
      |                            ~~~^~~~~
In file included from /usr/include/c++/14/algorithm:60,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_algobase.h:257:5: note: candidate: 'template<class _Tp> constexpr const _Tp& std::max(const _Tp&, const _Tp&)'
  257 |     max(const _Tp& __a, const _Tp& __b)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:257:5: note:   candidate expects 2 arguments, 1 provided
/usr/include/c++/14/bits/stl_algobase.h:303:5: note: candidate: 'template<class _Tp, class _Compare> constexpr const _Tp& std::max(const _Tp&, const _Tp&, _Compare)'
  303 |     max(const _Tp& __a, const _Tp& __b, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:303:5: note:   candidate expects 3 arguments, 1 provided
In file included from /usr/include/c++/14/algorithm:61:
/usr/include/c++/14/bits/stl_algo.h:5706:5: note: candidate: 'template<class _Tp> constexpr _Tp std::max(initializer_list<_Tp>)'
 5706 |     max(initializer_list<_Tp> __l)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5706:5: note:   template argument deduction/substitution failed:
a.cc:8:31: note:   mismatched types 'std::initializer_list<_Tp>' and 'int'
    8 | else {printf("%d",max(a,b)+max(a+b)-1);}
      |                            ~~~^~~~~
/usr/include/c++/14/bits/stl_algo.h:5716:5: note: candidate: 'template<class _Tp, class _Compare> constexpr _Tp std::max(initializer_list<_Tp>, _Compare)'
 5716 |     max(initializer_list<_Tp> __l, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5716:5: note:   candidate expects 2 arguments, 1 provided
Language: C

#include<stdio.h>
#include<math.h>
int main() {
int a,b;
scanf("%d%d",&a,&b);
if(a==b) {printf("%d",a+b);}
else {printf("%d",max(a,b)+max(a+b)-1);}
}

Compiler output:
main.c: In function 'main':
main.c:7:19: error: implicit declaration of function 'max'; did you mean 'fmax'? [-Wimplicit-function-declaration]
    7 | else {printf("%d",max(a,b)+max(a+b)-1);}
      |                   ^~~
      |                   fmax
Language: C++

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

using namespace std;

int main(){
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);

  string s;
  cin >> s;

  int i,j,res;

  for(i=0; i<s.size(); i++){
    if(i%2==0){
      res += (s[i] == '1');
    }else{
      res += (s[i] == '0');
    }
  }

  cout << min(res, (s.size() - res)) << "\n";
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:23:14: error: no matching function for call to 'min(int&, std::__cxx11::basic_string<char>::size_type)'
   23 |   cout << min(res, (s.size() - res)) << "\n";
      |           ~~~^~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/14/string:51,
                 from /usr/include/c++/14/bits/locale_classes.h:40,
                 from /usr/include/c++/14/bits/ios_base.h:41,
                 from /usr/include/c++/14/ios:44,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_algobase.h:233:5: note: candidate: 'template<class _Tp> constexpr const _Tp& std::min(const _Tp&, const _Tp&)'
  233 |     min(const _Tp& __a, const _Tp& __b)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:233:5: note:   template argument deduction/substitution failed:
a.cc:23:14: note:   deduced conflicting types for parameter 'const _Tp' ('int' and 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'})
   23 |   cout << min(res, (s.size() - res)) << "\n";
      |           ~~~^~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/stl_algobase.h:281:5: note: candidate: 'template<class _Tp, class _Compare> constexpr const _Tp& std::min(const _Tp&, const _Tp&, _Compare)'
  281 |     min(const _Tp& __a, const _Tp& __b, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:281:5: note:   candidate expects 3 arguments, 2 provided
Language: C++

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

using namespace std;

int main()
{
	int a=0, b=0;
	scanf_s("%d%d", &a, &b);
	if (a < b)
		a = b;
	printf("%d", a*2-1);

	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:9: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'?
   10 |         scanf_s("%d%d", &a, &b);
      |         ^~~~~~~
      |         scanf
Language: C++

i = list(map(int, input().split()))
if i[1] == i[0]:
    print(i[0]+i[1])
elif i[0]-1 >= i[1]:
    print(i[0]*2-1)
else:
    print(i[1]*2-1)


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

#include "pch.h"
#include <iostream>
int a = 0;
int b = 0;
int c = 0;

int main()
{
	std::cin >> a;
	std::cin >> b;

	c = a * 2 - 1;

	if (c < b * 2 - 1) {
		c = b * 2 - 1;
	}
	
	if (c < a + b) {
		c = a + b;
	}

	std::cout << c;

	while (1);

    
}

Compiler output:
a.cc:1:10: fatal error: pch.h: No such file or directory
    1 | #include "pch.h"
      |          ^~~~~~~
compilation terminated.
Language: C++

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

int main() {
  int A,B;
  cin >> A >> B;
  
  if(A - B > 1){ 
    cout << 2 * A - 1 << endl;
  }
  
  else if(B- A > 1){
    cout << 2 * B -1 << endl;
  }
  
  else if(A - B = 1 || B - A = 1){
    cout << A + B << endl;
    
  else if (A == B){
    cout << 2 * A << endl;
  }
    
  
  

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:7:6: error: decrement of read-only location 'std::max<int>(a, b)'
    7 |   max(a,b)--;
      |   ~~~^~~~~