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

using namespace std;

int main(){

    int a,b;cin >> a >> b;
    int sum = 0;

    if(max(a,b)==a){
        sum+=a;
        --a;
        sum += max(a,b);
    }else{
        sum+=b;
        --b;
        sum+=max(a,b);
    }

    cout << sum << endl;

    return 0;

}


Compiler output:
a.cc: In function 'int main()':
a.cc:5:13: error: 'cin' was not declared in this scope
    5 |     int a,b;cin >> a >> b;
      |             ^~~
a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
  +++ |+#include <iostream>
    1 | using namespace std;
a.cc:8:8: error: 'max' was not declared in this scope
    8 |     if(max(a,b)==a){
      |        ^~~
a.cc:18:5: error: 'cout' was not declared in this scope
   18 |     cout << sum << endl;
      |     ^~~~
a.cc:18:5: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:18:20: error: 'endl' was not declared in this scope
   18 |     cout << sum << endl;
      |                    ^~~~
a.cc:1:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
  +++ |+#include <ostream>
    1 | using namespace std;
Language: C++

int main()  {
  int N;
  cin >> N;
  vector<int> a(N);
  int ans = 0;
  for (int i = 0; i < N; i++) cin >> a[i];
  for (int i = 0; i < N; i++)  {
    bool is_candidate = true;
    for (int j = 0; j < i; j++)  {
      if (a[j]>a[i])  {
      is_candidate = false;
      break;
    }
  }
  if(is_candidate) ++ans;
}
cout << ans <<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:3:3: error: 'cin' was not declared in this scope
    3 |   cin >> N;
      |   ^~~
a.cc:4:3: error: 'vector' was not declared in this scope
    4 |   vector<int> a(N);
      |   ^~~~~~
a.cc:4:10: error: expected primary-expression before 'int'
    4 |   vector<int> a(N);
      |          ^~~
a.cc:6:38: error: 'a' was not declared in this scope
    6 |   for (int i = 0; i < N; i++) cin >> a[i];
      |                                      ^
a.cc:10:11: error: 'a' was not declared in this scope
   10 |       if (a[j]>a[i])  {
      |           ^
a.cc:17:1: error: 'cout' was not declared in this scope
   17 | cout << ans <<endl;
      | ^~~~
a.cc:17:15: error: 'endl' was not declared in this scope
   17 | cout << ans <<endl;
      |               ^~~~
Language: Java

#include <iostream>
using namespace std;

int main(){
    int A,B;
    cin>>A>>B;
    int ans = 0;
    if(A > B){
        ans += A;
        A--;
    } else {
        ans += B;
        B--;
    }
    ans += max(A, B);
    cout<<ans<<endl;
}

Compiler output:
Main.java:1: error: illegal character: '#'
#include <iostream>
^
Main.java:1: error: class, interface, enum, or record expected
#include <iostream>
         ^
Main.java:6: error: not a statement
    cin>>A>>B;
          ^
Main.java:16: error: not a statement
    cout<<ans<<endl;
             ^
Main.java:4: error: unnamed classes are a preview feature and are disabled by default.
int main(){
^
  (use --enable-preview to enable unnamed classes)
5 errors
Language: C++

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


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

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

#include<bits/stdc++.h>
main(){int a,b;std::cin>>a>>b;std::cout<<max(a,b)+max(max(a,b)-1,min(a,b));}

Compiler output:
a.cc:2:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
    2 | main(){int a,b;std::cin>>a>>b;std::cout<<max(a,b)+max(max(a,b)-1,min(a,b));}
      | ^~~~
a.cc: In function 'int main()':
a.cc:2:42: error: 'max' was not declared in this scope; did you mean 'std::max'?
    2 | main(){int a,b;std::cin>>a>>b;std::cout<<max(a,b)+max(max(a,b)-1,min(a,b));}
      |                                          ^~~
      |                                          std::max
In file included from /usr/include/c++/14/algorithm:61,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_algo.h:5716:5: note: 'std::max' declared here
 5716 |     max(initializer_list<_Tp> __l, _Compare __comp)
      |     ^~~
a.cc:2:66: error: 'min' was not declared in this scope; did you mean 'std::min'?
    2 | main(){int a,b;std::cin>>a>>b;std::cout<<max(a,b)+max(max(a,b)-1,min(a,b));}
      |                                                                  ^~~
      |                                                                  std::min
/usr/include/c++/14/bits/stl_algo.h:5696:5: note: 'std::min' declared here
 5696 |     min(initializer_list<_Tp> __l, _Compare __comp)
      |     ^~~
Language: C++

#include<iostream>
main(){int a,b;std::cin>>a>>b;std::cout<<max(a,b)+max(max(a,b)-1,min(a,b));}


Compiler output:
a.cc:2:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
    2 | main(){int a,b;std::cin>>a>>b;std::cout<<max(a,b)+max(max(a,b)-1,min(a,b));}
      | ^~~~
a.cc: In function 'int main()':
a.cc:2:42: error: 'max' was not declared in this scope; did you mean 'std::max'?
    2 | main(){int a,b;std::cin>>a>>b;std::cout<<max(a,b)+max(max(a,b)-1,min(a,b));}
      |                                          ^~~
      |                                          std::max
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:303:5: note: 'std::max' declared here
  303 |     max(const _Tp& __a, const _Tp& __b, _Compare __comp)
      |     ^~~
a.cc:2:66: error: 'min' was not declared in this scope; did you mean 'std::min'?
    2 | main(){int a,b;std::cin>>a>>b;std::cout<<max(a,b)+max(max(a,b)-1,min(a,b));}
      |                                                                  ^~~
      |                                                                  std::min
/usr/include/c++/14/bits/stl_algobase.h:281:5: note: 'std::min' declared here
  281 |     min(const _Tp& __a, const _Tp& __b, _Compare __comp)
      |     ^~~
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:4:11: error: expected unqualified-id before ';' token
    4 |   int A,B,;
      |           ^
Language: C++

#include<iostream>
using namespace std;
int main()
{
 int a,s;int sum=0;
  cin>>a>>s;
  if (a>s)
  {sum+=a;
   a--
  }
else 
   {sum+=s;
   s--
  }

  if (a>s)
  {sum+=a;
   a--
  }
else 
   {sum+=s;
   s--
  }
  cout<<sum;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:7: error: expected ';' before '}' token
    9 |    a--
      |       ^
      |       ;
   10 |   }
      |   ~    
a.cc:13:7: error: expected ';' before '}' token
   13 |    s--
      |       ^
      |       ;
   14 |   }
      |   ~    
a.cc:18:7: error: expected ';' before '}' token
   18 |    a--
      |       ^
      |       ;
   19 |   }
      |   ~    
a.cc:22:7: error: expected ';' before '}' token
   22 |    s--
      |       ^
      |       ;
   23 |   }
      |   ~
Language: C++

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

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

Compiler output:
a.cc:4:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
    4 | main(){
      | ^~~~
a.cc: In function 'int main()':
a.cc:8:22: error: expected ';' before '}' token
    8 |     ans = A + (A - 1)
      |                      ^
      |                      ;
    9 |   }
      |   ~                   
a.cc:11:22: error: expected ';' before '}' token
   11 |     ans = B + (B - 1)
      |                      ^
      |                      ;
   12 |   }
      |   ~                   
