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

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

int main() {
  double a,b;
  cin >> a >> b;
  double x = (a+b)/2;
  if(a%2==0&&b%2==0 || a%2==1&&b%2==1) cout << x << endl;
  else cout << x+1 << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:7: error: invalid operands of types 'double' and 'int' to binary 'operator%'
   11 |   if(a%2==0&&b%2==0 || a%2==1&&b%2==1) cout << x << endl;
      |      ~^~
      |      | |
      |      | int
      |      double
a.cc:11:15: error: invalid operands of types 'double' and 'int' to binary 'operator%'
   11 |   if(a%2==0&&b%2==0 || a%2==1&&b%2==1) cout << x << endl;
      |              ~^~
      |              | |
      |              | int
      |              double
a.cc:11:25: error: invalid operands of types 'double' and 'int' to binary 'operator%'
   11 |   if(a%2==0&&b%2==0 || a%2==1&&b%2==1) cout << x << endl;
      |                        ~^~
      |                        | |
      |                        | int
      |                        double
a.cc:11:33: error: invalid operands of types 'double' and 'int' to binary 'operator%'
   11 |   if(a%2==0&&b%2==0 || a%2==1&&b%2==1) cout << x << endl;
      |                                ~^~
      |                                | |
      |                                | int
      |                                double
Language: C++

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

int main(){
  int a, b;
  cin >> a >> b;
  if((a + b)%2 == 0){
    int x = (a + b)/2;
  }else{
    int x = (a + b)/2 + 1;
  }
  cout << x << endl;
}


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

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  // ここにプログラムを追記
  int A, B;
  cin >> A >> B;
  if {A % B == 0){
	coud << A / B << endl;
  } else {
    coud << A / B + 1 << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:6: error: expected '(' before '{' token
    8 |   if {A % B == 0){
      |      ^
      |      (
a.cc:12:2: error: expected '}' at end of input
   12 | }
      |  ^
a.cc:4:12: note: to match this '{'
    4 | int main() {
      |            ^
Language: Java

import java.util.*;
public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
      
      //整数の入力
      int A = sc.nextInt();
      
      int B = sc.nextInt();
      
      //平均を表示
      int x = ((A + B + 1) / 2));
      
      System.out.print(x);
    }
}

Compiler output:
Main.java:12: error: ';' expected
      int x = ((A + B + 1) / 2));
                               ^
1 error
Language: Java

import java.util.*;
public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
      
      //整数の入力
      int A = sc.nextInt();
      
      int B = sc,nextInt();
      
      //少数切り上げで表示
      
      System.out.print(Math.round((A + B) / 2));
    }
}

Compiler output:
Main.java:9: error: ';' expected
      int B = sc,nextInt();
                        ^
1 error
Language: Java

import java.util.*;
public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
      
      //aの入力を受け取る
      int a = sc.nextInt();
      
      //bの入力を受け取る
      int b = sc.nextInt();
      
      //aとbの平均を変数に入れる
      int c = ((a + b) / 2));
      
      //小数点を切り上げて表示する
      System.out.print(Math.round(c);
    }
}

Compiler output:
Main.java:13: error: ';' expected
      int c = ((a + b) / 2));
                           ^
