criyle/codenet-compile-errors huggingface dataset:
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:16: 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 a,b,x,y;
  cio >> a >> b;
  x= (a+b)/2;
  y=(a+b)%2;
    if(y==0){
      cout << x << endl;
    }else{
      cout << x+1 << endl;
    }
}

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

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

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

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

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

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

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:6:3: error: expected initializer before 'double'
    6 |   double v
      |   ^~~~~~
a.cc:8:3: error: 'v' was not declared in this scope
    8 |   v = (x+y)%2;
      |   ^
a.cc:8:10: error: 'y' was not declared in this scope
    8 |   v = (x+y)%2;
      |          ^
Language: C++

#include<bits/stdc++.h>
int main(){
  int a,b;
  double ans;
  cin >> a >> b;
  ans = (a+b)%2;
  if(ans == 0) cout << (a+b)/2 << endl;
  else{
    a = (a+b)/2 + 1;
    cout << a << 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 /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:16: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    7 |   if(ans == 0) 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:7:35: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
    7 |   if(ans == 0) 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)
      |     ^~~~
a.cc:10:5: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   10 |     cout << a << endl;
      |     ^~~~
      |     std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:10:18: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   10 |     cout << a << endl;
      |                  ^~~~
      |                  std::endl
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
Language: C++

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

int main(){
  int n;cin>>n;
  vector<int> a(n);for(int i=0;i<n;i++){cin>>a.at(i);}
  int m,M;m=*min_element(a.begin(),a.end());M=*max_element(a.begin(),a.end());
  int sum=0;
  int num=0;
  vector<int> num(M,0);
  for(int i=0;i<M;i+++){
    ++num.at(a.at(i));
  }
  
  for(int i=m;i<=M;i++){
    if(num.at(i)<i){
      sum+=num.at(i);
      //cout<<sum<<endl;
    }else{
      sum+=num.at(i)-i;
      //cout<<sum<<endl;
    }
  }
  cout<<sum<<endl;
  
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:15: error: conflicting declaration 'std::vector<int> num'
   12 |   vector<int> num(M,0);
      |               ^~~
a.cc:11:7: note: previous declaration as 'int num'
   11 |   int num=0;
      |       ^~~
a.cc:13:23: error: expected primary-expression before ')' token
   13 |   for(int i=0;i<M;i+++){
      |                       ^
a.cc:14:11: error: request for member 'at' in 'num', which is of non-class type 'int'
   14 |     ++num.at(a.at(i));
      |           ^~
a.cc:18:12: error: request for member 'at' in 'num', which is of non-class type 'int'
   18 |     if(num.at(i)<i){
      |            ^~
a.cc:19:16: error: request for member 'at' in 'num', which is of non-class type 'int'
   19 |       sum+=num.at(i);
      |                ^~
a.cc:22:16: error: request for member 'at' in 'num', which is of non-class type 'int'
   22 |       sum+=num.at(i)-i;
      |                ^~
Language: C++

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

int main(){
  int n;cin>>n;
  vector<int> a(n);for(int i=0;i<n;i++){cin>>a.at(i);}
  int m,M;m=*min_element(a.begin(),a.end());M=*max_element(a.begin(),a.end());
  int sum=0;
  
  for(int i=m;i<=M;i++){
    sum=a.count(a.begin(),a.end(),i);
    if(num<a.at(i)){
      sum+=num;
    }else{
      sum+=m-a.at(i);
    }
  }
  cout<<sum<<endl;
  
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:14: error: 'min_element' was not declared in this scope
    8 |   int m,M;m=*min_element(a.begin(),a.end());M=*max_element(a.begin(),a.end());
      |              ^~~~~~~~~~~
a.cc:8:48: error: 'max_element' was not declared in this scope
    8 |   int m,M;m=*min_element(a.begin(),a.end());M=*max_element(a.begin(),a.end());
      |                                                ^~~~~~~~~~~
a.cc:12:11: error: 'class std::vector<int>' has no member named 'count'
   12 |     sum=a.count(a.begin(),a.end(),i);
      |           ^~~~~
a.cc:13:8: error: 'num' was not declared in this scope; did you mean 'sum'?
   13 |     if(num<a.at(i)){
      |        ^~~
      |        sum
Language: C++

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

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

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

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

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

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

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

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

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

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

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

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

#include <iostream>
using namespace std;

int main()
{
  int a, b; cin >> a >> b;
  cout << ceil((a+b)/2);
  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+b)/2);
      |           ^~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  int A, B;
  string op;
  cin >> A >> op >> B;
  if( op == + ){
    cout << A + B << endl;
  }else if( op == - ){
    cout << A - B << endl;
  }else if( op == * ){
    cout << A * B << endl;
  }else if( op == / ){
    cout << A / B << endl;
  }else if( op == ? ){
    cout << "error" <<endl
  }else if( op == = ){
    cout << "error" << endl;
  }else if( op == ! ){
    cout << "error" << endl;
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:15: error: expected primary-expression before ')' token
    8 |   if( op == + ){
      |               ^
a.cc:10:21: error: expected primary-expression before ')' token
   10 |   }else if( op == - ){
      |                     ^
a.cc:12:21: error: expected primary-expression before ')' token
   12 |   }else if( op == * ){
      |                     ^
a.cc:14:19: error: expected primary-expression before '/' token
   14 |   }else if( op == / ){
      |                   ^
a.cc:14:21: error: expected primary-expression before ')' token
   14 |   }else if( op == / ){
      |                     ^
a.cc:16:19: error: expected primary-expression before '?' token
   16 |   }else if( op == ? ){
      |                   ^
a.cc:16:21: error: expected primary-expression before ')' token
   16 |   }else if( op == ? ){
      |                     ^
a.cc:16:20: error: expected ':' before ')' token
   16 |   }else if( op == ? ){
      |                    ^~
      |                    :
a.cc:16:21: error: expected primary-expression before ')' token
   16 |   }else if( op == ? ){
      |                     ^
a.cc:17:27: error: expected ';' before '}' token
   17 |     cout << "error" <<endl
      |                           ^
      |                           ;
   18 |   }else if( op == = ){
      |   ~                        
a.cc:18:19: error: expected primary-expression before '=' token
   18 |   }else if( op == = ){
      |                   ^
a.cc:18:21: error: expected primary-expression before ')' token
   18 |   }else if( op == = ){
      |                     ^
a.cc:20:21: error: expected primary-expression before ')' token
   20 |   }else if( op == ! ){
      |                     ^
Language: C++

#include<iostream>
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: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 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:3: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    6 |   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:6:18: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
    6 |   cout<<(a+b)/2<<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:9:5: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    9 |     cout<<(a+b)/2+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:9:22: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
    9 |     cout<<(a+b)/2+1<<endl;
      |                      ^~~~
      |                      std::endl
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
Language: C++

#include<iostream>
int main(){
int 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:5:3: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    5 |   cout<<(a+b)/2<<endl;
      |   ^~~~
      |   std::cout
In file included from a.cc:1:
/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/iostream:41:
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
a.cc:8:5: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    8 |     cout<<(a+b)/2+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:22: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
    8 |     cout<<(a+b)/2+1<<endl;
      |                      ^~~~
      |                      std::endl
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
Language: C++

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

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


Compiler output:
a.cc:7:19: error: extended character ÷ is not valid in an identifier
    7 |   cout << (a + b) ÷ 2 + (a + b) % 2 << endl;
      |                   ^
a.cc: In function 'int main()':
a.cc:7:18: error: expected ';' before '\U000000f7'
    7 |   cout << (a + b) ÷ 2 + (a + b) % 2 << endl;
      |                  ^~
      |                  ;
Language: C++

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

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

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

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

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

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:9:5: error: expected '}' before 'else'
    9 |     else{
      |     ^~~~
a.cc:7:30: note: to match this '{'
    7 |         if (((a+b)/2)%1 != 0){
      |                              ^
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:9:5: error: expected '}' before 'else'
    9 |     else{
      |     ^~~~
a.cc:7:30: note: to match this '{'
    7 |         if (((a+b)/2)%1 != 0){
      |                              ^
a.cc:10:26: error: expected primary-expression before '<<' token
   10 |         cout << (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:7:20: error: expected primary-expression before '<<' token
    7 |   cout << (a+b)/2; << endl;
      |                    ^~
Language: C++

#include <iostream>
#include <algorithm>
#include <vector>
#include <string>
#include <queue>
#include <stack>
#include <set> 
#include <map>
#include <bitset>
#include <cctype>
#include <cmath>
#include <cstring>
#include <iomanip>
#define REP(i,n) for(int i=0; i<(n); ++i)
#define FOR(i,a,b) for(int i=(a); i<(b); ++i)
using namespace std;
typedef long long ll;
typedef pair<int, int> P;
const int INF = 100100100;
const int MOD = (int)1e9 + 7;
const ll MODLL = (ll)1e9 + 7;
const double EPS = 1e-9;

int main () {
    
    int a,b; cin >>a>>b;
    int ans = a+b;
    if (ans % 2 == 0) {
        cout << ans/2 << endl;
    } else {
        cout << ans/2 + 1 << endl;
    } 
    
    return 0;
}
#include <iostream>
#include <algorithm>
#include <vector>
#include <string>
#include <queue>
#include <stack>
#include <set> 
#include <map>
#include <bitset>
#include <cctype>
#include <cmath>
#include <cstring>
#include <iomanip>
#define REP(i,n) for(int i=0; i<(n); ++i)
#define FOR(i,a,b) for(int i=(a); i<(b); ++i)
using namespace std;
typedef long long ll;
typedef pair<int, int> P;
const int INF = 100100100;
const int MOD = (int)1e9 + 7;
const ll MODLL = (ll)1e9 + 7;
const double EPS = 1e-9;

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




Compiler output:
a.cc:54:11: error: redefinition of 'const int INF'
   54 | const int INF = 100100100;
      |           ^~~
a.cc:19:11: note: 'const int INF' previously defined here
   19 | const int INF = 100100100;
      |           ^~~
a.cc:55:11: error: redefinition of 'const int MOD'
   55 | const int MOD = (int)1e9 + 7;
      |           ^~~
a.cc:20:11: note: 'const int MOD' previously defined here
   20 | const int MOD = (int)1e9 + 7;
      |           ^~~
a.cc:56:10: error: redefinition of 'const ll MODLL'
   56 | const ll MODLL = (ll)1e9 + 7;
      |          ^~~~~
a.cc:21:10: note: 'const ll MODLL' previously defined here
   21 | const ll MODLL = (ll)1e9 + 7;
      |          ^~~~~
a.cc:57:14: error: redefinition of 'const double EPS'
   57 | const double EPS = 1e-9;
      |              ^~~
a.cc:22:14: note: 'const double EPS' previously defined here
   22 | const double EPS = 1e-9;
      |              ^~~
a.cc:59:5: error: redefinition of 'int main()'
   59 | int main () {
      |     ^~~~
a.cc:24:5: note: 'int main()' previously defined here
   24 | int main () {
      |     ^~~~
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:3:2: error: 'cin' was not declared in this scope
    3 |  cin >> a >> b ;
      |  ^~~
a.cc:4:2: error: 'cout' was not declared in this scope
    4 |  cout << ( a + b ) / 2 + ( a +b ) % 2 << endl;
      |  ^~~~
a.cc:4:42: error: 'endl' was not declared in this scope
    4 |  cout << ( a + b ) / 2 + ( a +b ) % 2 << endl;
      |                                          ^~~~
Language: C++

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

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:3:3: error: 'cin' was not declared in this scope
    3 |   cin >> a >> b;
      |   ^~~
a.cc:4:13: error: expected ';' before 'cout'
    4 |  x = (a+b)%2
      |             ^
      |             ;
    5 |    cout << (a+b)/2+x << endl;
      |    ~~~~
Language: C++

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

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


Compiler output:
a.cc: In function 'int main()':
a.cc:8:9: error: expected ')' before numeric constant
    8 |   c = (a.0+b.0)/2-(a+b)/2
      |       ~ ^~
      |         )
Language: C++

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

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


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

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

int main() {
  double 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:10:12: error: expected ';' before 'cout'
   10 |   y = x + 1
      |            ^
      |            ;
   11 |   cout << y <<endl;
      |   ~~~~
Language: C++

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

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

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:9:7: error: expected ';' before 'c'
    9 |   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;
  cout c << endl;
}
  

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

#include <bits/stdc++.h>

using namespace std;

#define REP(i, n) for(int i = 0; i < (n); i++)
#define SREP(i, s) for(int i = 0; i < (s.length()); i++)
#define SORT(v, n) sort(v, v+n);
#define GSORT(v, n) sort(v, v+n, greater<int>())

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

}


Compiler output:
a.cc: In function 'int main()':
a.cc:14:35: error: expected ';' before '}' token
   14 |         else cout << a/b+1 << endl
      |                                   ^
      |                                   ;
   15 | 
   16 | }
      | ~
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:28: error: expected ';' before '}' token
    7 |   cout << ( a + b + 1 ) / 2
      |                            ^
      |                            ;
    8 |   }
      |   ~
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:24: error: expected ';' before '}' token
    7 |   cout << a + b + 1 / 2
      |                        ^
      |                        ;
    8 |   }
      |   ~
Language: C++

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:6:3: error: expected initializer before 'cin'
    6 |   cin >> a >> b;
      |   ^~~
a.cc:7:20: error: 'x' was not declared in this scope
    7 |   if ( a + b = 2 * x ) {
      |                    ^
a.cc:8:26: error: expected ';' before '}' token
    8 |     cout << ( a + b ) / 2
      |                          ^
      |                          ;
    9 | }
      | ~                         
a.cc:10:20: error: 'x' was not declared in this scope
   10 |   if ( a + b = 2 * x + 1 ) {
      |                    ^
a.cc:11:30: error: expected ';' before '}' token
   11 |     cout << ( a + b ) / 2 + 1
      |                              ^
      |                              ;
   12 |   }
      |   ~
Language: C++

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

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


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

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

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

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

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

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

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

#include<stdio.h>

int main(int argc, char **argv){
  int a,b;
  int sum;

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

  sum = a + b:

  if(sum % 2 == 0)
    printf("%d", sum / 2);
  else
    printf("%d", ((sum - 1) / 2) + 1);

  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:9:14: error: expected ';' before ':' token
    9 |   sum = a + b:
      |              ^
      |              ;
main.c:13:3: error: 'else' without a previous 'if'
   13 |   else
      |   ^~~~
Language: C

#include<stdio.h>

int main(int argc, char **argv){
  int a,b;
  int sum;

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

  sum = a + b:

  if(sum % 2 == 0)
    printf("%d", sum / 2);
  else
    printf("%d", (sum / 2) + 1);
  
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:9:14: error: expected ';' before ':' token
    9 |   sum = a + b:
      |              ^
      |              ;
main.c:13:3: error: 'else' without a previous 'if'
   13 |   else
      |   ^~~~
Language: C++

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

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

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

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

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

#include <iostream>

using namespace std;

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

Compiler output:
a.cc: In function 'int main()':
a.cc:10:10: error: 'B' was not declared in this scope
   10 |   if( (a+B) % 2 == 0 ){
      |          ^
a.cc:13:14: error: 'A' was not declared in this scope
   13 |     cout << (A+B)/2 + 1 << endl;
      |              ^
Language: C++

#include <bits/stdc++.h>
#define FI first
#define SE second
#define EPS 1e-9
#define ALL(a) a.begin(),a.end()
#define SZ(a) int((a).size())
#define MS(s, n) memset(s, n, sizeof(s))
#define FOR(i,a,b) for (int i = (a); i <= (b); i++)
#define FORE(i,a,b) for (int i = (a); i >= (b); i--)
#define FORALL(it, a) for (__typeof((a).begin()) it = (a).begin(); it != (a).end(); it++)
#define WHATIS(x) cout << #x << " is " << x << endl;
#define ERROR(args...) { string _s = #args; replace(_s.begin(), _s.end(), ',', ' '); stringstream _ss(_s); istream_iterator<string> _it(_ss); err(_it, args); }
//__builtin_ffs(x) return 1 + index of least significant 1-bit of x
//__builtin_clz(x) return number of leading zeros of x
//__builtin_ctz(x) return number of trailing zeros of x

using namespace std;
using ll = long long;
using ld = double;
typedef pair<int, int> II;
typedef pair<II, ll> III;
typedef complex<ld> cd;
typedef vector<cd> vcd;

void err(istream_iterator<string> it) {}
template<typename T, typename... Args>
void err(istream_iterator<string> it, T a, Args... args) {
    cout << *it << " = " << a << endl;
    err(++it, args...);
}

const ll MODBASE = 1000000007LL;
const int MAXN = 100010;
const int MAXM = 100010;
const int MAXK = 510;
const int MAXQ = 200010;

int main() {
    ios::sync_with_stdio(0);
    cin.tie(nullptr);
  cin >> a >> b;
  a = a + b;
  cout << a / 2 + a % 2;
    return 0;
}

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

import java.math.BigInteger;
import java.util.Scanner;
public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner((System.in));
        int a = sc.nextInt();
        int b = sc.nextInt();
        BigInteger c = BigInteger.ZERO;

        c = (new BigInteger(String.valueOf(a)).add(new BigInteger(String.valueOf(b))).divide(new BigInteger("2"));

        System.out.println(String.format("%.0f", c));

		sc.close();
	}
}


Compiler output:
Main.java:10: error: ')' expected
        c = (new BigInteger(String.valueOf(a)).add(new BigInteger(String.valueOf(b))).divide(new BigInteger("2"));
                                                                                                                 ^
1 error
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:8:17: error: 'resut' was not declared in this scope; did you mean 'result'?
    8 |         cout << resut << endl;
      |                 ^~~~~
      |                 result
Language: C++

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

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

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

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:7:14: error: expected ';' before 'y'
    7 |   x=0.5*(a+b)
      |              ^
      |              ;
    8 |     y=x%1;
      |     ~
Language: C++

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

int main() {
  int number1, number2, number3, number4;
  
  cin >> number1 >> number2;
  
  number3 = number1 + number2;
  
  if (number3 % 2 = 0) {
    number4 = number3 / 2;
  } else {
    number4 = number3 / 2 + 1;
  }
  cout << number4 << endl;
}

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

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

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

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

#include <iostream>
using namespace std;

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

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

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

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

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

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

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


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

public class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    String s = sc.nextLine();
    String[] spl = s.split(" ");
    int a = Integer.parseInt(spl[0]);
    int b = Integer.parseInt(spl[1]);
	double x = (a + b) / 2;
    System.out.prinrln((int)Math.ceil(x));
    sc.close();
  }
}

Compiler output:
Main.java:3: error: cannot find symbol
    Scanner sc = new Scanner(System.in);
    ^
  symbol:   class Scanner
  location: class Main
Main.java:3: error: cannot find symbol
    Scanner sc = new Scanner(System.in);
                     ^
  symbol:   class Scanner
  location: class Main
Main.java:9: error: cannot find symbol
    System.out.prinrln((int)Math.ceil(x));
              ^
  symbol:   method prinrln(int)
  location: variable out of type PrintStream
3 errors
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:9:12: error: extended character 　 is not valid in an identifier
    9 |     cout <<　(　a + b　) / 2 << endl;
      |            ^
a.cc:9:15: error: extended character 　 is not valid in an identifier
    9 |     cout <<　(　a + b　) / 2 << endl;
      |               ^
a.cc:9:21: error: extended character 　 is not valid in an identifier
    9 |     cout <<　(　a + b　) / 2 << endl;
      |                     ^
a.cc: In function 'int main()':
a.cc:9:15: error: '\U00003000a' was not declared in this scope
    9 |     cout <<　(　a + b　) / 2 << endl;
      |               ^~~
a.cc:9:21: error: 'b\U00003000' was not declared in this scope
    9 |     cout <<　(　a + b　) / 2 << endl;
      |                     ^~~
a.cc:9:12: error: '\U00003000' was not declared in this scope
    9 |     cout <<　(　a + b　) / 2 << endl;
      |            ^~
Language: C++

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


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

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


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

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

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

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:10:12: error: expected ';' before 'cout'
   10 |   y = x2-x1
      |            ^
      |            ;
   11 |   cout << x2 + y << endl;
      |   ~~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  int a,b,x1,z,c;
  double x2,y,d;
  cin >> a >> b;
  x2 =(a+b)/2.0;
  x1 =(a+b)/2;
  y = x2 - x1 + 1;
  z = y*10;
  c = z % 10;
  d = c/10.0
  cout << x1 + d << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:13: error: expected ';' before 'cout'
   13 |   d = c/10.0
      |             ^
      |             ;
   14 |   cout << x1 + d << endl;
      |   ~~~~
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:11:18: error: invalid operands of types 'double' and 'double' to binary 'operator%'
   11 |   cout << x1 + y % 1.0 << endl;
      |                ~ ^ ~~~
      |                |   |
      |                |   double
      |                double
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:11:18: error: invalid operands of types 'double' and 'int' to binary 'operator%'
   11 |   cout << x1 + y % 1 << endl;
      |                ~ ^ ~
      |                |   |
      |                |   int
      |                double
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:11:18: error: invalid operands of types 'double' and 'int' to binary 'operator%'
   11 |   cout << x2 + y % 1 << endl;
      |                ~ ^ ~
      |                |   |
      |                |   int
      |                double
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:10:16: error: invalid operands of types 'double' and 'int' to binary 'operator%'
   10 |   y = (x2-x1+1)%1;
      |       ~~~~~~~~~^~
      |             |   |
      |             |   int
      |             double
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:6:11: error: lvalue required as left operand of assignment
    6 |   if((a+b)%2=0){
      |      ~~~~~^~
Language: C++

#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int main()
{
  ll a,b;
  cin>>a>>b;
  cout<<ceil(((a+b)*1.0)/2.0))<<endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:8:30: error: expected ';' before ')' token
    8 |   cout<<ceil(((a+b)*1.0)/2.0))<<endl;
      |                              ^
      |                              ;
Language: C++

#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int main()
{
  ll a,b;
  cin>>a>>b;
  cout<<ceil((a+b)*1.0)/2.0)<<endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:8:28: error: expected ';' before ')' token
    8 |   cout<<ceil((a+b)*1.0)/2.0)<<endl;
      |                            ^
      |                            ;
Language: C++

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:11:21: error: 'x' was not declared in this scope
   11 |         double ceil(x) = (a+b)/2;
      |                     ^
Language: C++

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:11:29: warning: declaration of 'double ceil(double)' has 'extern' and is initialized
   11 |         double ceil(double x) = (a+b)/2;
      |                             ^
a.cc:11:34: error: invalid pure specifier (only '= 0' is allowed) before 'a'
   11 |         double ceil(double x) = (a+b)/2;
      |                                  ^
a.cc:11:16: error: function 'double ceil(double)' is initialized like a variable
   11 |         double ceil(double x) = (a+b)/2;
      |                ^~~~
a.cc:13:17: error: 'x' was not declared in this scope
   13 |         cout << x << endl;
      |                 ^
Language: C++

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

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

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

#include <iostream>
using namespace std;

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

Compiler output:
a.cc: In function 'int main()':
a.cc:11:17: error: 'ceil' was not declared in this scope
   11 |         cout << ceil(x) << endl;
      |                 ^~~~
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 avg = (a + b)/2
      	if ((a+b) %2 == 0){
          System.out.println(avg);
        } else{
          System.out.println(avg+ 1);
        }
	}
}

Compiler output:
Main.java:10: error: ';' expected
      	int avg = (a + b)/2
      	                   ^
1 error
Language: C++

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


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


Compiler output:
a.cc: In function 'int main()':
a.cc:9:12: error: invalid operands of types 'double' and 'int' to binary 'operator%'
    9 | cout<<x/2+x%2;
      |           ~^~
      |           | |
      |           | int
      |           double
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:7:21: error: extended character 　 is not valid in an identifier
    7 |   cout << (a + b) / 2　<< endl;
      |                     ^
a.cc: In function 'int main()':
a.cc:7:21: error: unable to find numeric literal operator 'operator""\U00003000'
    7 |   cout << (a + b) / 2　<< endl;
      |                     ^~~
Language: C++

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

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

Compiler output:
a.cc:2:10: error: #include expects "FILENAME" or <FILENAME>
    2 | #include
      |          ^
Language: C

#include<stdio.h>
int main()
  {
  int a,b;
  float x;
  scanf("%d %d",&a,&b);
  x=(floafloatt)(a+b)/2;
  printf("%d\n",ceil(x));
  return 0;
  }

Compiler output:
main.c: In function 'main':
main.c:7:6: error: 'floafloatt' undeclared (first use in this function)
    7 |   x=(floafloatt)(a+b)/2;
      |      ^~~~~~~~~~
main.c:7:6: note: each undeclared identifier is reported only once for each function it appears in
main.c:8:17: error: implicit declaration of function 'ceil' [-Wimplicit-function-declaration]
    8 |   printf("%d\n",ceil(x));
      |                 ^~~~
main.c:2:1: note: include '<math.h>' or provide a declaration of 'ceil'
    1 | #include<stdio.h>
  +++ |+#include <math.h>
    2 | int main()
main.c:8:17: warning: incompatible implicit declaration of built-in function 'ceil' [-Wbuiltin-declaration-mismatch]
    8 |   printf("%d\n",ceil(x));
      |                 ^~~~
main.c:8:17: note: include '<math.h>' or provide a declaration of 'ceil'
Language: C++

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:3:3: error: 'inta' was not declared in this scope; did you mean 'int'?
    3 |   inta,b;cin>>a>>b;cout<<(a + b)/2+(a + b)%2<<endl;}
      |   ^~~~
      |   int
a.cc:3:8: error: 'b' was not declared in this scope
    3 |   inta,b;cin>>a>>b;cout<<(a + b)/2+(a + b)%2<<endl;}
      |        ^
a.cc:3:15: error: 'a' was not declared in this scope
    3 |   inta,b;cin>>a>>b;cout<<(a + b)/2+(a + b)%2<<endl;}
      |               ^