a.cc:14:16: error: expected ';' before '}' token
   14 |     ans = A + B
      |                ^
      |                ;
   15 |   }
      |   ~
Language: C++

#include <iostream>
using namespace std;

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

Compiler output:
a.cc: In function 'int main()':
a.cc:7:12: error: 'max' cannot be used as a function
    7 |   max = max(A, B);
      |         ~~~^~~~~~
a.cc:8:12: error: 'min' cannot be used as a function
    8 |   min = min(A, B);
      |         ~~~^~~~~~
a.cc:9:20: error: 'max' cannot be used as a function
    9 |   cout << max + max((max-1), min) << endl;
      |                 ~~~^~~~~~~~~~~~~~
Language: Java

package atcoder;

import java.util.*;

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


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

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

int main() {
	vector<int> o(4);
	cin >> o[0] >> o[1];
	o[2] = o[0] - 1;
	o[3] = o[1] - 1;
	sort(o.begin(), o.end());
	cout << o[3] + o[2] << 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:9: error: 'vector' was not declared in this scope
    7 |         vector<int> o(4);
      |         ^~~~~~
a.cc:7:16: error: expected primary-expression before 'int'
    7 |         vector<int> o(4);
      |                ^~~
a.cc:8:9: error: 'cin' was not declared in this scope
    8 |         cin >> o[0] >> o[1];
      |         ^~~
a.cc:8:16: error: 'o' was not declared in this scope
    8 |         cin >> o[0] >> o[1];
      |                ^
a.cc:11:9: error: 'sort' was not declared in this scope; did you mean 'short'?
   11 |         sort(o.begin(), o.end());
      |         ^~~~
      |         short
a.cc:12:9: error: 'cout' was not declared in this scope
   12 |         cout << o[3] + o[2] << endl;
      |         ^~~~
a.cc:12:32: error: 'endl' was not declared in this scope
   12 |         cout << o[3] + o[2] << endl;
      |                                ^~~~
Language: C

#include <stdio.h>

int main(void) {

	int A;
	int B;

	scanf("%d", &A);
	scanf("%d", &B);     
  
    int K = A - 1;
    int J = B - 1;

    if(A + K >= A + J && A + K >= B + K && A + K >= B + J){
      printf("%d",A + K);
    }
    else if(A + J >= A + K && A + J >= B + K && A + J >= B + J){
      printf("%d",A + J);
    }
    else if(B + K >= A + K && B + K >= A + J && B + K >= B + J){
      printf("%d",B + K);
    }
    else if(B + J >= A + J && B + J >= B + K && B + J = A + K){
      printf("%d",B + J);
    }
	return 0;
}



Compiler output:
main.c: In function 'main':
main.c:23:55: error: lvalue required as left operand of assignment
   23 |     else if(B + J >= A + J && B + J >= B + K && B + J = A + K){
      |                                                       ^
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:9:29: error: expected ';' before '}' token
    9 |     cout << max(A,B) * 2 - 1
      |                             ^
      |                             ;
   10 | }
      | ~                            
a.cc:10:2: error: expected '}' at end of input
   10 | }
      |  ^
