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

#include <iostream>

int a, b;
std::cin >> a >> b;
int mean = (int)(a + b + 0.5);
std::cout << mean;

Compiler output:
a.cc:4:6: error: 'cin' in namespace 'std' does not name a type
    4 | std::cin >> a >> b;
      |      ^~~
In file included from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:6:6: error: 'cout' in namespace 'std' does not name a type
    6 | std::cout << mean;
      |      ^~~~
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
Language: C++

int a, b;
cin >> a >> b;
int mean = (int)(a + b + 0.5);
cout << mean;

Compiler output:
a.cc:2:1: error: 'cin' does not name a type
    2 | cin >> a >> b;
      | ^~~
a.cc:4:1: error: 'cout' does not name a type
    4 | cout << mean;
      | ^~~~
Language: C++

int a, b;
std::cin >> a >> b;
int mean = (int)(a + b + 0.5);
std::cout << mean;

Compiler output:
a.cc:2:6: error: 'cin' in namespace 'std' does not name a type
    2 | std::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 | int a, b;
a.cc:4:6: error: 'cout' in namespace 'std' does not name a type
    4 | std::cout << mean;
      |      ^~~~
a.cc:4:1: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
    4 | std::cout << mean;
      | ^~~
Language: C++

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

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

#include <iostream>

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

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

#include<string>
#include<iostream>
#include<algorithm>
#include<set>
#include<math.h>
#include<vector>
#include<sstream>
#include<queue>
#include<functional>
#include<bitset>
#include<cstdio>
#include<iomanip>
#include<map>
#include<unordered_map>
#include<unordered_set>
#include <string.h>
using ll = long long;
 
#define rep(i, n) for(ll i = 0; i < (int)(n); i++)
#define reps(i,x) for(ll i=1;i<=(int)(x);i++)
#define rrep(i,x) for(ll i=((int)(x)-1);i>=0;i--)
#define rreps(i,x) for(ll i=(int)(x);i>0;i--)
#define all(x) (x).begin(),(x).end()
#define m0(x) memset(x,0,sizeof(x))
#define vll vector<ll>
#define vi vector<int>
#define mp make_pair
#define vpll vector<pair<ll,ll>>
#define vpi vector<pair<int,int>>
#define mod 1000000007 
using namespace std;
int main() {
  int a, b;
  if((a+b)%2==0)
    cout << (a+b)/2 << endl;
  else
    cout << (a+b)/2+1 << endl;
  retrun 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:38:3: error: 'retrun' was not declared in this scope
   38 |   retrun 0;
      |   ^~~~~~
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:16: error: 'B' was not declared in this scope
    7 |   cout << (a + B + 1) / 2 << endl;
      |                ^
Language: C++

#include <iostream>
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:31: error: expected '}' at end of input
    7 |   cout << (a + b) / 2 << endl;
      |                               ^
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,x;
  int n;
  cin>>a..b;
  x=(a+b)/2;
  n=x;
  cout<<x<<endl;
}


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

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


Compiler output:
a.cc:2:7: error: expected nested-name-specifier before 'main'
    2 | using main(){
      |       ^~~~
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:8:12: error: lvalue required as left operand of assignment
    8 |   if ((a+b)%2=1)
      |       ~~~~~^~
Language: C++

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

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

#include <bits/stdc++.h>
using namespace std;
int main(int argc, char const *argv[])
{
	int a,b;
	cin>>a>>b;
	cout<<(a+b+1)/2<<en
	return 0;
}

Compiler output:
a.cc: In function 'int main(int, const char**)':
a.cc:7:26: error: 'en' was not declared in this scope; did you mean 'yn'?
    7 |         cout<<(a+b+1)/2<<en
      |                          ^~
      |                          yn
Language: Java

import java.util.Scanner;

public class sample {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		double d = (sc.nextDouble() + sc.nextDouble()) / 2.0;
		System.out.println((int)Math.ceil(d));
	}
}


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

#include<iostream>
#include<string>

using namespace std;

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

	cout << (int)ceil((a + b) / 2.0) << endl;

	return 0;
}

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