Main.java:16: error: ')' or ',' expected
      System.out.print(Math.round(c);
                                    ^
2 errors
Language: C++

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

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


Compiler output:
a.cc: In function 'int main()':
a.cc:7:10: error: expected ';' before 'if'
    7 |   c=a + b
      |          ^
      |          ;
    8 |   if(c/2*2 == c ){
      |   ~~      
a.cc:11:3: error: 'else' without a previous 'if'
   11 |   else{
      |   ^~~~
Language: C++

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

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


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

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

int main() {
  int a, b ;
  cin >> a >> b;
  cout << (A + B)/2 <<endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:7:12: error: 'A' was not declared in this scope
    7 |   cout << (A + B)/2 <<endl;
      |            ^
a.cc:7:16: error: 'B' was not declared in this scope
    7 |   cout << (A + B)/2 <<endl;
      |                ^
Language: Java

import java.util.*;

public class Main{
	public static void main(String args[]){
      
    	Scanner sc = nre Scanner(System.in);
      
      	int a = sc.nextInt();
        int b = sc.nextInt();
      
      	int x = (a + b)/2;
      
        if ((a+b)%2==0){
          System.out.println((a+b)/2);
        } else {
          System.out.println((a+b+1)/2);
        }
    }
}

Compiler output:
Main.java:6: error: ';' expected
    	Scanner sc = nre Scanner(System.in);
    	                ^
1 error
Language: C++

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

int main(){
  	double a = 0, b = 0;
  	int x;
  
	cin >> a >> b;
  	x = (a+b) / 2 * 2 / 2
  	cout << x << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:30: error: expected ';' before 'cout'
    9 |         x = (a+b) / 2 * 2 / 2
      |                              ^
      |                              ;
   10 |         cout << x << endl;
      |         ~~~~
Language: C++

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

int main() {
  int a, b;
  cin >>a >>b
  cout << (a+b+1)/2 <<endl;
  // ここにプログラムを追記
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:14: error: expected ';' before 'cout'
    6 |   cin >>a >>b
      |              ^
      |              ;
    7 |   cout << (a+b+1)/2 <<endl;
      |   ~~~~
Language: C++

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

int main() {
  int a,b,c;
  cin >> a >> b;
  c=(a+b+1)/2
  cout << c << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:14: error: expected ';' before 'cout'
    7 |   c=(a+b+1)/2
      |              ^
      |              ;
    8 |   cout << c << endl;
      |   ~~~~
Language: C++

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

int main() {
  double a;
  double b;
  double x;
  
  cin >> a;
  cin >> b;
  x = (a+b) / 2;
  
  if( (a+b) % 2 ==1){
    x = x+1;
  }
  
  cout << x << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:13:13: error: invalid operands of types 'double' and 'int' to binary 'operator%'
   13 |   if( (a+b) % 2 ==1){
      |       ~~~~~ ^ ~
      |         |     |
      |         |     int
      |         double
Language: C++

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

int main() {
  double a;
  double b;
  double x;
  
  cin >> a;
  cin >> b;
  x = (a+b) / 2;
  
  if((a+b)%1){
    x = x+1;
  }
  
  cout << x << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:13:11: error: invalid operands of types 'double' and 'int' to binary 'operator%'
   13 |   if((a+b)%1){
      |      ~~~~~^~
      |        |   |
      |        |   int
      |        double
Language: C++

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

int main() {
  double a;
  double b;
  double x;
  
  cin >> a;
  cin >> b;
  x = (a+b) / 2;
  
  if(((a+b)%1) == true ){
    x = X+1;
  }
  
  cout << x << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:13:12: error: invalid operands of types 'double' and 'int' to binary 'operator%'
   13 |   if(((a+b)%1) == true ){
      |       ~~~~~^~
      |         |   |
      |         |   int
      |         double
a.cc:14:9: error: 'X' was not declared in this scope
   14 |     x = X+1;
      |         ^
Language: C++

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

int main() {
  double a;
  double b;
  double x;
  
  cin >> a;
  cin >> b;
  x = (a+b) / 2;
  
  if((a+b)%1){
    x = X+1;
  }
  
  cout << x << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:13:11: error: invalid operands of types 'double' and 'int' to binary 'operator%'
   13 |   if((a+b)%1){
      |      ~~~~~^~
      |        |   |
      |        |   int
      |        double
a.cc:14:9: error: 'X' was not declared in this scope
   14 |     x = X+1;
      |         ^
Language: C++

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

int main() {
  double a;
  double b;
  double x
  
  cin >> a;
  cin >> b;
  x = (a+b) / 2;
  cout << x << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:9:3: error: expected initializer before 'cin'
    9 |   cin >> a;
      |   ^~~
a.cc:11:3: error: 'x' was not declared in this scope
   11 |   x = (a+b) / 2;
      |   ^
Language: C++

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

int main(){
  
  int a,b;
  double c;
  
  cin >> a >> b;
  
  c= (a+b)/2;
  
  

Compiler output:
a.cc: In function 'int main()':
a.cc:11:14: error: expected '}' at end of input
   11 |   c= (a+b)/2;
      |              ^
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;
  cout<<(a+b+1)/2<<sndl;}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:20: error: 'sndl' was not declared in this scope
    7 |   cout<<(a+b+1)/2<<sndl;}
      |                    ^~~~
Language: C++

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

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

#include <iostream>
#include <string>
using namespace std;
int main() {
    int a,b;
    cin >> a >> b;
  int x = a+b
    if(x%2 == 0){
     cout << x/2 <<endl;
    }else{
     ++x;
     cout << x/2 <<endl;
    }
    
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:5: error: expected ',' or ';' before 'if'
    8 |     if(x%2 == 0){
      |     ^~
a.cc:10:6: error: 'else' without a previous 'if'
   10 |     }else{
      |      ^~~~
Language: C++

#include <iostream>
#include <string>
using namespace std;
int main() {
    int a,b;
    cin >> a >> b;
  int x = a+b
    if(x%2 == 0){
     cout << x <<endl;
    }else{
     ++x;
     cout << x <<endl;
    }
    
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:5: error: expected ',' or ';' before 'if'
    8 |     if(x%2 == 0){
      |     ^~
a.cc:10:6: error: 'else' without a previous 'if'
   10 |     }else{
      |      ^~~~
Language: C++

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

int main() {
  double a , b;
  
  cin >> a >> b ;
  cout << (a + b % 2) + (a + b / 2) << endl;// ここにプログラムを追記
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:18: error: invalid operands of types 'double' and 'int' to binary 'operator%'
    8 |   cout << (a + b % 2) + (a + b / 2) << endl;// ここにプログラムを追記
      |                ~ ^ ~
      |                |   |
      |                |   int
      |                double
Language: C++

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

int main() {
  int a,b,x;
  cin >> a >> b;
  x = (a + b) / 2
  cout << x + 1 << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:7:18: error: expected ';' before 'cout'
    7 |   x = (a + b) / 2
      |                  ^
      |                  ;
    8 |   cout << x + 1 << endl;
      |   ~~~~
Language: C++

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

int main() {
  int a,b,x;
  cin >> a >> b;
  x = (a + b) / 2
  cout << x << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:7:18: error: expected ';' before 'cout'
    7 |   x = (a + b) / 2
      |                  ^
      |                  ;
    8 |   cout << x << endl;
      |   ~~~~
Language: C++

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

Compiler output:
a.cc:8:10: error: extended character 　 is not valid in an identifier
    8 |   cin >> a　>> b;
      |          ^
a.cc: In function 'int main()':
a.cc:8:10: error: 'a\U00003000' was not declared in this scope
    8 |   cin >> a　>> b;
      |          ^~~
a.cc:8:16: error: 'b' was not declared in this scope
    8 |   cin >> a　>> b;
      |                ^
Language: C++

#include <iostream>
using namespace std;

int main() {
    // 一年の秒数
    double score;
    double leate;
    
    cin >> score >> leate;

    // 以下のコメント/* */を消して追記する
    cout << ceil((score + leate) / 2) << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:13: error: 'ceil' was not declared in this scope
   12 |     cout << ceil((score + leate) / 2) << endl;
      |             ^~~~
Language: C++

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

int main()
{
	int a, b, 
	cin >> a >> b;
	cout << (a + b + 1) / 2 << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:13: error: expected initializer before '>>' token
    7 |         cin >> a >> b;
      |             ^~
Language: C++

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

int main() {
 int a,b,c;
  cin>>a>>b;
  c=(a+b)/2
  cout<<c<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:12: error: expected ';' before 'cout'
    7 |   c=(a+b)/2
      |            ^
      |            ;
    8 |   cout<<c<<endl;
      |   ~~~~
Language: C++

#include <iostream>
#include <vector>

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

int main()
{
	double a, b;
	cin >> a >> b;

	cout << ceil((a + b) / 2) << endl;

	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:17: error: 'ceil' was not declared in this scope
   14 |         cout << ceil((a + b) / 2) << endl;
      |                 ^~~~
Language: C++

#include <iostream>
#include <vector>

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

int main()
{
	double a, b;
	cin >> a >> b;

	cout << ceil((a + b) / 2) << endl;

	system("pause");
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:17: error: 'ceil' was not declared in this scope
   14 |         cout << ceil((a + b) / 2) << endl;
      |                 ^~~~
Language: C++

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

int main(){
	double a,b,ave;
  	cin >> a >> b;
  	ave=(a+b)/2.0;
    if((a+b)%2==1){
    	ave++;
    }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:13: error: invalid operands of types 'double' and 'int' to binary 'operator%'
    8 |     if((a+b)%2==1){
      |        ~~~~~^~
      |          |   |
      |          |   int
      |          double
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:8:12: error: expected ';' before 'cout'
    8 |   x=(a+b)/2
      |            ^
      |            ;
    9 |   cout << x << endl;
      |   ~~~~
Language: C++

#include <bits/stdc++.h>
#include <cmath>
using namespace std;
 
int main() {
  int a;
  int b;
  cin >> a >> b;
  int r = (a + b) / 2;
  cout << mod(r % 2) == 0 ? r : ceil(r) << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:11: error: 'mod' was not declared in this scope; did you mean 'modf'?
   10 |   cout << mod(r % 2) == 0 ? r : ceil(r) << endl;
      |           ^~~
      |           modf
a.cc:10:41: error: invalid operands of types '__gnu_cxx::__enable_if<true, double>::__type' {aka 'double'} and '<unresolved overloaded function type>' to binary 'operator<<'
   10 |   cout << mod(r % 2) == 0 ? r : ceil(r) << endl;
      |                                 ~~~~~~~~^~~~~~~
Language: C++

using namespace std;

int main() {
	int a, b;
	cin >> a >> b;
	cout << (a + b) / 2 << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:9: error: 'cin' was not declared in this scope
    5 |         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:6:9: error: 'cout' was not declared in this scope
    6 |         cout << (a + b) / 2 << endl;
      |         ^~~~
a.cc:6:9: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:6:32: error: 'endl' was not declared in this scope
    6 |         cout << (a + b) / 2 << 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++

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

int main(void) {
    int a,b;
    cin >> a >> b;
    if((a+b)%2) cout << (a+b)/2+1 << endl;
    else (a+b)/2 << endl;
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:8:18: error: invalid operands of types 'int' and '<unresolved overloaded function type>' to binary 'operator<<'
    8 |     else (a+b)/2 << endl;
      |          ~~~~~~~~^~~~~~~
Language: C++

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

int main() {
  double a,b;
    cin>> a,b;
    c=a+b;
   cout << c << endl;
  
}

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

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

int main() {
  // ここにプログラムを追記
  int A, B;
  cin >> A >> B;
  cout << (A + B + 1) / 2 + << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:29: error: expected primary-expression before '<<' token
    8 |   cout << (A + B + 1) / 2 + << endl;
      |                             ^~
Language: C++

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

int main() {
  int a,b,c;
  cin >> a >> b;
  c=(a+b)/2
  cout << c+1 <<endl;
  
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:12: error: expected ';' before 'cout'
    7 |   c=(a+b)/2
      |            ^
      |            ;
    8 |   cout << c+1 <<endl;
      |   ~~~~
Language: Java

package atCoder;

import java.util.Scanner;

public class ABC082_Round_Up_The_Mean {

	/**
	 * 2つの正整数a,bが与えられます。
	 * a,bの平均値をxとします。
	 * xの小数点以下を切り上げて得られる整数を出力してください。
	 * @param args
	 */
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int a = sc.nextInt();
		int b = sc.nextInt();
		double x = (a + b)/2;
		double ans = Math.ceil(x);
		System.out.println((int)ans);
	}

}


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

package atCoder;

import java.util.Scanner;

public class ABC082_Round_Up_The_Mean {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int a = sc.nextInt();
		int b = sc.nextInt();
		double x = (a + b)/2;
		double ans = Math.ceil(x);
		System.out.println((int)ans);
	}

}


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

package atCoder;

import java.util.Scanner;

public class ABC082_Round_Up_The_Mean {

	/**
	 * 2つの正整数a,bが与えられます。
	 * a,bの平均値をxとします。
	 * xの小数点以下を切り上げて得られる整数を出力してください。
	 * @param args
	 */
	public static void Main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int a = sc.nextInt();
		int b = sc.nextInt();
		double x = (a + b)/2;
		double ans = Math.ceil(x);
		System.out.println((int)ans);
	}

}


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

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

int main() {
   double a, b;
   cin >> a >> b;

   cout << seil((a + b) / 2) << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:12: error: 'seil' was not declared in this scope; did you mean 'ceil'?
   11 |    cout << seil((a + b) / 2) << endl;
      |            ^~~~
      |            ceil
Language: C++

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

int main(){
  int a,b;
  cin >> a >> b;
  cout << (a+b+a+b-1)/2.0;
    
}

Compiler output:
a.cc:2:1: error: 'ussing' does not name a type
    2 | ussing namespace std;
      | ^~~~~~
a.cc: In function 'int main()':
a.cc:6:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    6 |   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:7:3: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    7 |   cout << (a+b+a+b-1)/2.0;
      |   ^~~~
      |   std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  int N, M;
  int ans;
  cin >> N >> M;
  
  ans = (N+M+1)/2
  cout << ans << endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:18: error: expected ';' before 'cout'
    9 |   ans = (N+M+1)/2
      |                  ^
      |                  ;
   10 |   cout << ans << endl;
      |   ~~~~
Language: C++

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

int main(){
    int a, b, c;
	cin >> a >> b;
    c = a + b + 1
    cout >> c >> endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:18: error: expected ';' before 'cout'
    7 |     c = a + b + 1
      |                  ^
      |                  ;
    8 |     cout >> c >> endl;
      |     ~~~~
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:7:20: error: expected ';' before 'cout'
    7 |           c = a + b
      |                    ^
      |                    ;
    8 |           cout << c - (c / 2)   << endl;
      |           ~~~~
Language: C++

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

int main() {
  
  int a, b;
  
  cin >> a >> b;
  
  cout << (a + b + 1) / 2 << endl;

Compiler output:
a.cc: In function 'int main()':
a.cc:10:35: error: expected '}' at end of input
   10 |   cout << (a + b + 1) / 2 << endl;
      |                                   ^
a.cc:4:12: note: to match this '{'
    4 | int main() {
      |            ^
Language: C++

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

int main()
{
  int N;
  int A;
  
  cin >> N >> A;
  
  cout << (N+A+!)/2 << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:17: error: expected primary-expression before ')' token
   11 |   cout << (N+A+!)/2 << endl;
      |                 ^
Language: C++

    #include <bits/stdc++.h>
    using namespace std;
     
    int main() {
      double a = 0.0 , b = 0.0, pass = 0.0;
      int ans = 0;
      cin >> a >> b;
      pass = (a + b) % 2.0;
      ans = (a + b) / 2.0;
      cout << ans + pass;
    }

Compiler output:
a.cc: In function 'int main()':
a.cc:8:22: error: invalid operands of types 'double' and 'double' to binary 'operator%'
    8 |       pass = (a + b) % 2.0;
      |              ~~~~~~~ ^ ~~~
      |                 |      |
      |                 double double
Language: C++

    #include <bits/stdc++.h>
    using namespace std;
     
    int main() {
      double a = 0.0 , b = 0.0, pass = 0.0;
      int ans = 0;
      cin >> a >> b;
      pass = (a + b) % 2;
      ans = (a + b) / 2;
      cout << ans + pass;
    }

Compiler output:
a.cc: In function 'int main()':
a.cc:8:22: error: invalid operands of types 'double' and 'int' to binary 'operator%'
    8 |       pass = (a + b) % 2;
      |              ~~~~~~~ ^ ~
      |                 |      |
      |                 double int
Language: C++

    #include <bits/stdc++.h>
    using namespace std;
     
    int main() {
      double a = 0.0 , b = 0.0, pass = 0.0;
      int ans = 0;
      cin >> a >> c;
      pass = (a + c) % 2;
      ans = (a + c) / 2;
      cout << ans + pass;
    }

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

    #include <bits/stdc++.h>
    using namespace std;
     
    int main() {
      double a = 0.0 , b = 0.0, pass = 0.0;
      int ans = 0;
      cin >> a >> c;
      pass = a + c % 2;
      ans = a + c / 2;
      cout << ans + pass;
    }

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

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

int main(){
  int a,b;
  cin >> a >> b;
  cout << (a + b + 1) / 2 << endl;

Compiler output:
a.cc: In function 'int main()':
a.cc:7:35: error: expected '}' at end of input
    7 |   cout << (a + b + 1) / 2 << endl;
      |                                   ^
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,c;
  double d,e;
  cin >> a >> b;
  c = (a + b) / 2;
  d = (a + b) / 2.0;
  e = 1 - (d - c);
  if e == 1{
    cout << c << endl;
  }
  else{
    cout << d + e << endl;
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:6: error: expected '(' before 'e'
   11 |   if e == 1{
      |      ^
      |      (
a.cc:14:3: error: 'else' without a previous 'if'
   14 |   else{
      |   ^~~~
Language: C++

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

int main(){
  int a,b,c;
  double d,e;
  cin >> a >> b;
  c = (a + b) / 2;
  d = (a + b) / 2.0;
  e = 1 - d - c;
  if e == 1{
    cout << c << endl;
  }
  else{
    cout << d + e << endl;
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:6: error: expected '(' before 'e'
   11 |   if e == 1{
      |      ^
      |      (
a.cc:14:3: error: 'else' without a previous 'if'
   14 |   else{
      |   ^~~~
Language: C++

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

int main() {
  int a, b;
  cin >> a >> b;
  c = a + b;
  if(c%2 !=0){
  (c + 1)/2;
}
else {
  c/2;
}
  cout<< c << endl;
}

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

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

int main() {
  int a, b;
  double c;
  cin >> a >> b >>c;
  cout << c = (a + b) /2 << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:26: error: invalid operands of types 'int' and '<unresolved overloaded function type>' to binary 'operator<<'
    8 |   cout << c = (a + b) /2 << endl;
      |               ~~~~~~~~~~~^~~~~~~
Language: C++

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


Compiler output:
a.cc: In function 'int main()':
a.cc:6:13: error: expected ';' before 'cout'
    6 |   cin >> a,b
      |             ^
      |             ;
    7 |   cout << (a+b)/2 << endl;
      |   ~~~~
Language: C++

#include<iostream>
using namespace std;

int main(){
    cin >> a >> b;
    cout << (a+b+1)/2 <<endl;

    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:12: error: 'a' was not declared in this scope
    5 |     cin >> a >> b;
      |            ^
a.cc:5:17: error: 'b' was not declared in this scope
    5 |     cin >> a >> b;
      |                 ^
Language: C

#include<stdio.h>
int main(void){
  float a,b;
  scanf("%f%f",&a,&b);
  a=(a+b)/2;
  a*=10;
  int a;
  if(a%10==0){
    float a=a/10;
    printf("%f",a);}
  else{
    float a=a/10;
    printf("%f",a+1);
  return 0;
}


Compiler output:
main.c: In function 'main':
main.c:7:7: error: conflicting types for 'a'; have 'int'
    7 |   int a;
      |       ^
main.c:3:9: note: previous declaration of 'a' with type 'float'
    3 |   float a,b;
      |         ^
main.c:15:1: error: expected declaration or statement at end of input
   15 | }
      | ^
Language: C

#include<stdio.h>
int main(void){
  float a,b;
  scanf("%f%f",&a,&b);
  a=(a+b)/2;
  if((a*10)%10==0)
    printf("%f",a);
  else
    printf("%f",a+1);
  return 0;
}


Compiler output:
main.c: In function 'main':
main.c:6:12: error: invalid operands to binary % (have 'float' and 'int')
    6 |   if((a*10)%10==0)
      |      ~~~~~~^
      |        |
      |        float
Language: C

#include<stdio.h>
int main(void){
  float a,b;
  scanf("%f%f",&a,&b);
  a=(a+b)/2;
  if(a%1==0)
    printf("%f",a);
  else
    printf("%f",a+1);
  return 0;
}


Compiler output:
main.c: In function 'main':
main.c:6:7: error: invalid operands to binary % (have 'float' and 'int')
    6 |   if(a%1==0)
      |       ^
Language: C

#include,stdio.h>
int main(void){
  float a,b;
  scanf("%f%f",&a,&b);
  a=(a+b)/2;
  if(a%1==0)
    printf("%f",a);
  else
    printf("%f",a+1);
  return 0;
}

Compiler output:
main.c:1:9: error: #include expects "FILENAME" or <FILENAME>
    1 | #include,stdio.h>
      |         ^
main.c: In function 'main':
main.c:4:3: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
    4 |   scanf("%f%f",&a,&b);
      |   ^~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
  +++ |+#include <stdio.h>
    1 | #include,stdio.h>
main.c:4:3: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
    4 |   scanf("%f%f",&a,&b);
      |   ^~~~~
main.c:4:3: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:6:7: error: invalid operands to binary % (have 'float' and 'int')
    6 |   if(a%1==0)
      |       ^
main.c:7:5: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
    7 |     printf("%f",a);
      |     ^~~~~~
main.c:7:5: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:7:5: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
main.c:7:5: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:9:5: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
    9 |     printf("%f",a+1);
      |     ^~~~~~
main.c:9:5: note: include '<stdio.h>' or provide a declaration of 'printf'
Language: C++

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

int main() {
  int a, b;
  cin >> a >> b;
 ceil << a / 2 + b / 2 << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:7:7: error: invalid operands of types '<unresolved overloaded function type>' and 'int' to binary 'operator<<'
    7 |  ceil << a / 2 + b / 2 << endl;
      |  ~~~~~^~~~~~~~~~~~~~~~
Language: C++

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

int main(){
int a,b;
cin >> a >> b;
cout <<ceil(a / 2 + b / 2)<<end; 
  
  
  
}

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: 'cin' was not declared in this scope
    6 | cin >> a >> b;
      | ^~~
a.cc:7:1: error: 'cout' was not declared in this scope
    7 | cout <<ceil(a / 2 + b / 2)<<end;
      | ^~~~
a.cc:7:8: error: 'ceil' was not declared in this scope
    7 | cout <<ceil(a / 2 + b / 2)<<end;
      |        ^~~~
a.cc:7:29: error: 'end' was not declared in this scope
    7 | cout <<ceil(a / 2 + b / 2)<<end;
      |                             ^~~
Language: C++

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

int main() {
  int a,b
  cin >> a >> b;
  cout << (a+b+1)/2 << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:3: error: expected initializer before 'cin'
    6 |   cin >> a >> b;
      |   ^~~
a.cc:7:14: error: 'b' was not declared in this scope
    7 |   cout << (a+b+1)/2 << endl;
      |              ^
Language: C++

    #include <bits/stdc++.h>
    using namespace std;
     
    int main() {
      int x=0,y=0;
      cin >>x >>y;
      ans=(x+y+1)/2;
      
      cout << ans << endl;
    }

Compiler output:
a.cc: In function 'int main()':
a.cc:7:7: error: 'ans' was not declared in this scope; did you mean 'abs'?
    7 |       ans=(x+y+1)/2;
      |       ^~~
      |       abs
Language: C++

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

int main() {
  int a,b;
  float c;
  int x;
  c=(a+b)/2;
  if(c%2==0){
    x=c;
    cout << x << endl;
  }else{
    x=(a+b)/2+1;
    cout << x << endl;
  }
 }


Compiler output:
a.cc: In function 'int main()':
a.cc:9:7: error: invalid operands of types 'float' and 'int' to binary 'operator%'
    9 |   if(c%2==0){
      |      ~^~
      |      | |
      |      | int
      |      float
Language: C++

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

int main() {
  int r,g;
  
  cin >> r >> g ;
  
  cout << (r+g)/2+1 <<;
  
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:23: error: expected primary-expression before ';' token
    9 |   cout << (r+g)/2+1 <<;
      |                       ^
Language: C++

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

int main() {
  int a,b;
  cin >> a >> b;
  int sum = s+b;
  cout << sum / 2 + sum % 2 << endl;
}

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:5:5: error: expected initializer before 'cin'
    5 |     cin >> A >> B;
      |     ^~~
a.cc:6:14: error: 'B' was not declared in this scope
    6 |   cout << (A+B)/2 <<endl;
      |              ^
Language: C++

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:7:16: error: expected primary-expression before '==' token
    7 |   if((a+b)/2 % == 0)
      |                ^~
Language: C++

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:8:14: error: expected primary-expression before '%' token
    8 |   if (a + b) % 2 == 0
      |              ^
Language: C++

#include<bits/stdc++>
using namespace std;
int main(){
 int a, b, x;
 cin >> a >> b;
 x = (a+b)/2 ;
 if((a+b)/2.0 != (a+b)/2)
   x++;
 cout << x << endl;
}

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

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

int main() {
  int a,b;
  cin >> a >> b;
  cout << (a + b + 1) / 2 << endl;
}

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

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

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:7:23: error: expected ';' before '}' token
    7 |   cout << (a+b+1)/2 +1
      |                       ^
      |                       ;
    8 | }
      | ~
Language: C++

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

int main(){
  double a;
  double b;
  double average;
  
  cin >> a >> b;
  
  average = (a+b) / 2;
  
  if (average % 2 = 1){
    average += 0.5;
  }
  
  cout << average << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:15: error: invalid operands of types 'double' and 'int' to binary 'operator%'
   13 |   if (average % 2 = 1){
      |       ~~~~~~~ ^ ~
      |       |         |
      |       double    int
Language: C++

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

int main(){
  int a;
  int b;
  int average;
  int x;
  double miss = 0.1;
  
  cin >> a >> b;
  
  average = (a+b) / 2;
  x = average - miss;
  
  cout << x;
}

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:11:3: error: 'cin' was not declared in this scope
   11 |   cin >> a >> b;
      |   ^~~
a.cc:16:3: error: 'cout' was not declared in this scope
   16 |   cout << x;
      |   ^~~~
Language: C++

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

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


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

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

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

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

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

int main(){
  
  int a, b;
  
  double x;
  
  int y;
  
  cin >> a >> b;
  
  x = (a + b) / 2;
  
  y = x + 1
  
  cout << y << endl;
  
}


Compiler output:
a.cc: In function 'int main()':
a.cc:16:12: error: expected ';' before 'cout'
   16 |   y = x + 1
      |            ^
      |            ;
   17 | 
   18 |   cout << y << endl;
      |   ~~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  int a, b, x;
  cin >> a >> b;
  x = (a+b)/2 + 0.5;
  int x = x
  cout << x << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:8:7: error: redeclaration of 'int x'
    8 |   int x = x
      |       ^
a.cc:5:13: note: 'int x' previously declared here
    5 |   int a, b, x;
      |             ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  int a, b, x;
  double c;
  cin >> a >> b;
  c = (a+b)/2 + 0.6;
  int x = double c;
  cout << x << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:9:7: error: redeclaration of 'int x'
    9 |   int x = double c;
      |       ^
a.cc:5:13: note: 'int x' previously declared here
    5 |   int a, b, x;
      |             ^
a.cc:9:11: error: expected primary-expression before 'double'
    9 |   int x = double c;
      |           ^~~~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  int a, b, c, x;
  cin >> a >> b;
  c = (a+b)/2 + 0.5;
  int x = double c;
  cout << x << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:8:7: error: redeclaration of 'int x'
    8 |   int x = double c;
      |       ^
a.cc:5:16: note: 'int x' previously declared here
    5 |   int a, b, c, x;
      |                ^
a.cc:8:11: error: expected primary-expression before 'double'
    8 |   int x = double c;
      |           ^~~~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  int a, b;
  double c;
  cin >> a >> b;
  c = (a+b)/2 + 0.5;
  int x;
  c = x
  cout << x << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:10:8: error: expected ';' before 'cout'
   10 |   c = x
      |        ^
      |        ;
   11 |   cout << x << endl;
      |   ~~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  int a, b, ｘ;
  double c;
  cin >> a >> b;
  c = (a+b)/2;
  x = C;
  cout << x << endl;
}


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

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  int a, b,　c, ｘ;
  cin >> a >> b;
  c = (a+b)/2
  int x = c
  cout << x << endl;
}

Compiler output:
a.cc:5:12: error: extended character 　 is not valid in an identifier
    5 |   int a, b,　c, ｘ;
      |            ^
a.cc: In function 'int main()':
a.cc:7:3: error: 'c' was not declared in this scope
    7 |   c = (a+b)/2
      |   ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  int a, b, c, ｘ;
  cin >> a >> b;
  c = (a+b)/2
    
  int x = c 
  cout << x << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:7:14: error: expected ';' before 'int'
    7 |   c = (a+b)/2
      |              ^
      |              ;
    8 | 
    9 |   int x = c
      |   ~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  int a, b, ｘ;
  cin >> a >> b;
  ｘ= (a+b)/2
  cout << x << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:14: error: expected ';' before 'cout'
    7 |   ｘ= (a+b)/2
      |              ^
      |              ;
    8 |   cout << x << endl;
      |   ~~~~
Language: C++

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

int main() {
  int a, b;
  cin >> a >> b;
  
  double x = (a+b)/2;
  int x2 = (a+b)/2;
  
  if(x - x2) * 10 == 0){
    cout << x2 << endl;  
  }else{
    cout << x2 + 1 << endl;
  }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:11:14: error: invalid type argument of unary '*' (have 'int')
   11 |   if(x - x2) * 10 == 0){
      |              ^~~~
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:7:22: error: expected ';' before numeric constant
    7 |   cout << (a + b) / 2 0.5;
      |                      ^~~~
      |                      ;
Language: C++

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


Compiler output:
a.cc: In function 'int main()':
a.cc:6:31: error: invalid operands of types 'double' and 'int' to binary 'operator%'
    6 |   cout << ( a + b - 0.1 ) / 2 % 1 + 1 << endl;
      |           ~~~~~~~~~~~~~~~~~~~ ^ ~
      |                           |     |
      |                           |     int
      |                           double
Language: C++

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


Compiler output:
a.cc: In function 'int main()':
a.cc:6:31: error: invalid operands of types 'double' and 'int' to binary 'operator%'
    6 |   cout << ( a + b - 0.1 ) / 2 % 1 + 1 << endl;
      |           ~~~~~~~~~~~~~~~~~~~ ^ ~
      |                           |     |
      |                           |     int
      |                           double
Language: C++

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


Compiler output:
a.cc: In function 'int main()':
a.cc:6:30: error: invalid operands of types 'double' and 'int' to binary 'operator%'
    6 |   cout << ( a + b - 0.1) / 2 % 1 + 1 << endl;
      |           ~~~~~~~~~~~~~~~~~~ ^ ~
      |                          |     |
      |                          |     int
      |                          double
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:6:35: error: invalid operands of types 'double' and 'int' to binary 'operator%'
    6 |   cout << ( ( a + b ) / 2 + 0.5 ) % 1 << endl;
      |           ~~~~~~~~~~~~~~~~~~~~~~~ ^ ~
      |                           |         |
      |                           double    int
Language: C++

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

int main(){
  int a, b;
  cin >> a >> b;
  if ((a+b)/2)*10+5>5(a+b)){
    cout << (a+b)/2 << endl;
}
else{
  cout << ((a+b)/2)+1 << endl;
}
}
//  ((a+b)/2)*10+4   5(a+b)   (((a+b)/2)+1)10
  

Compiler output:
a.cc: In function 'int main()':
a.cc:7:15: error: invalid type argument of unary '*' (have 'int')
    7 |   if ((a+b)/2)*10+5>5(a+b)){
      |               ^~~
a.cc:7:22: error: expression cannot be used as a function
    7 |   if ((a+b)/2)*10+5>5(a+b)){
      |                     ~^~~~~
Language: C++

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

int main() {
  int a, b;
  cin >> a >> b;
  int x = a + b
  if (x % 2 == 0) cout << x / 2 << endl;
  else cout << x / 2 + 1 << endl;
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:8:3: error: expected ',' or ';' before 'if'
    8 |   if (x % 2 == 0) cout << x / 2 << endl;
      |   ^~
a.cc:9:3: error: 'else' without a previous 'if'
    9 |   else cout << x / 2 + 1 << endl;
      |   ^~~~
Language: C++

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

int main() {
  int a,b,x;
  cin >> a >> b >> x;
  x=(a+b)/2
  cout << x << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:7:12: error: expected ';' before 'cout'
    7 |   x=(a+b)/2
      |            ^
      |            ;
    8 |   cout << x << endl;
      |   ~~~~
Language: C++

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

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



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

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

int main() {
  double a, b, c;
  cin >> a >> b ;
  c=(a+b)%2;
   
  cout << (a+b)/2+c << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:7:10: error: invalid operands of types 'double' and 'int' to binary 'operator%'
    7 |   c=(a+b)%2;
      |     ~~~~~^~
      |       |   |
      |       |   int
      |       double
Language: C++

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

int main() {
  double a, b, c;
  cin >> a >> b ;
  c=(a+b)%2;
   
  cout << (a+b)/2+c/2 << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:7:10: error: invalid operands of types 'double' and 'int' to binary 'operator%'
    7 |   c=(a+b)%2;
      |     ~~~~~^~
      |       |   |
      |       |   int
      |       double
Language: C++

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

int main(){
  int a,b:
  cin >> a >> b;
  cout << (a+b+1)/2 << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:10: error: found ':' in nested-name-specifier, expected '::'
    5 |   int a,b:
      |          ^
      |          ::
a.cc:5:9: error: 'b' has not been declared
    5 |   int a,b:
      |         ^
a.cc:6:7: error: qualified-id in declaration before '>>' token
    6 |   cin >> a >> b;
      |       ^~
a.cc:7:14: error: 'b' was not declared in this scope
    7 |   cout << (a+b+1)/2 << endl;
      |              ^