a.cc:4:15: note: to match this '{'
    4 | int main(void){
      |               ^
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:7:56: error: invalid operands of types 'const int' and '<unresolved overloaded function type>' to binary 'operator<<'
    7 |         cout << max(a + b , max(a + a - 1 , b + b - 1) << endl;
      |                             ~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
  int a,b;
  cin>>a>>b;
  c=max(a,b);
  cout<<c+c-1<<'\n';
  return 0;

}


Compiler output:
a.cc: In function 'int main()':
a.cc:6:3: error: 'c' was not declared in this scope
    6 |   c=max(a,b);
      |   ^
Language: C++

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


Compiler output:
a.cc: In function 'int main()':
a.cc:7:11: error: 's' was not declared in this scope
    7 |     cout<<s+b<<endl;
      |           ^
Language: C++

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


Compiler output:
a.cc: In function 'int main()':
a.cc:7:11: error: 's' was not declared in this scope
    7 |     cout<<s+b<<endl;
      |           ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<int, int> pii;
const int MN = 1e5 + 5;

int main() {
    ios_base::sync_with_stdio(0), cin.tie(0), cout.tie(0);
	int a, b;
  	cin >> a >> b;
  	if (a < b) swap(a, b);
  	ret += a--;
  	if (a < b) swap(a, b);
  	ret += a--;
  	cout << ret << '\n';
  	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:12:9: error: 'ret' was not declared in this scope
   12 |         ret += a--;
      |         ^~~
Language: C++

#include<iostream>
using namespace std;

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


}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:22: error: unable to find numeric literal operator 'operator""a'
    7 |   if ( a>b ) cout << 2a-1 ;
      |                      ^~
a.cc:8:25: error: unable to find numeric literal operator 'operator""a'
    8 |   else if (a=b) cout << 2a;
      |                         ^~
a.cc:9:16: error: unable to find numeric literal operator 'operator""b'
    9 |   else cout << 2b-1;
      |                ^~
Language: C++

#include<algorithm>//sort(all(変数),greater<型名>())　で降順に
#include<cmath>//切り上げceil(値)
#include<deque>
#include<iomanip>//setprecision(数字)
#include<iostream>
#include<list>
#include<map>
#include<numeric> //xとyの最大公約数は__gcd(x,y),xとyの最小公倍数は(x*y)/__gcd
#include<queue>
#include<set>
#include<stack>
#include<string>
#include<vector>

#include<bits/stdc++.h>
#include<cstdio>
#include<cstdlib>
#include<tuple>
#include<utility>
#define rep(i,n) for(ll i=0; i<n; i++)
#define vll vector<ll>
#define vi vector<int>
#define all(x) (x).begin(),(x).end()
#define pb push_back
#define mp make_pair
#define F first
#define S second
#define mod 1000000007
using ll = long long;
using namespace std;

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


Compiler output:
a.cc: In function 'int main()':
a.cc:35:12: error: expected primary-expression before ')' token
   35 |   if(b < a)){
      |            ^
a.cc:43:12: error: expected primary-expression before ')' token
   43 |   if(b < a)){
      |            ^
Language: C++

#include<algorithm>//sort(all(変数),greater<型名>())　で降順に
#include<cmath>//切り上げceil(値)
#include<deque>
#include<iomanip>//setprecision(数字)
#include<iostream>
#include<list>
#include<map>
#include<numeric> //xとyの最大公約数は__gcd(x,y),xとyの最小公倍数は(x*y)/__gcd
#include<queue>
#include<set>
#include<stack>
#include<string>
#include<vector>

#include<bits/stdc++.h>
#include<cstdio>
#include<cstdlib>
#include<tuple>
#include<utility>
#define rep(i,n) for(ll i=0; i<n; i++)
#define vll vector<ll>
#define vi vector<int>
#define all(x) (x).begin(),(x).end()
#define pb push_back
#define mp make_pair
#define F first
#define S second
#define mod 1000000007
using ll = long long;
using namespace std;

int main(){
  int a,b;  cin >> a >> b;
  int ans = 0;
  rep(i,2){
    if(a < b)){
      ans += a;
      a--;
    }else{
      ans += b;
      b--;
    }
  }
  cout << ans;
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:36:14: error: expected primary-expression before ')' token
   36 |     if(a < b)){
      |              ^
Language: Java

#include <stdio.h>

int main()
{
    int a, b;
    scanf("%d%d", &a, &b);
    int ans = 0;
    if( a == b){
        ans += 2*a;
    }else if ( a > b){
        ans += a+(a-1);
    }else{
        ans += b+(b-1);
    }
    printf("%d\n", ans);
    return 0;
}

Compiler output:
Main.java:1: error: illegal character: '#'
#include <stdio.h>
^
Main.java:1: error: class, interface, enum, or record expected
#include <stdio.h>
         ^
Main.java:6: error: class, interface, enum, or record expected
    scanf("%d%d", &a, &b);
    ^
Main.java:7: error: unnamed classes are a preview feature and are disabled by default.
    int ans = 0;
    ^
  (use --enable-preview to enable unnamed classes)
Main.java:8: error: class, interface, enum, or record expected
    if( a == b){
    ^
Main.java:10: error: class, interface, enum, or record expected
    }else if ( a > b){
    ^
Main.java:12: error: class, interface, enum, or record expected
    }else{
    ^
Main.java:14: error: class, interface, enum, or record expected
    }
    ^
Main.java:16: error: class, interface, enum, or record expected
    return 0;
    ^
Main.java:17: error: class, interface, enum, or record expected
}
^
10 errors
Language: Java