#include<cstdio>
using namespace std;
int a,b;
int main()
{
	cin>>a>>b;
	cout<<(a+b+1)/2;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:9: error: 'cin' was not declared in this scope
    6 |         cin>>a>>b;
      |         ^~~
a.cc:2:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
    1 | #include<cstdio>
  +++ |+#include <iostream>
    2 | using namespace std;
a.cc:7:9: error: 'cout' was not declared in this scope
    7 |         cout<<(a+b+1)/2;
      |         ^~~~
a.cc:7:9: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
Language: C++

include<iostream>
using namespace std;

int main(){
  int a,b;
  cin >> a >> b;
  cout << (a+b)/2+(a+b)%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:6:3: error: 'cin' was not declared in this scope
    6 |   cin >> a >> b;
      |   ^~~
a.cc:7:3: error: 'cout' was not declared in this scope
    7 |   cout << (a+b)/2+(a+b)%2 << endl;
      |   ^~~~
a.cc:7:30: error: 'endl' was not declared in this scope
    7 |   cout << (a+b)/2+(a+b)%2 << endl;
      |                              ^~~~
Language: C++

#include<iostream>
using namespace std;

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

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

#include<iostream>
using namespace std;

int a,b;

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

Compiler output:
a.cc: In function 'int main()':
a.cc:9:5: error: expected ',' or ';' before 'cout'
    9 |     cout<<(int)c+1<<endl;
      |     ^~~~
Language: C++

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

int main(){
  int r;
  double a,b,t;
  cin >> a >> b;
  r = t = (a + b) / 2;
  if(t > int(t)){
    r = r + 1;
  }
  cout << result << endl;
}

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

#include<iostream>
using namespace std;

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

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:24: error: expected ';' before 'cout'
    8 |   if ((a+b)%2!=0) ans++
      |                        ^
      |                        ;
    9 |   cout << ans;
      |   ~~~~
Language: C++

#include<iostream>
using namespace std;

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

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:7:14: error: expected ';' before 'cout'
    7 |   ans=(a+b)/2
      |              ^
      |              ;
    8 |   cout << ans;
      |   ~~~~
Language: C++

#include <iostream>
#include <stdio.h>
#include <algorithm>
#include <numeric>
#include <functional>
#include <vector>
#include <string>

using namespace std;



int main() {

	double a, b;
	cin >> a >> b;

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

	return 0;
}

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

#include<algorithm>
#include <iostream>
#include<cstdio>
#include<cmath>
#include<iomanip>
#include<string>
using namespace std;
int main(){
  
    float a,b;
    cin>>a>>b;
    
    float c=(a+b)/2;
    int d=(a+b)/2;
    
    if(c%1!=0){
        cout<<d+1<<endl;
    }else{
        cout<<d<<endl;
    }
    
    
    return 0;
}







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

#include<iostream>
using namespace std;

int a, b;

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

Compiler output:
a.cc: In function 'int main()':
a.cc:10:25: error: expected ';' before 'cout'
   10 |   else((a + b) % 2 == 1) cout << (a + b + 1) / 2<< endl;
      |                         ^~~~~
      |                         ;
Language: C++

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

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


Compiler output:
a.cc: In function 'int main()':
a.cc:6:8: error: 'A' was not declared in this scope
    6 | cin >> A, B;
      |        ^
a.cc:6:11: error: 'B' was not declared in this scope
    6 | cin >> A, B;
      |           ^
Language: C++

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

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

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

#include<iostream>
#include<algorithm>
#include<string>
using namespace std;
int main(){
    int a, b;//A, B, C, D;
    cin >>a >> b;//A >>B >>C >>D;
    int c = a + b;
    if(c%2 == 1 )
        c++
    cout << c/2 <<endl;
        return 0;
}

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

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

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

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

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

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


Compiler output:
a.cc: In function 'int main()':
a.cc:8:7: error: 'Math' was not declared in this scope
    8 |   x = Math.ceiling((a+b)/2);
      |       ^~~~
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:8:16: error: expected ';' before 's'
    8 |   cin >> a >> b
      |                ^
      |                ;
    9 |   s = (b + a) / 2 + 0.5;
      |   ~
Language: C

#include<stdio.h>
int main() {
	int a, b, c;
  
	scanf_s("%d %d", &a, &b);
	

	if ((a+b)%2=1)
		printf("%d", (a+b)/2 + 1);
	printf("%d",a+b);

		return 0;
}

Compiler output:
main.c: In function 'main':
main.c:5:9: error: implicit declaration of function 'scanf_s'; did you mean 'scanf'? [-Wimplicit-function-declaration]
    5 |         scanf_s("%d %d", &a, &b);
      |         ^~~~~~~
      |         scanf
main.c:8:20: error: lvalue required as left operand of assignment
    8 |         if ((a+b)%2=1)
      |                    ^
Language: C

#include<stdio.h>
int main(){
double a,b,c;
int d;
scanf("%d %d",&a,&b);
c=(a+b)/2;
d=(a+b)/2;

if(c-d>=0.5)
printf("%d",d+1);
printf("%d"d);

return 0;
}

Compiler output:
main.c: In function 'main':
main.c:11:12: error: expected ')' before 'd'
   11 | printf("%d"d);
      |       ~    ^
      |            )
Language: C++

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


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


Compiler output:
a.cc:6:1: error: extended character 　 is not valid in an identifier
    6 | 　int a,b;
      | ^
a.cc:7:1: error: extended character 　 is not valid in an identifier
    7 | 　cin >> a >> b;
      | ^
a.cc:8:1: error: extended character 　 is not valid in an identifier
    8 | 　if((a + b) % 2) cout << (a + b + 1)/2 << endl;
      | ^
a.cc:9:1: error: extended character 　 is not valid in an identifier
    9 | 　else cout << (a + b) / 2 << endl;
      | ^
a.cc: In function 'int main()':
a.cc:6:1: error: '\U00003000int' was not declared in this scope
    6 | 　int a,b;
      | ^~~~~
a.cc:7:1: error: '\U00003000cin' was not declared in this scope
    7 | 　cin >> a >> b;
      | ^~~~~
a.cc:7:10: error: 'a' was not declared in this scope
    7 | 　cin >> a >> b;
      |          ^
a.cc:7:15: error: 'b' was not declared in this scope
    7 | 　cin >> a >> b;
      |               ^
a.cc:8:1: error: '\U00003000if' was not declared in this scope
    8 | 　if((a + b) % 2) cout << (a + b + 1)/2 << endl;
      | ^~~~
a.cc:9:1: error: '\U00003000else' was not declared in this scope
    9 | 　else cout << (a + b) / 2 << endl;
      | ^~~~~~
Language: C++

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

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

Compiler output:
a.cc:8:1: error: extended character 　 is not valid in an identifier
    8 | 　int a,b,c;
      | ^
a.cc:9:1: error: extended character 　 is not valid in an identifier
    9 | 　cin >> a >> b;
      | ^
a.cc:10:1: error: extended character 　 is not valid in an identifier
   10 | 　if((a + b) % 2){
      | ^
a.cc:11:1: error: extended character 　 is not valid in an identifier
   11 | 　    cout << (a + b + 1)/2 << endl;
      | ^
a.cc:12:1: error: extended character 　 is not valid in an identifier
   12 | 　}
      | ^
a.cc:13:1: error: extended character 　 is not valid in an identifier
   13 | 　else cout << (a + b) / 2 << endl;
      | ^
a.cc:14:1: error: extended character 　 is not valid in an identifier
   14 | 　
      | ^
a.cc: In function 'int main()':
a.cc:8:1: error: '\U00003000int' was not declared in this scope
    8 | 　int a,b,c;
      | ^~~~~
a.cc:9:1: error: '\U00003000cin' was not declared in this scope
    9 | 　cin >> a >> b;
      | ^~~~~
a.cc:9:10: error: 'a' was not declared in this scope
    9 | 　cin >> a >> b;
      |          ^
a.cc:9:15: error: 'b' was not declared in this scope
    9 | 　cin >> a >> b;
      |               ^
a.cc:10:1: error: '\U00003000if' was not declared in this scope
   10 | 　if((a + b) % 2){
      | ^~~~
a.cc:13:1: error: '\U00003000else' was not declared in this scope
   13 | 　else cout << (a + b) / 2 << endl;
      | ^~~~~~
a.cc:14:1: error: '\U00003000' was not declared in this scope
   14 | 　
      | ^~
Language: C++

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

int main () {
  int a, b;
  cin >> a >> b;
  c = a + b;
  cout << c * 2 + c % 2 << 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, c;

  cin >> a >> b;

  c = (a + b) / 2 + 0.5
  cout << c << endl;
}


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

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:6:5: error: expected initializer before 'cin'
    6 |     cin >> a >> b;
      |     ^~~
a.cc:7:18: error: 'b' was not declared in this scope
    7 |     int c = (a + b) / 2 + (a + b) % 2 / 2
      |                  ^
Language: C++

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:7:48: error: expected ';' before '}' token
    7 |   cout << ((a + b) / 2 + (a + b) % 2 + 0.5) / 1
      |                                                ^
      |                                                ;
    8 | }
      | ~
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:6:24: error: invalid operands of types 'double' and 'int' to binary 'operator%'
    6 |   cout << (a+b)/2+(a+b)%2<<endl;
      |                   ~~~~~^~
      |                     |   |
      |                     |   int
      |                     double
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:4:14: error: expected unqualified-id before ';' token
    4 |   double a,b,;
      |              ^
a.cc:6:24: error: invalid operands of types 'double' and 'int' to binary 'operator%'
    6 |   cout << (a+b)/2+(a+b)%2<<endl;
      |                   ~~~~~^~
      |                     |   |
      |                     |   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<<endl;
}

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

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

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:3: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    5 |   cout<<(a+b)/2<<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:5:18: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
    5 |   cout<<(a+b)/2<<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>