#include <stdio.h>

int main(void)
{
    int a, b;
    scanf("%d%d", &a, &b);
    int ans = 0;
    if( a == b){
        ans += 2*a;
    }else if ( a > b){
        ans += a+(a-1);
    }else{
        ans += b+(b-1);
    }
    printf("%d\n", ans);
    return 0;
}

Compiler output:
Main.java:1: error: illegal character: '#'
#include <stdio.h>
^
Main.java:1: error: class, interface, enum, or record expected
#include <stdio.h>
         ^
Main.java:6: error: class, interface, enum, or record expected
    scanf("%d%d", &a, &b);
    ^
Main.java:7: error: unnamed classes are a preview feature and are disabled by default.
    int ans = 0;
    ^
  (use --enable-preview to enable unnamed classes)
Main.java:8: error: class, interface, enum, or record expected
    if( a == b){
    ^
Main.java:10: error: class, interface, enum, or record expected
    }else if ( a > b){
    ^
Main.java:12: error: class, interface, enum, or record expected
    }else{
    ^
Main.java:14: error: class, interface, enum, or record expected
    }
    ^
Main.java:16: error: class, interface, enum, or record expected
    return 0;
    ^
Main.java:17: error: class, interface, enum, or record expected
}
^
10 errors
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:7:5: error: 'ans' was not declared in this scope; did you mean 'abs'?
    7 |     ans = A + (A -1);
      |     ^~~
      |     abs
a.cc:10:5: error: 'ans' was not declared in this scope; did you mean 'abs'?
   10 |     ans = B + (B -1);
      |     ^~~
      |     abs
a.cc:13:1: error: 'ans' was not declared in this scope; did you mean 'abs'?
   13 | ans = A + B ;
      | ^~~
      | abs
a.cc:15:9: error: 'ans' was not declared in this scope; did you mean 'abs'?
   15 | cout << ans << endl ;
      |         ^~~
      |         abs
Language: C++

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

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

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






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

Compiler output:
a.cc: In function 'int main()':
a.cc:15:11: error: unable to find numeric literal operator 'operator""a'
   15 |     cout<<2a<<endl;
      |           ^~
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main(){
  int a,b;
  cin>>a>>b;
  int t=0;
  for(int i=0;i<2;i++){
    if(a>b){
      t+=a;
      a--;
    }else{
      t+=b;
      b==;
    }
  }
  cout<<t<<endl;
}

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

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

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

}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:10: error: expected '(' before 'cout'
    9 |  else if cout<< a>b? 2*a-1:2*b-1<<endl;
      |          ^~~~
      |          (
Language: C++

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

int main() {
 int a,b;
 cin>>a>>b;
  if(a==b) cout<<a+b<<endl;
  
 else if cout<< a>b? 2*a-1|:2*b-1<<endl;

}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:10: error: expected '(' before 'cout'
    9 |  else if cout<< a>b? 2*a-1|:2*b-1<<endl;
      |          ^~~~
      |          (
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  int a,b;
  cin >> a >> b;
  cout << max({2 * a - 1 ,a + b. 2 * b - 1});
}


Compiler output:
a.cc: In function 'int main()':
a.cc:7:34: error: expected unqualified-id before numeric constant
    7 |   cout << max({2 * a - 1 ,a + b. 2 * b - 1});
      |                                  ^
a.cc:7:34: error: expected '}' before numeric constant
    7 |   cout << max({2 * a - 1 ,a + b. 2 * b - 1});
      |               ~                  ^
a.cc:7:33: error: expected ')' before numeric constant
    7 |   cout << max({2 * a - 1 ,a + b. 2 * b - 1});
      |              ~                  ^~
      |                                 )
a.cc: At global scope:
a.cc:7:44: error: expected unqualified-id before ')' token
    7 |   cout << max({2 * a - 1 ,a + b. 2 * b - 1});
      |                                            ^
a.cc:8:1: error: expected declaration before '}' token
    8 | }
      | ^
Language: C++

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


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

#include <bits/stdc++.h>
int main() {
  int a,b,ans;
  cin >> a >> b;
  ans = max(a,b);
  if (a > b) a--;
  else b--;
  ans += max(a,b);
  cout << ans << endl;
  return 0;
}


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

#include <bit/stdc++>
int main() {
  int a,b,ans;
  cin >> a >> b;
  ans = max(a,b);
  if (a > b) a--;
  else b--;
  ans += max(a,b);
  cout << ans << endl;
  return 0;
}

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

#include<stdio.h>