using namespace std;

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

Compiler output:
a.cc: In function 'int main()':
a.cc:7:10: error: lvalue required as left operand of assignment
    7 |   (a + b)/2 = x - d
      |   ~~~~~~~^~
Language: C++

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:7:10: error: lvalue required as left operand of assignment
    7 |   (a + b)/2 = x + d
      |   ~~~~~~~^~
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:8: error: expected initializer before '.' token
    5 |   int a. b;
      |        ^
a.cc:7:10: error: 'a' was not declared in this scope
    7 |   cin >> a >> b;
      |          ^
a.cc:7:15: error: 'b' was not declared in this scope
    7 |   cin >> a >> b;
      |               ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main()
{
	int n,a[100005],i,t=1,ans=0;
	cin>>n;
	for(i=1;i<=n;i++)
		cin>>a[i];
	sort(a+1,a+1+n);
	for(i=1;i<=n;i++)
	{
		if(a[i]==a[i+1])
			t++;
		if(a[i]!=a[i+1]||i==n-1)
		{
			if(a[i]<t) 
				ans+=t-a[i];
			if(a[i]>t) 
				ans+=t; 
				t=1;
			else break;
		}
	}
	cout<<ans<<endl;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:21:25: error: expected '}' before 'else'
   21 |                         else break;
      |                         ^~~~
a.cc:15:17: note: to match this '{'
   15 |                 {
      |                 ^
a.cc: At global scope:
a.cc:24:9: error: 'cout' does not name a type
   24 |         cout<<ans<<endl;
      |         ^~~~
a.cc:25:9: error: expected unqualified-id before 'return'
   25 |         return 0;
      |         ^~~~~~
a.cc:26:1: error: expected declaration before '}' token
   26 | }
      | ^
Language: C++

#include <iostream>
using namespace std;
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:6:17: error: 'ceil' was not declared in this scope
    6 |         cout << ceil((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<<endl;
}



Compiler output:
a.cc: In function 'int main()':
a.cc:8:12: error: lvalue required as left operand of assignment
    8 |   if ((a+b)%2 = 0)
      |       ~~~~~^~
Language: C++

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

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

Compiler output:
a.cc:1:2: error: invalid preprocessing directive #inlcude; did you mean #include?
    1 | #inlcude<bits/stdc++.h>
      |  ^~~~~~~
      |  include
a.cc: In function 'int main()':
a.cc:7:3: error: 'cin' was not declared in this scope
    7 |   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 | #inlcude<bits/stdc++.h>
a.cc:9:3: error: 'cout' was not declared in this scope
    9 |   cout<<c<<endl;
      |   ^~~~
a.cc:9:3: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:9:12: error: 'endl' was not declared in this scope
    9 |   cout<<c<<endl;
      |            ^~~~
a.cc:1:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
  +++ |+#include <ostream>
    1 | #inlcude<bits/stdc++.h>
Language: C++

#include<iostream>
using namespace std;
int main(){
  int c;
  double a,b;
  cin >> a >> b;
  c = (int)((a+b)/2+1)
  cout << c << "\n";
  return 0;
}

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

#include<iostream>
using namespace std;
int main(){
  int a;
  double a,b;
  cin >> a >> b;
  a = (int)((a+b)/2+1)
  cout << a << "\n";
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:10: error: conflicting declaration 'double a'
    5 |   double a,b;
      |          ^
a.cc:4:7: note: previous declaration as 'int a'
    4 |   int a;
      |       ^
a.cc:7:23: error: expected ';' before 'cout'
    7 |   a = (int)((a+b)/2+1)
      |                       ^
      |                       ;
    8 |   cout << a << "\n";
      |   ~~~~
Language: C++

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:9:16: error: invalid operands of types 'double' and 'int' to binary 'operator%'
    9 |   cout << x + x%2 << endl;
      |               ~^~
      |               | |
      |               | int
      |               double
Language: C++

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:9:16: error: invalid operands of types 'double' and 'int' to binary 'operator%'
    9 |   cout << x + x%2  << endl;
      |               ~^~
      |               | |
      |               | int
      |               double
Language: Java

import java.util.Scanner;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.Iterator;
import java.util.Collections;
import java.util.Comparator;
import java.util.Random;

class Main{
        public static void main(String args[]){
                Scanner sc = new Scanner(System.in);
                int a = sc.nextInt();
                int b = sc.nextInt();
                double x;
                int re;
                x = ( (a+b/2)+0.5 );
                re = x;
                System.out.print(re);
        }
}


Compiler output:
Main.java:18: error: incompatible types: possible lossy conversion from double to int
                re = x;
                     ^
1 error
Language: Java

import java.util.Scanner;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.Iterator;
import java.util.Collections;
import java.util.Comparator;
import java.util.Random;

class Main{
        public static void main(String args[]){
                Scanner sc = new Scanner(System.in);
                int a = sc.nextInt();
                int b = sc.nextInt();
                int x;
                x = (a+b/2)+0.5;
                System.out.print(x);
        }
}


Compiler output:
Main.java:16: error: incompatible types: possible lossy conversion from double to int
                x = (a+b/2)+0.5;
                           ^
1 error
Language: Java

//package jp.ac.tmu.kyuu090;
import java.util.Scanner;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.Iterator;
import java.util.Collections;
import java.util.Comparator;
import java.util.Random;

class Main{
        public static void main(String args[]){
                Scanner sc = new Scanner(System.in);
                int a = sc.nextInt();
                int b = sc.nextInt();
                int x=0.5;
                x += (a+b/2);
                System.out.print(x);
        }
}


Compiler output:
Main.java:16: error: incompatible types: possible lossy conversion from double to int
                int x=0.5;
                      ^
1 error
Language: C++

#include<iostream>
using namespace std;

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

Compiler output:
a.cc: In function 'int main()':
a.cc:6:6: error: expected ';' before 'a'
    6 |   cin a>>b;
      |      ^~
      |      ;
a.cc:8:10: error: conflicting declaration 'double x'
    8 |   double x = ceil((a+b)/2)
      |          ^
a.cc:7:7: note: previous declaration as 'int x'
    7 |   int x;
      |       ^
a.cc:8:14: error: 'ceil' was not declared in this scope
    8 |   double x = ceil((a+b)/2)
      |              ^~~~
Language: C++

#include<iostream>
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:6: error: expected ';' before 'a'
    6 |   cin a>>b;
      |      ^~
      |      ;
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:5:12: error: expected unqualified-id before ';' token
    5 |   int a, b,;
      |            ^
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:9:10: error: conflicting declaration 'double c'
    9 |   double c = a + b;
      |          ^
a.cc:6:7: note: previous declaration as 'int c'
    6 |   int c = a + b;
      |       ^
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:9:8: error: redeclaration of 'int x'
    9 |    int x = (a + b) / 2 + 0.5;
      |        ^
a.cc:6:7: note: 'int x' previously declared here
    6 |   int x = (a + b) / 2;
      |       ^
Language: C++

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

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

#include <iostream>

using namespace std;

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


Compiler output:
a.cc: In function 'int main()':
a.cc:7:9: 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;
  double c = (a + b) / 2 + 0.5;
  cin >> a >> b;
  cout << c << endl;
  
  int c = (a + b) / 2;
  cout << c << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:7: error: conflicting declaration 'int c'
   11 |   int c = (a + b) / 2;
      |       ^
a.cc:7:10: note: previous declaration as 'double c'
    7 |   double c = (a + b) / 2 + 0.5;
      |          ^
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:11:7: error: redeclaration of 'int c'
   11 |   int c = (a + b) / 2;
      |       ^
a.cc:7:7: note: 'int c' previously declared here
    7 |   int c = (a + b) % 2;
      |       ^
Language: C++

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

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

#include <iostream>

using namespace std;

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

Compiler output:
a.cc: In function 'int main()':
a.cc:9:14: error: expected ';' before 'cin'
    9 |         c=0.5
      |              ^
      |              ;
   10 |       cin >> a >> b >> endl;
      |       ~~~
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:10:4: error: expected '}' at end of input
   10 |   {
      |   ~^
a.cc:10:4: error: expected '}' at end of input
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,c;
  int c = (a + b) / 2;
  cin >> a >> b;
  cout << c << endl;
}

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

#include <iostream>
using namespace std;
int main (){
  double a, b;
  cin >> a >> b;
  a = (a + b) / 2;
  cout << ceil(a) << endl;
  return 0;
}

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

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

int main() {
    int a, b;
    double x = (a + b) / 2 + 1;
    c = x;
    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 = x;
      |     ^
Language: C++

#include <iostream>
using namespace std;
int main(void) {
  int a, b;
  cin >> a >> b;
  cout << ((a+b)/2)) << endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:20: error: expected ';' before ')' token
    6 |   cout << ((a+b)/2)) << endl;
      |                    ^
      |                    ;
Language: C++

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


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

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


Compiler output:
a.cc: In function 'int main()':
a.cc:7:3: error: expected ',' or ';' before 'double'
    7 |   double y = (a+b) % 2;
      |   ^~~~~~
a.cc:8:13: error: 'y' was not declared in this scope
    8 |   cout << x+y <<endl;
      |             ^
Language: C++

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


Compiler output:
a.cc: In function 'int main()':
a.cc:7:19: error: invalid operands of types 'double' and 'int' to binary 'operator%'
    7 |   cout << (x+0.5) % 300 <<endl;
      |           ~~~~~~~ ^ ~~~
      |             |       |
      |             double  int
Language: C++

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


Compiler output:
a.cc: In function 'int main()':
a.cc:7:19: error: invalid operands of types 'double' and 'int' to binary 'operator%'
    7 |   cout << (x+0.5) % 300 <<endl;
      |           ~~~~~~~ ^ ~~~
      |             |       |
      |             double  int
Language: C++

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

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


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

import java.util.*;
public class Roundup {
	public static void main(String[] args) {
		// TODO Auto-generated method stub
		Scanner sc = new Scanner(System.in);
		int a,b;
		a = sc.nextInt();
		b = sc.nextInt();
			System.out.println((a+b+1/2));
	}
}

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

import java.util.*;
public class Main {
	public static void main(String[] args) {
		// TODO Auto-generated method stub
		Scanner sc = new Scanner(System.in);
		int a,b;
		a = sc.nextInt();
		b = sc.nextInt();
		if((a + b) % 2 == 0){
			System.out.println((a+b/2));
		}else{
			System.out.println((a+b/2)+1);
		}
	}
}

Compiler output:
a.cc:1:1: error: 'import' does not name a type
    1 | import java.util.*;
      | ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:2:1: error: expected unqualified-id before 'public'
    2 | public class Main {
      | ^~~~~~
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:11: error: expected primary-expression before '{' token
    6 |   cout << {(a + b) / 2 + 0.5 } / 1 << endl;
      |           ^
a.cc:6:32: error: expected primary-expression before '/' token
    6 |   cout << {(a + b) / 2 + 0.5 } / 1 << endl;
      |                                ^
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:6:11: error: expected primary-expression before '{' token
    6 |   cout << {(a + b) / 2 + 0.5 } / 2 << endl;
      |           ^
a.cc:6:32: error: expected primary-expression before '/' token
    6 |   cout << {(a + b) / 2 + 0.5 } / 2 << endl;
      |                                ^
Language: C++

x = input().split()
a = int(x[0])
b = int(x[1])
c = (a + b) % 2
d = (a + b) // 2
if c == 0 :
     print(d)
else :
    print(d + 1)
    


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

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:7:14: error: no match for call to '(std::ostream {aka std::basic_ostream<char>}) (int)'
    7 |         cout (a+b+1)/2;
      |         ~~~~~^~~~~~~
Language: C++

#include<iostream>
using namespace std;

int main() {
	double a, b, x,y;
	cin >> a >> b;
	x = (a + b) / 2;
	
	y = ceil(x);
	cout << y << "\n";
	return 0;
}

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

#include<iostream>
using namespace std;

int main() {
	double a, b, x,y;

	x = (a + b) / 2;
	
	y = ceil(x);
	cout << y << "\n";
	return 0;
}

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

#include<numeric>
#include<limits>
#include<utility>
#include<queue>
#include<random>

using namespace std;
typedef long long LL;

int main() {


	int a, b = 0, c = 0;
	//----------------------
	int n, X, Z,A,B;
	double ans ;

	//cin >> X;//円
	cin >> A;//ケーキ
	cin >> B;

	
	ans = A + B / 2;

	ans=ceil(ans);
	

	cout << ans << endl;

	//------------------------
	cin >> Z;

	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:19:9: error: 'cin' was not declared in this scope
   19 |         cin >> A;//ケーキ
      |         ^~~
a.cc:6:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
    5 | #include<random>
  +++ |+#include <iostream>
    6 | 
a.cc:28:9: error: 'cout' was not declared in this scope
   28 |         cout << ans << endl;
      |         ^~~~
a.cc:28:9: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:28:24: error: 'endl' was not declared in this scope
   28 |         cout << ans << endl;
      |                        ^~~~
a.cc:6:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
    5 | #include<random>
  +++ |+#include <ostream>
    6 |
Language: C++

a,b=input().split();print(eval(a/b+a%b)

Compiler output:
a.cc:1:1: error: 'a' does not name a type
    1 | a,b=input().split();print(eval(a/b+a%b)
      | ^
a.cc:1:26: error: expected constructor, destructor, or type conversion before '(' token
    1 | a,b=input().split();print(eval(a/b+a%b)
      |                          ^
Language: C++

#include<iostream>
using namespace std; 
 
 
int main()
{
int a,b;
cin >> a >> b;
a = ((a+b+1)/2);
printf(a);
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:8: error: invalid conversion from 'int' to 'const char*' [-fpermissive]
   10 | printf(a);
      |        ^
      |        |
      |        int
In file included from /usr/include/c++/14/cstdio:42,
                 from /usr/include/c++/14/ext/string_conversions.h:45,
                 from /usr/include/c++/14/bits/basic_string.h:4154,
                 from /usr/include/c++/14/string:54,
                 from /usr/include/c++/14/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/stdio.h:363:43: note:   initializing argument 1 of 'int printf(const char*, ...)'
  363 | extern int printf (const char *__restrict __format, ...);
      |                    ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~
Language: C++

#include<iostream>
using namespace std; 
 
 
int main()
{
double a,b;
cin >> a >> b;
a = floor((a+b+1)/2);
printf(a);
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:5: error: 'floor' was not declared in this scope
    9 | a = floor((a+b+1)/2);
      |     ^~~~~
a.cc:10:8: error: cannot convert 'double' to 'const char*'
   10 | printf(a);
      |        ^
      |        |
      |        double
In file included from /usr/include/c++/14/cstdio:42,
                 from /usr/include/c++/14/ext/string_conversions.h:45,
                 from /usr/include/c++/14/bits/basic_string.h:4154,
                 from /usr/include/c++/14/string:54,
                 from /usr/include/c++/14/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/stdio.h:363:43: note:   initializing argument 1 of 'int printf(const char*, ...)'
  363 | extern int printf (const char *__restrict __format, ...);
      |                    ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~
Language: C++

#include <iostream>
using namespace std;

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

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

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

 
 
  return 0;
}

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

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

 
 
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:6:31: error: expected ';' before 'return'
    6 |         printf("%d",1+(a+b)/2)
      |                               ^
      |                               ;
......
   10 |   return 0;
      |   ~~~~~~                       
main.c:11:1: error: expected declaration or statement at end of input
   11 | }
      | ^
Language: C++

#include<iostream>
#include<cstdlib>
#include<cmath>
#include<stack>
#include<queue>
#include<string>
#include<algorithm>
typedef long long int ll;
using namespace std;

int main(){
    ll a,b;
    cin>>a>>b;
    float x=ceil(a+b)/2

    cout<<x;

    
    

    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:16:5: error: expected ',' or ';' before 'cout'
   16 |     cout<<x;
      |     ^~~~
Language: C++

#include<iostream>
#include<cstdlib>
#include<smath>
#include<stack>
#include<queue>
#include<string>
#include<algorithm>
typedef long long int ll;
using namespace std;

int main(){
    ll a,b;
    cin>>a>>b;
    float x=ceil(a+b)/2

    cout<<x;

    
    

    return 0;
}

Compiler output:
a.cc:3:9: fatal error: smath: No such file or directory
    3 | #include<smath>
      |         ^~~~~~~
compilation terminated.