int main(){
  	int a,b;
  	int l,m,n,p;
  	scanf("%d %d",&a,&b);
  	l=2*a-1;
  	m=2*b-1;
  	n=a+b;
  	p=std::max(std::max(l,m),n);
 	printf("%d",p);
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:16: error: 'max' is not a member of 'std'
   10 |         p=std::max(std::max(l,m),n);
      |                ^~~
a.cc:10:25: error: 'max' is not a member of 'std'
   10 |         p=std::max(std::max(l,m),n);
      |                         ^~~
Language: C++

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

int main(){
  int a, b;
  cin >> a >> b,;
  int coin = 0;
  
  for(int i = 0; i < 2; i++;){
    coin += max(a, b);
    if(a > b) a--;
    else b--;
  }
  
  cout << coin << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:17: error: expected primary-expression before ';' token
    6 |   cin >> a >> b,;
      |                 ^
a.cc:9:28: error: expected ')' before ';' token
    9 |   for(int i = 0; i < 2; i++;){
      |      ~                     ^
      |                            )
a.cc:9:29: error: expected primary-expression before ')' token
    9 |   for(int i = 0; i < 2; i++;){
      |                             ^
Language: C++

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

int main() {
    int a, b;
    if (a < b) swap(a, b);
    if (a - b > 1) ct(2*a-1);
    else ct(a+b);
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:20: error: 'ct' was not declared in this scope
    8 |     if (a - b > 1) ct(2*a-1);
      |                    ^~
a.cc:9:10: error: 'ct' was not declared in this scope
    9 |     else ct(a+b);
      |          ^~
Language: C++

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



Compiler output:
a.cc: In function 'int main()':
a.cc:10:11: error: unable to find numeric literal operator 'operator""A'
   10 |   cout << 2A;
      |           ^~
Language: C++

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



Compiler output:
a.cc: In function 'int main()':
a.cc:7:20: error: unable to find numeric literal operator 'operator""A'
    7 |   cout << max({A+B,2A-1,2B-1});
      |                    ^~
a.cc:7:25: error: unable to find numeric literal operator 'operator""B'
    7 |   cout << max({A+B,2A-1,2B-1});
      |                         ^~
a.cc:7:14: error: no matching function for call to 'max(<brace-enclosed initializer list>)'
    7 |   cout << max({A+B,2A-1,2B-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:
/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 <bits/stdc++.h>
using namespace std;
 
int main() {
  int A, B;
  cin >> A,B;
  cout << max({A+B,2A-1,2B-1})
 
}



Compiler output:
a.cc: In function 'int main()':
a.cc:7:20: error: unable to find numeric literal operator 'operator""A'
    7 |   cout << max({A+B,2A-1,2B-1})
      |                    ^~
a.cc:7:25: error: unable to find numeric literal operator 'operator""B'
    7 |   cout << max({A+B,2A-1,2B-1})
      |                         ^~
a.cc:7:14: error: no matching function for call to 'max(<brace-enclosed initializer list>)'
    7 |   cout << max({A+B,2A-1,2B-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:
/usr/include/c++/14/bits/stl_algo.h:5716:5: note: candidate: 'template<class _Tp, class _Compare> constexpr _Tp std::max(initializer_list<_Tp>, _Compare)'
 5716 |     max(initializer_list<_Tp> __l, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5716:5: note:   candidate expects 2 arguments, 1 provided
Language: C++

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



int maint(){

  string str;
  cin >> str;
  
  int a = 0;
  int b = 0;
  
  for int i = 0;i < str.size();i++){
    if (i%2==0 != str[i]==0) ++a;
    else ++b
  }
  cout << min(a,b);
}

Compiler output:
a.cc: In function 'int maint()':
a.cc:16:7: error: expected '(' before 'int'
   16 |   for int i = 0;i < str.size();i++){
      |       ^~~
      |       (
a.cc:18:13: error: expected ';' before '}' token
   18 |     else ++b
      |             ^
      |             ;
   19 |   }
      |   ~          
a.cc:21:1: warning: no return statement in function returning non-void [-Wreturn-type]
   21 | }
      | ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
#define rep(i,n) for(int i=0; i<(int)(n);i++)
#define veci(x,n) vector<int> x((int) (n))
#define vecs(x,n) vector<string> x((int) (n))
#define vecbf(x,n) vector<bool> x((int) (n), false)

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

Compiler output:
a.cc: In function 'int main()':
a.cc:12:3: error: 'else' without a previous 'if'
   12 |   else{
      |   ^~~~
Language: C

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

Compiler output:
main.c: In function 'main':
main.c:12:3: error: expected declaration or statement at end of input
   12 |   }
      |   ^
Language: C++

#include<iostream>
using namespace std;

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

Compiler output:
a.cc: In function 'int main()':
a.cc:10:15: error: expected primary-expression before ':' token
   10 |   else if(A>B):
      |               ^
Language: C++

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

int main () {

        int n=0,i, a1=0,a2=0 ,ans;
        char s[100000]="", tmp[2]="";

        scanf("%s", s);
        n = strlen(s);

        for( i=0; i<n; i++)
        {

                tmp[0] = s[i];

                if(atoi(&tmp[0]) == (i+1)%2)
                {
                        a1++;
                }
                else
                {
                        a2++;
                }
        }

        if( a1 <= a2 )
        {
                ans = a1;
        }
        else
        {
                ans = a2;
        }

        printf( "%d\n", ans);

        return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:17:20: error: 'atoi' was not declared in this scope
   17 |                 if(atoi(&tmp[0]) == (i+1)%2)
      |                    ^~~~
Language: C++

a, b = map(int, input().split())
result = []

result.append(a + (a-1))
result.append(a + b)
result.append(b + (b-1))

print(max(result))

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

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

Compiler output:
main.c: In function 'main':
main.c:5:40: error: expected expression before ')' token
    5 |   if (a<=20 && a>=3 && b<=20 && b>=3 &&){
      |                                        ^
Language: C

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

Compiler output:
main.c: In function 'main':
main.c:13:19: error: expected ';' before 'return'
   13 |   printf("%d",max)
      |                   ^
      |                   ;
   14 |   return 0;
      |   ~~~~~~
Language: C

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

Compiler output:
main.c: In function 'main':
main.c:20:12: error: expected ';' before '}' token
   20 |         n++
      |            ^
      |            ;
   21 |   }
      |   ~
Language: C

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

Compiler output:
main.c: In function 'main':
main.c:12:11: error: expected ';' before '}' token
   12 |        b--}}
      |           ^
      |           ;
Language: C

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

Compiler output:
main.c: In function 'main':
main.c:19:6: error: expected ';' before '}' token
   19 |   n++
      |      ^
      |      ;
   20 |   }
      |   ~
Language: C

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

Compiler output:
main.c:18:10: error: expected declaration specifiers or '...' before string constant
   18 |   printf("%d",kai);
      |          ^~~~
main.c:18:15: error: unknown type name 'kai'
   18 |   printf("%d",kai);
      |               ^~~
main.c:19:3: error: expected identifier or '(' before 'return'
   19 |   return 0;
      |   ^~~~~~
main.c:20:1: error: expected identifier or '(' before '}' token
   20 | }
      | ^
Language: C

#include<stdio.h>
int main(void)
{
  int a,b,x = 0;
  int n = 0;
  
  scanf("%d",a);
  scanf("%d",b);
  
  while(n < 2){
  if(a <= b){
    x += b;
    b--;
  }
  else {
    x += a;
    a--;
  }
  n++
  }
  
  printf("%d\n",x);
  
  return 0;
}
    

Compiler output:
main.c: In function 'main':
main.c:19:6: error: expected ';' before '}' token
   19 |   n++
      |      ^
      |      ;
   20 |   }
      |   ~
Language: C

#include<stdio.h>

int main(){
  int a,b,i,kai=0;
  
  scanf("%d %d",&a,&b)
  
  for(i=0;i<2;i++){
    if(a>=b){
      kai+=a;
      a--;
    }
    else
      kai+=b;
      b--;
   }
  }
  printf("%d",kai)
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:6:23: error: expected ';' before 'for'
    6 |   scanf("%d %d",&a,&b)
      |                       ^
      |                       ;
    7 | 
    8 |   for(i=0;i<2;i++){
      |   ~~~                  
main.c: At top level:
main.c:18:10: error: expected declaration specifiers or '...' before string constant
   18 |   printf("%d",kai)
      |          ^~~~
main.c:18:15: error: unknown type name 'kai'
   18 |   printf("%d",kai)
      |               ^~~
main.c:20:1: error: expected identifier or '(' before '}' token
   20 | }
      | ^
Language: C

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

Compiler output:
main.c: In function 'main':
main.c:12:11: error: expected ';' before '}' token
   12 |        b--}}
      |           ^
      |           ;
Language: C++

#include <algorithm>
#include <iostream> //入出力
#include <stdio.h>
#include <map>
#include <string>
#include <math.h>
#include <vector>
#include <cstdlib>
#include <queue>
#include <stack>
#include <list>
#include <iomanip> //小数点以下を表示させる(setprecision())

#define debug(x) cerr << x << " " \
                      << "(L:" << __LINE__ << ")" << '\n'
#define PRINT(V)                                   \
        {                                          \
                for (int i = 0; i < V.size(); i++) \
                {                                  \
                        cout << V[i] << " ";       \
                }                                  \
                cout << endl;                      \
        }

typedef long long ll; //64bit型
using namespace std;
const ll INF = 1LL << 20;

int gcd(int a, int b) { return b ? gcd(b, a % b) : a; }

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

        return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:36:51: error: expected primary-expression before '<<' token
   36 |                 cout <<  max({2*A-1, A+B,2*B-1}); << endl;
      |                                                   ^~
Language: C++

#include <bits/stdc++.h>

using namespace std;



int main() {

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

	cou

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

#include<iostream>
#include<vector>
#include<cstdlib>

using namespace std;

int main(){
  int i,j,k=0;
  cin >> i>>j;

  if(i>j){
    k+=i;
    i++;
  }
  else {
    k+=j;
    j--
  }
  if(i>j){k+=i;}
  else k+=j;

  cout << k<<endl;
  return 0;
}

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

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

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


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

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

int main() {
  int A,B;
  cin >>A >>B;
  if(A>=B){
    int k = A;
    A-=1;
    k +=mak({A,B});
    cout << k << endl;
  }
  else if(B>A){
    int j = B;
    B -=1;
    j+=max{(A,B)}
  }
    
  
  
}


Compiler output:
a.cc: In function 'int main()':
a.cc:10:9: error: 'mak' was not declared in this scope
   10 |     k +=mak({A,B});
      |         ^~~
a.cc:16:8: error: overloaded function with no contextual type information
   16 |     j+=max{(A,B)}
      |        ^~~
Language: C++

#include <iostream>

using namespace std;

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

Compiler output:
In file included from /usr/include/c++/14/string:51,
                 from /usr/include/c++/14/bits/locale_classes.h:40,
                 from /usr/include/c++/14/bits/ios_base.h:41,
                 from /usr/include/c++/14/ios:44,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_algobase.h: In instantiation of 'constexpr const _Tp& std::max(const _Tp&, const _Tp&, _Compare) [with _Tp = int; _Compare = int]':
a.cc:8:14:   required from here
    8 |   cout << max(A + (A - 1), B + (B - 1), A + B) << 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 <stdio.h>
int main(){
 int a,b,r=0;
  scanf("%d%d",&a,&b);
  for(int i=0;i<2,i++){
    if(a>b){
      r+=a;
      a--;
    }else{
      r+=b;
      b--;
    }
  }
  printf("%d",r);
 return 0;
}

Compiler output:
main.c: In function 'main':
main.c:5:22: error: expected ';' before ')' token
    5 |   for(int i=0;i<2,i++){
      |                      ^
      |                      ;
Language: C

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

Compiler output:
main.c: In function 'main':
main.c:5:22: error: expected ';' before ')' token
    5 |   for(int i=0;i<2,i++){
      |                      ^
      |                      ;
Language: C++

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

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

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

Compiler output:
main.c: In function 'main':
main.c:4:22: error: expected expression before ')' token
    4 |   scanf("%d%d",&a,&b,);
      |                      ^
Language: C

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

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

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

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

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