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

#include<iostream>
using namespce std;

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

Compiler output:
a.cc:2:7: error: expected nested-name-specifier before 'namespce'
    2 | using namespce std;
      |       ^~~~~~~~
a.cc: In function 'int main()':
a.cc:6:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    6 |   cin>>a>>b;
      |   ^~~
      |   std::cin
In file included from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:7:3: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    7 |   cout<<((int)((a+b+0.9)/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:31: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
    7 |   cout<<((int)((a+b+0.9)/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)
      |     ^~~~
Language: Java

package atCoder01;
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();

		double avarage = Math.ceil((a + b)/2);

		System.out.println(avarage);
	}

Compiler output:
Main.java:14: error: reached end of file while parsing
	}
	 ^
1 error
Language: Java

import java.util.*;
import java.io.*;
import java.math.*;
public class Div64{
    public static void main(String[] args) {
        MyScanner sc=new MyScanner();
        long a=sc.nextLong();
        long b=sc.nextLong();
        long c=(long)Math.round((a+b)/2.0);
        System.out.println(c);
    }


    private static class MyScanner {
      BufferedReader br;
      StringTokenizer st;

      public MyScanner() {
         br = new BufferedReader(new InputStreamReader(System.in));
      }

      String next() {
          while (st == null || !st.hasMoreElements()) {
              try {
                  st = new StringTokenizer(br.readLine());
              } catch (IOException e) {
                  e.printStackTrace();
              }
          }
          return st.nextToken();
      }

      int nextInt() {
          return Integer.parseInt(next());
      }

      long nextLong() {
          return Long.parseLong(next());
      }

      double nextDouble() {
          return Double.parseDouble(next());
      }

      String nextLine(){
          String str = "";
	  try {
	     str = br.readLine();
	  } catch (IOException e) {
	     e.printStackTrace();
	  }
	  return str;
      }
   }
}

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

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

int main()
{
	int a, b;
	scanf("%d%d",&a,&b);
	printf("%.0lf\n",ceil(double(a+b)/2));
	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:8:31: error: expected expression before 'double'
    8 |         printf("%.0lf\n",ceil(double(a+b)/2));
      |                               ^~~~~~
Language: C

#include <stdio.h>

int main()
{
	int a, b;
	scanf("%d%d",&a,&b);
	printf("%.0lf\n",ceil(double(a+b)/2));
	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:7:26: error: implicit declaration of function 'ceil' [-Wimplicit-function-declaration]
    7 |         printf("%.0lf\n",ceil(double(a+b)/2));
      |                          ^~~~
main.c:2:1: note: include '<math.h>' or provide a declaration of 'ceil'
    1 | #include <stdio.h>
  +++ |+#include <math.h>
    2 | 
main.c:7:26: warning: incompatible implicit declaration of built-in function 'ceil' [-Wbuiltin-declaration-mismatch]
    7 |         printf("%.0lf\n",ceil(double(a+b)/2));
      |                          ^~~~
main.c:7:26: note: include '<math.h>' or provide a declaration of 'ceil'
main.c:7:31: error: expected expression before 'double'
    7 |         printf("%.0lf\n",ceil(double(a+b)/2));
      |                               ^~~~~~
Language: C

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

Compiler output:
main.c: In function 'main':
main.c:9:11: error: expected expression before 'int'
    9 |         x=int(avr)+1;
      |           ^~~
Language: Java

import java.util.Scanner;

public class Main1 {

	public static void main(String[] args) {
		Scanner stdin=new Scanner(System.in);
		double a=stdin.nextInt();
		double b=stdin.nextInt();
		double x=(a+b)/2;
		int y=(int)(a+b)/2;
		
//		System.out.println(x);
//		System.out.println(y);
		if(x==y)
			System.out.println(y);
		else if(x!=y)
			System.out.println(y+1);
	}

}


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

#include <bits/stc++.h>
using namespace std;
typedef long long lli;

lli a,b;

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

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

#include <cassert>
#include <cctype>
#include <cerrno>
#include <cfloat>
#include <ciso646>
#include <climits>
#include <clocale>
#include <cmath>
#include <csetjmp>
#include <csignal>
#include <cstdarg>
#include <cstddef>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>
/*
//#if __cplusplus >= 201103L
#include <ccomplex>
#include <cfenv>
#include <cinttypes>
#include <cstdbool>
#include <cstdint>
#include <ctgmath>
#include <cwchar>
#include <cwctype>
*/

// C++
#include <algorithm>
#include <bitset>
#include <complex>
#include <deque>
#include <exception>
#include <fstream>
#include <functional>
#include <iomanip>
#include <ios>
#include <iosfwd>
#include <iostream>
#include <istream>
#include <iterator>
#include <limits>
#include <list>
#include <locale>
#include <map>
#include <memory>
#include <new>
#include <numeric>
#include <ostream>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <stdexcept>
#include <streambuf>
#include <string>
#include <typeinfo>
#include <utility>
#include <valarray>
#include <vector>
/*
//#if __cplusplus >= 201103L
#include <array>
#include <chrono>
#include <condition_variable>
#include <forward_list>
#include <future>
#include <initializer_list>
#include <mutex>
#include <random>
#include <ratio>
#include <regex>
#include <scoped_allocator>
#include <system_error>
#include <thread>
#include <tuple>
#include <typeindex>
#include <type_traits>
#include <unordered_map>
#include <unordered_set>
*/
using namespace std;
#define fi first
#define se second
#define repl(i,a,b) for(int i=(int)(a);i<(int)(b);i++)
#define rep(i,n) repl(i,0,n)
#define each(itr,v) for(auto itr:v)
#define pb(s) push_back(s)
#define mmax(x,y) (x>y?x:y)
#define mmin(x,y) (x<y?x:y)
#define maxch(x,y) x=mmax(x,y)
#define minch(x,y) x=mmin(x,y)
#define mp(a,b) make_pair(a,b)
#define all(x) (x).begin(),(x).end()
#define dbg(x) cout<<#x"="<<x<<endl

#define uni(x) x.erase(unique(all(x)),x.end())
template<class T,class U>inline void chmin(T &t,U f){if(t>f)t=f;}
template<class T,class U>inline void chmax(T &t,U f){if(t<f)t=f;}
#define MAX(a, b) ((a) > (b) ? (a) : (b))
#define MIN(a, b) ((a) > (b) ? (b) : (a))

typedef long long ll;
typedef unsigned long long ull;
typedef pair<int, int> P;
typedef pair<P, int> PPI;

#define INF INT_MAX/3
#define MAX_N 1000
#define M_INF 1000000000
int n,m,v,i;
void solve(){
   cin.tie(0);
  ios::sync_with_stdio(false);
  ll ans = 0;
  cin>>n;
  std::map<ll, ll> mp;
  rep(i,n){
    cin>>v;
    mp[v]++;
  }
  for( it = mp.begin(); it != mp.end(); it++){
        if(it -> second >= it -> first) ans += it -> second - it -> first;
        else ans += it -> second;
    }
    cout << ans << endl;


}

int main(){
  solve();
  return 0;
}


Compiler output:
a.cc: In function 'void solve()':
a.cc:123:8: error: 'it' was not declared in this scope; did you mean 'int'?
  123 |   for( it = mp.begin(); it != mp.end(); it++){
      |        ^~
      |        int
Language: C++

# -*- coding: utf-8 -*-
import math
A,B = list(map(int, input().split()))

if (A+B) % 2 == 0:
    print(round((A+B)/2))
else:
    print(round((A+B+1)/2))



Compiler output:
a.cc:1:3: error: invalid preprocessing directive #-
    1 | # -*- coding: utf-8 -*-
      |   ^
a.cc:2:1: error: 'import' does not name a type
    2 | import math
      | ^~~~~~
a.cc:2:1: note: C++20 'import' only available with '-fmodules-ts'
Language: C++

a,b=gets.chomp.split(' ').map{|n| n.to_i}


puts "#{((a+b)/1.0/2).ceil}"


Compiler output:
a.cc:1:1: error: 'a' does not name a type
    1 | a,b=gets.chomp.split(' ').map{|n| n.to_i}
      | ^
a.cc:4:1: error: 'puts' does not name a type
    4 | puts "#{((a+b)/1.0/2).ceil}"
      | ^~~~
Language: C++

#include <cstdio>
#include <cstring>
#include <vector>
using namespace std;

char s[10000];
bool dp(vector<int> v, int aim) {
	bitset<20000> b;
	int center = 10000;
	b[center] = 1;
	for (int i = 0; i < v.size(); i++) b = (b>>v[i])|(b<<v[i]);
	return b[aim+center];
}
int main() {
	int x, y;
scanf("%s%d%d", s, &x, &y);
	//while (scanf("%s%d%d", s, &x, &y))
 {
	//	bitset<16000> b;
		int step = 0;
		int dir = 0;
		vector<int> v[2];
		for (int i = 0; i < strlen(s); i++) {
			if (i == 0) {
				while (s[i] == 'F') i++;
				x -= i;
			}
			if (s[i] == 'T') {
				if (step) v[dir].push_back(step);
				step = 0;
				dir ^= 1; 
			}
			if (s[i] == 'F') step++;
		}	
		if (step) v[dir].push_back(step);
	//	printf("%d\n", x);
	//	for (int i = 0; i < v[0].size(); i++) printf("%d ", v[0][i]);printf("\n");
	//	for (int i = 0; i < v[1].size(); i++) printf("%d ", v[1][i]);printf("\n");
		if (dp(v[0], x) && dp(v[1], y)) printf("Yes"); else printf("No");	
	}
	return 0;
}

Compiler output:
a.cc: In function 'bool dp(std::vector<int>, int)':
a.cc:8:9: error: 'bitset' was not declared in this scope
    8 |         bitset<20000> b;
      |         ^~~~~~
a.cc:4:1: note: 'std::bitset' is defined in header '<bitset>'; this is probably fixable by adding '#include <bitset>'
    3 | #include <vector>
  +++ |+#include <bitset>
    4 | using namespace std;
a.cc:8:23: error: 'b' was not declared in this scope
    8 |         bitset<20000> b;
      |                       ^
Language: C++

#include<iostream>
#include<vector>
#include <unordered_map>  
#include <algorithm>
#include <functional>
#include <map>
#include <string>
#include <sstream>
using namespace std;

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

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

#include <iostream>
int main(){
int a,b;
std::cin >> a >> b;
int C=(a+b)/2
if(C*2>=a+b)
std::cout << (a+b)/2 << std::endl;
else
std::cout << (a+b)/2+1 << std::endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:1: error: expected ',' or ';' before 'if'
    6 | if(C*2>=a+b)
      | ^~
a.cc:8:1: error: 'else' without a previous 'if'
    8 | else
      | ^~~~
Language: C++

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


void main() {
    int a, b;
    scanf("%d %d", &a, &b);

    int x = ceil((a+b)/2);
    printf("%d\n", x);
}



Compiler output:
a.cc:6:1: error: '::main' must return 'int'
    6 | void main() {
      | ^~~~
Language: C

include<stdio.h>

int main(void)
{
	int a,b;
	scanf("%d%d",&a,&b);
	int x = (a+b)/2;    	
	if((a+b)%2 != 0)
		printf("%d\n",x+1);
	else
		printf("%d\n",x);
	return 0;
} 

Compiler output:
main.c:1:8: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token
    1 | include<stdio.h>
      |        ^
Language: C++

#!/usr/bin/env python3
# coding=utf-8

import sys

a, b = sys.stdin.readline().strip().split(" ")
a = int(a)
b = int(b)
print(round((a+b)/2))


Compiler output:
a.cc:1:2: error: invalid preprocessing directive #!
    1 | #!/usr/bin/env python3
      |  ^
a.cc:2:3: error: invalid preprocessing directive #coding
    2 | # coding=utf-8
      |   ^~~~~~
a.cc:4:1: error: 'import' does not name a type
    4 | import sys
      | ^~~~~~
a.cc:4:1: note: C++20 'import' only available with '-fmodules-ts'
Language: C++

#include <iostream>
#include <string>
#include <algorithm>

using namespace std;

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

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

#include <iostream>
#include <string>
#include <algorithm>

using namespace std;

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

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

#include <iostream>
int main(){
double a,b,x=(a+b)/2;
std::cin >> a >> b;
if(x*10%20==0)
std::cout << x << std::endl;
else
std::cout << x+0.5 << std::endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:8: error: invalid operands of types 'double' and 'int' to binary 'operator%'
    5 | if(x*10%20==0)
      |    ~~~~^~~
      |     |   |
      |     |   int
      |     double
Language: C++

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

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

#include<iostream>
#include<cmath>
using namespace std;
int main()
{
	int a,b,x;
	cin>>a>>b;
	x=(a+b)/2.0;
	if(x-(int x)<0.5)cout<<x;
        else cout<<x+1;
return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:15: error: expected primary-expression before 'int'
    9 |         if(x-(int x)<0.5)cout<<x;
      |               ^~~
a.cc:9:15: error: expected ')' before 'int'
    9 |         if(x-(int x)<0.5)cout<<x;
      |              ~^~~
      |               )
a.cc:9:33: error: expected ')' before ';' token
    9 |         if(x-(int x)<0.5)cout<<x;
      |           ~                     ^
      |                                 )
Language: C++

#include <stdio.h>
int main(){
 int a, b;
 scanf(“%d%d”, &a, &b);
 printf(“%d”, (int)(a+b+1)/2);
 return 0;
}

Compiler output:
a.cc:4:8: error: extended character “ is not valid in an identifier
    4 |  scanf(“%d%d”, &a, &b);
      |        ^
a.cc:4:12: error: extended character ” is not valid in an identifier
    4 |  scanf(“%d%d”, &a, &b);
      |            ^
a.cc:5:9: error: extended character “ is not valid in an identifier
    5 |  printf(“%d”, (int)(a+b+1)/2);
      |         ^
a.cc:5:11: error: extended character ” is not valid in an identifier
    5 |  printf(“%d”, (int)(a+b+1)/2);
      |           ^
a.cc: In function 'int main()':
a.cc:4:8: error: '\U0000201c' was not declared in this scope
    4 |  scanf(“%d%d”, &a, &b);
      |        ^
a.cc:4:10: error: 'd' was not declared in this scope
    4 |  scanf(“%d%d”, &a, &b);
      |          ^
a.cc:4:12: error: 'd\U0000201d' was not declared in this scope
    4 |  scanf(“%d%d”, &a, &b);
      |            ^~
Language: C++

#include <iostream>
using namespace std;

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

  Answer = A+B/2;

  if (A+B%2 != 0){
    Answer ++;
  }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:6:13: error: expected ';' before 'Answer'
    6 |   cin >>A>>B
      |             ^
      |             ;
    7 | 
    8 |   Answer = A+B/2;
      |   ~~~~~~
Language: C++

#include <iostream>
#include <string>
#include <algorithm> 
using namespace std;
bool cmp(char a,char b){
 return a>b;
}
int mian()
{
	string s,t;
	cin>>s;
	cin>>t;
	sort(s.begin(),s.end());
	sort(t.begin(),t.end(),cmp);
	if(s<t)
	cout<<"Yes"<<endl;
	else
	cout<<"No"<<endl;
	return 0;
}
 


Compiler output:
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/Scrt1.o: in function `_start':
(.text+0x17): undefined reference to `main'
collect2: error: ld returned 1 exit status
Language: C++

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

return 0;
}


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

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

return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:8:3: error: expected initializer before 'if'
    8 |   if(a%b == 0){
      |   ^~
a.cc:10:5: error: 'else' without a previous 'if'
   10 |   } else{
      |     ^~~~
a.cc:11:5: error: 'ans' was not declared in this scope; did you mean 'abs'?
   11 |     ans = (a+b)/2+1;
      |     ^~~
      |     abs
a.cc:13:11: error: 'ans' was not declared in this scope; did you mean 'abs'?
   13 |   cout << ans;
      |           ^~~
      |           abs
Language: C++

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

return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:7:7: error: invalid operands of types 'double' and 'double' to binary 'operator%'
    7 |   if(a%b == 0){
      |      ~^~
      |      | |
      |      | double
      |      double
a.cc:12:11: error: 'ans' was not declared in this scope; did you mean 'abs'?
   12 |   cout << ans;
      |           ^~~
      |           abs
Language: C++

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

return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:7:5: error: invalid operands of types 'double' and 'double' to binary 'operator%'
    7 | if(a%b == 0){
      |    ~^~
      |    | |
      |    | double
      |    double
a.cc:13:9: error: 'ans' was not declared in this scope; did you mean 'abs'?
   13 | cout << ans:
      |         ^~~
      |         abs
Language: C++

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

int main(){
    string s1, s2;
    cin >> s1;
    cin >> s2;
    sort(s1.begin(), s1.end());
    sort(s2.begin(), s2.end());
    s2.reverse(s2.begin(), s2.end());

    if(s1<s2) cout << "Yes" << endl;
    else cout << "No" << endl;

    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:12:8: error: 'std::string' {aka 'class std::__cxx11::basic_string<char>'} has no member named 'reverse'; did you mean 'reserve'?
   12 |     s2.reverse(s2.begin(), s2.end());
      |        ^~~~~~~
      |        reserve
Language: C++

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

int main(){
    string s1, s2;
    cin >> s1;
    cin >> s2;
    sort(s1.begin(), s1.end());
    sort(s2.begin(), s2.end());
    s2.reverse()

    if(s1<s2) cout << "yes" << endl;
    else cout << "no" << endl;

    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:12:8: error: 'std::string' {aka 'class std::__cxx11::basic_string<char>'} has no member named 'reverse'; did you mean 'reserve'?
   12 |     s2.reverse()
      |        ^~~~~~~
      |        reserve
a.cc:15:5: error: 'else' without a previous 'if'
   15 |     else cout << "no" << endl;
      |     ^~~~
Language: Java

package abc082;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.math.BigDecimal;

public class A {

	public static void main(String[] args) throws IOException {

		BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
//		System.out.println("[Start]");
		String s = new String(in.readLine());
//		System.out.println("input-value:" + s);

		String[] strings = new String[2];
		strings = s.split("\\s+");

		BigDecimal d1 = new BigDecimal(strings[0]);
		BigDecimal d2 = new BigDecimal(strings[1]);

		BigDecimal average = (d1.add(d2).divide(new BigDecimal(2)));
		BigDecimal ans = average.setScale(0, BigDecimal.ROUND_UP);

//		System.out.println(average);
		System.out.println(ans);

	}
}


Compiler output:
Main.java:8: error: class A is public, should be declared in a file named A.java
public class A {
       ^
Note: Main.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
1 error
Language: Java

import java.util.Scanner;
 
public class Main {
  
public static void main(String[] args){
  Scanner in = new Scanner(System.in);
  int x = in.nextInt();
  int y = in.nextInt();
  System.out.println((x + y + 1) / 2;
}
  
}


Compiler output:
Main.java:9: error: ')' or ',' expected
  System.out.println((x + y + 1) / 2;
                                    ^
1 error
Language: Java

import java.util.Scanner;
 
public class Main {
  
public static void main(String[] args){
  Scanner in = new Scanner(System.in);
  int x = in.nextInt();
  int y = in.nextInt();
  System.out.println(floor(average(x, y)));
}
 
private float average(int x, int y){
  return (x+y) / 2;
}
 
private int floor(float z){
  return Math.floor(z);
}
  
}


Compiler output:
Main.java:9: error: non-static method floor(float) cannot be referenced from a static context
  System.out.println(floor(average(x, y)));
                     ^
Main.java:9: error: non-static method average(int,int) cannot be referenced from a static context
  System.out.println(floor(average(x, y)));
                           ^
Main.java:17: error: incompatible types: possible lossy conversion from double to int
  return Math.floor(z);
                   ^
3 errors
Language: Java

import java.util.Scanner;
 
public class Main {
  
public static void main([]String args){
  Scanner in = new Scanner(System.in);
  int x = in.nextInt();
  int y = in.nextInt();
  floor(average(x, y));
}
 
private average(int x, int y){
  return (x+y) / 2;
}
 
private int floor(float z){
  return Math.floor(z);
}
  
}

Compiler output:
Main.java:5: error: illegal start of type
public static void main([]String args){
                        ^
Main.java:5: error: ',', ')', or '[' expected
public static void main([]String args){
                          ^
Main.java:12: error: invalid method declaration; return type required
private average(int x, int y){
        ^
3 errors
Language: Java

public static void main([]String args){
  Scanner in = new Scanner(System.in);
  int x = in.nextInt();
  int y = in.nextInt();
  floor(average(x, y));
}

private average(int x, int y){
  return (x+y) / 2;
}

private int floor(float z){
  return Math.floor(z);
}

Compiler output:
Main.java:1: error: unnamed classes are a preview feature and are disabled by default.
public static void main([]String args){
              ^
  (use --enable-preview to enable unnamed classes)
Main.java:1: error: illegal start of type
public static void main([]String args){
                        ^
Main.java:1: error: ',', ')', or '[' expected
public static void main([]String args){
                          ^
Main.java:8: error: class, interface, enum, or record expected
private average(int x, int y){
        ^
Main.java:10: error: class, interface, enum, or record expected
}
^
Main.java:14: error: class, interface, enum, or record expected
}
^
6 errors
Language: C++

a, b = map(int, raw_input().split())
if (a + b) % 1:
    print str(a + b)
else:
    print str(a + b - 1)

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

#include <iosteam>

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


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

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


















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

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

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

#include <iostream>
#include <vector>
#include <string>
#include <algorithm>

using namespace std;

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

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

	return 0;
}


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

#include <stdlib.h>
#include <stdio.h>

int main()
{
 int a, b;
 scanf("%d", &a);
 scanf("%d", &b);
 printf("%d", (a+b)/2 + ((a+b)%2)==0)? 0 : 1);
}
  

Compiler output:
a.cc: In function 'int main()':
a.cc:9:45: error: expected ';' before ')' token
    9 |  printf("%d", (a+b)/2 + ((a+b)%2)==0)? 0 : 1);
      |                                             ^
      |                                             ;
Language: Java

mport java.util.Scanner;

public class Main {

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

}

Compiler output:
Main.java:1: error: class, interface, enum, or record expected
mport java.util.Scanner;
^
1 error
Language: C

#include <stdio.h>
int main(void){
  int a[10001]={};
  int input;
  int n;
  int ret=0;
  scanf("%d",&n);
  for(i=0;i<n;i++){
    scanf("%d",&input);
    if(input>n)
      ret++;
    else
      a[input]++;
  }
  for(i=0;i<=n;i++){
    if(a[i]-i>0)ret+=a[i]-i;
    else if(a[i]-i<0)ret+=i;
  }
  printf("%d",ret );
}

Compiler output:
main.c: In function 'main':
main.c:8:7: error: 'i' undeclared (first use in this function)
    8 |   for(i=0;i<n;i++){
      |       ^
main.c:8:7: note: each undeclared identifier is reported only once for each function it appears in
Language: C++

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:3:9: error: 'cin' was not declared in this scope
    3 |         cin >> a >> b;
      |         ^~~
a.cc:5:17: error: 'cout' was not declared in this scope
    5 |                 cout << (a + b) / 2 + 1<< endl;
      |                 ^~~~
a.cc:5:43: error: 'endl' was not declared in this scope
    5 |                 cout << (a + b) / 2 + 1<< endl;
      |                                           ^~~~
a.cc:8:17: error: 'cout' was not declared in this scope
    8 |                 cout << (a + b) / 2 << endl;
      |                 ^~~~
a.cc:8:40: error: 'endl' was not declared in this scope
    8 |                 cout << (a + b) / 2 << endl;
      |                                        ^~~~
Language: C++

import math

a, b = (int(i) for i in input().split())

ans = math.ceil((a + b) / 2)
print(ans)


Compiler output:
a.cc:1:1: error: 'import' does not name a type
    1 | import math
      | ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
Language: C

#include <stdio.h>
 
int main(){
  double a,b;
  int rex;
    double x;
  scanf("%lf %lf",&a,&b);
  x = (a + b) / 2;
  rex = x;
  if((double)x - rex >= 0.5)
    rex += 1;
  
  printf("%d\n",rex);
  return 0;
}

Compiler output:
main.c:2:1: error: stray '\302' in program
    2 | <U+00A0>
      | ^~~~~~~~
Language: C++

#include<iostream>
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:17: error: expected ';' before '}' token
    7 |    cout<<(a+b)/2
      |                 ^
      |                 ;
    8 | }
      | ~
Language: C++

# include <iostream>
int main()
{
    cout<<"Yes";
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:4:5: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    4 |     cout<<"Yes";
      |     ^~~~
      |     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
      |                  ^~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main()
{
	int a,b;
	scanf("%d %d",&a,&b);
	printf("%d",(a+=b,(a>>1)+(a&0x1));
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:42: error: expected ')' before ';' token
    7 |         printf("%d",(a+=b,(a>>1)+(a&0x1));
      |               ~                          ^
      |                                          )
Language: C++

#include<cstdio>
#include<Iostream>
using namespace std;

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

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

#include<bits\stdc++.h>

using namespace std;
typedef long long ll;

int main(int argc, char const *argv[])
{
    int a,b;
    scanf("%d%d",&a,&b);
    if((a+b)&1==0){
      printf("%d\n",(a+b)>>1);
    }else{
      printf("%d\n",((a+b)>>1)+1);
    }
}

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

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

int main()
{
	string s, t;
	cin >> s >> t;

	sort(s.begin(), s.end());
	sort(t.begin(), t.end());

	//cout << s << " " << t << endl;

	if (s > t)
		cout << "YES" << endl;
	else
		cout << "NO" << endl;

	return 0;
}


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

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

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

#define _CRT_SECURE_NO_WARNINGS
#include <cstdio>
#include <string>
#include <iostream>
#include <vector>
#include <climits>
#include <algorithm>

using namespace std;

void SolveA()
{
	int a, b;
	scanf("%d %d", &a, &b);

	int x = ceil((a + b) / 2.0);
	printf("%d\n", x);
}

int main()
{
	SolveA();
}

Compiler output:
a.cc: In function 'void SolveA()':
a.cc:16:17: error: 'ceil' was not declared in this scope
   16 |         int x = ceil((a + b) / 2.0);
      |                 ^~~~
Language: C++

// ABC082_A.cpp : コンソール アプリケーションのエントリ ポイントを定義します。
//

#include "stdafx.h"
#include <iostream>
//#include <windows.h>
using namespace std;

int main()
{
	int a,b;
	double average;
	int average_int;
	std::cin >>a >> b; //スペースで区切られたものを別々に入力
//	std::cout << a / b;
	average = double(a+b)/2;
	average_int = int(average);
	if ((average - average_int) != 0)
	{
		std::cout << average_int + 1;
	}
	else {
		std::cout << average_int;
	}

//	Sleep(2000);

	return 0;
}



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

// ABC082_A.cpp : コンソール アプリケーションのエントリ ポイントを定義します。
//

#include "stdafx.h"
#include <iostream>
#include <windows.h>
using namespace std;

int main()
{
	int a,b;
	double average;
	int average_int;
	std::cin >>a >> b; //スペースで区切られたものを別々に入力
//	std::cout << a / b;
	average = double(a+b)/2;
	average_int = int(average);
	if ((average - average_int) != 0)
	{
		std::cout << average_int + 1;
	}
	else {
		std::cout << average_int;
	}

//	Sleep(2000);

	return 0;
}

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

#include <bits/stdc++.h>

using namespace std;

int main()
{
int x,n;
cin>>x>>n;

cout<<round((x+n)/2.0;
}



Compiler output:
a.cc: In function 'int main()':
a.cc:10:22: error: expected ')' before ';' token
   10 | cout<<round((x+n)/2.0;
      |            ~         ^
      |                      )
Language: C

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

void sort_str(char *s){
    int minc;
    int i,j;
    char c;
    char *tmp = s;

    for(i=0;i<strlen(s);i++){
        minc = i;
        for(j=i;j<strlen(&tmp[i]);j++){
            if(tmp[j] < tmp[minc]){
                minc = j;
                continue;
            }
        }
        c = s[i];
        s[i] = s[minc];
        s[minc] = c;
    }
}

int main(){
    char s[100],t[100];
    int i,j,min_len,s_len,t_len;

    scanf("%s %s",s,t);

    sort_str(s);
    sort_str(t);

    s_len = strlen(s);
    t_len = strlen(t);

    min_len = s_len < t_len ? s_len : t_len;

    printf("%s %s\n",s,t);

    i=0;
    j=t_len-1;

    while(i<min_len){
        if(s[i] > t[j]){
            printf("No\n");
            return 0;
        }else if(s[i] == t[j]){
            i++;
            j--;
        }else{
            printf("Yes\n");
            return 0;
        }
    }

    printf("No\n");

    return 0;
}

Compiler output:
main.c:2:10: fatal error: string: No such file or directory
    2 | #include <string>
      |          ^~~~~~~~
compilation terminated.
Language: C++

#include <iostream>
using namespace std

int main(){
int a,b;

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

}

Compiler output:
a.cc:2:20: error: expected ';' before 'int'
    2 | using namespace std
      |                    ^
      |                    ;
    3 | 
    4 | int main(){
      | ~~~
Language: C

#include<stdio.h>
#include<string.h>
int main(void){
 char s[100],t[100],tmp1[100],tmp2[100];
 int N,M,i,j,r,count=0;
 scanf("%s",s);
 scanf("%s",t);
 for(i=0;s[i]!='\0';i++){
  N++;
 }
 for(i=0;t[i]!='\0';i++){
  M++;
 }
 for(i=0;i<N;i++){
  for(j=i+1;j<N;j++){
   if(strcmp(&s[i],&s[j])>0){
    strcpy(&s[i],&s[j]);
    }
  }
 }
 for(i=0;i<M;i++){
  for(j=i+1;j<M;j++){
   if(strcmp(&t[i],&t[j])>0){
    strcpy(&t[i],&t[j]);
    }
  }
 }
 if(N<M){ 
 for(i=0;i<N;i++){
 if(strcmp(&s[i],&t[i])!=0) count++;
 }
 if(count==0) {
printf("Yes");
 return 0;
}
}
 count=0;
 for(i=0;strcmp(&s[i],&t[i])==0;i++){
 count++;
 }
if(strcmp(&s[count+1],&t[count+1])<0){
 printf("Yes");
 return 0;
} 
 printf("No");
}
 return 0;
} 

Compiler output:
main.c:47:2: error: expected identifier or '(' before 'return'
   47 |  return 0;
      |  ^~~~~~
main.c:48:1: error: expected identifier or '(' before '}' token
   48 | }
      | ^
Language: C

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
int fw(const void *a, const void *b)
{
	return *(int*)a - *(int*)b;
}
int bw(const void *a, const void *b)
{
	return *(int*)b - *(int*)a;
}
int main() {
	long int a[100010]
	int n, ans = 0;
	scanf("%d", &n);
	for (int i = 0; i < n; i++)
	{
		scanf("%ld", &a[i]);
	}
	qsort(a, n, sizeof(int), fw);
	for (int i = 0; i < n; i++)
	{
		int x = a[i], j;
		if (a[i + x - 1] == x)
		{
			for (j = 0; a[i + x + j] == x; j++){}
			ans += j;
			i += x + j - 1;
		}
		else
		{
			for (j = 0; a[i + j] == x; j++) {}
			ans += j;
			i += j - 1;
		}
	}
	printf("%d",ans);
	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:13:27: error: expected ';' before 'int'
   13 |         long int a[100010]
      |                           ^
      |                           ;
   14 |         int n, ans = 0;
      |         ~~~                
main.c:18:31: error: 'a' undeclared (first use in this function)
   18 |                 scanf("%ld", &a[i]);
      |                               ^
main.c:18:31: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include <stdio.h>
 
long search(long x, long B[], long n)
{
	long l, h, m;
	l = 1; h = n;
	while (l <= h)
	{
		m = (l + h) / 2;
		if (x == B[m]){
			return m;
		}
		if (x > B[m]) l = m + 1;
		else h = m - 1;
	}
	return -1;
}
 
long count(long A[], long B[],long C[], long n)
{
	long i; long idx = 1; long id;
	for (i = 1; i<=n; i++) { 
		if ((id = search(A[i], B, i)) == -1) { B[idx++] = A[i]; C[idx - 1] += 1; }
		else { C[id] += 1; }
	}
	//printf("Finished!\n");
	return idx;
}
 
/*void print(long a[], long n)
{
	for (long i = 1; i <= n; i++){
		printf("[%d] ", a[i]);
	}
}*/
int main(void)
{
	long N, i, cnt;
	scanf("%ld", &N);
	long a[100001], b[100001] = { 0 }, c[100001] = { 0 };
	for ( i = 1; i <= N; i++){ scanf("%ld", &a[i]); }
	//printf("Start Count\n");
	long idx= count(a, b, c, N);
	//printf("Counted\n");
	//print(a, N);
	//puts("");
	//print(b, idx);
	//puts("");
	//print(c, idx);
	cnt = 0;long x;
	for (i = 1; i <idx; i++){
		if (c[i] > 0){
			if (c[i] > b[i]) { x = c[i] - b[i];  }
			if (c[i] < b[i]) {x = c[i]; }
			if (c[i] == b[i]) { x = 0;  }
			cnt += x;
		}
		else continue;
	}
	printf("%d\n", cnt);
	return 0;
}

Compiler output:
main.c:2:1: error: stray '\302' in program
    2 | <U+00A0>
      | ^~~~~~~~
main.c:18:1: error: stray '\302' in program
   18 | <U+00A0>
      | ^~~~~~~~
main.c:29:1: error: stray '\302' in program
   29 | <U+00A0>
      | ^~~~~~~~
Language: C++

#include <iostream>
#include <cmath>
int main(){
double a,b;
std::cin >> a >> b;
double U = std::double round((a+b)/2)
std::cout  << U <<std::endl;
 
}  

Compiler output:
a.cc: In function 'int main()':
a.cc:6:17: error: expected unqualified-id before 'double'
    6 | double U = std::double round((a+b)/2)
      |                 ^~~~~~
Language: C++

#include <iostream>
#include <cmath>
int main(){
double a,b;
std::cin >> a >> b;
double U = double round((a+b)/2)
std::cout  << U <<std::endl;
 
}  

Compiler output:
a.cc: In function 'int main()':
a.cc:6:12: error: expected primary-expression before 'double'
    6 | double U = double round((a+b)/2)
      |            ^~~~~~
Language: C++

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:10:24: error: 'ceil' is not a member of 'std'
   10 |         x = (int)(std::ceil ((a + b) / 2.0));
      |                        ^~~~
Language: C++

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:10:19: error: 'ceil' was not declared in this scope
   10 |         x = (int)(ceil((a + b) / 2.0));
      |                   ^~~~
Language: C++

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:10:19: error: 'ceil' was not declared in this scope
   10 |         x = (int)(ceil((a + b) / 2.0));
      |                   ^~~~
Language: C++

#include  <iostream>
#include  <math.h>
int main(void){
double a,b;
std::cin >> a >> b;
double U =ceil((a+b)/2)
std::cout  << U <<std::endl;
 
}

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

#include  <iostream>
#include  <math.h>
int main(){
double a,b;
std::cin >> a >> b;
double U =ceil((a+b)/2)
std::cout  << U <<std::endl;
 
}

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

#include  <iostream>
#include  <cmath>
int main(){
double a,b;
std::cin >> a >> b;
double U =ceil((a+b)/2)
std::cout  << U <<std::endl;
 
}

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

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

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

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

int main()
{
	long a, b;
	cin >> a >> b;
	cout << (int)(ceil((a + b)/2.0));
	
	return 0;
}

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

#include<cstdio>
#include<cmath>
#include<algorithm>
#include<iostream>
#include<cstring>
int main()
{
int i,x,y,z,j,n;
char a[100],b[100];

gets(a); 
gets(b);


for(j=0,i=0;j<100;i++,j++)
	{
	  if(a[i]>=b[j])
	  {
	  	 printf("No\n");
	  	 break;
	  }
	  else 
	  	  printf("Yes\n");
	  	  break;
	}
}


Compiler output:
a.cc: In function 'int main()':
a.cc:11:1: error: 'gets' was not declared in this scope; did you mean 'getw'?
   11 | gets(a);
      | ^~~~
      | getw
Language: C++

#include <vector>
#include <string>
#include <math.h>

using namespace std;

int main(){
    cin.tie(0);
    ios::sync_with_stdio(false);

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

    cout << ceil((a + b)/2.0) << '\n';
    
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:5: error: 'cin' was not declared in this scope
    8 |     cin.tie(0);
      |     ^~~
a.cc:4:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
    3 | #include <math.h>
  +++ |+#include <iostream>
    4 | 
a.cc:9:10: error: incomplete type 'std::ios' {aka 'std::basic_ios<char>'} used in nested name specifier
    9 |     ios::sync_with_stdio(false);
      |          ^~~~~~~~~~~~~~~
a.cc:14:5: error: 'cout' was not declared in this scope
   14 |     cout << ceil((a + b)/2.0) << '\n';
      |     ^~~~
a.cc:14:5: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
int n,;
queue<int>que;
cin>>n;
int a;
for(int i=0;i<n;i++){
cin>>a;
que.push(a);
}
sort(que.begin(),que.end);
int count=0;
while(!que.empty()){
int temp=que.begin(),count2=0;
while(!que.empty()){
if(que.begin()!=temp) break;
count2++;
que.pop();
}
if(count2!=temp){
count+=count2;
}
cout<<count<<endl;
return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:4:7: error: expected unqualified-id before ';' token
    4 | int n,;
      |       ^
a.cc:12:10: error: 'class std::queue<int>' has no member named 'begin'
   12 | sort(que.begin(),que.end);
      |          ^~~~~
a.cc:12:22: error: 'class std::queue<int>' has no member named 'end'
   12 | sort(que.begin(),que.end);
      |                      ^~~
a.cc:15:14: error: 'class std::queue<int>' has no member named 'begin'
   15 | int temp=que.begin(),count2=0;
      |              ^~~~~
a.cc:17:8: error: 'class std::queue<int>' has no member named 'begin'
   17 | if(que.begin()!=temp) break;
      |        ^~~~~
a.cc:18:1: error: 'count2' was not declared in this scope; did you mean 'count'?
   18 | count2++;
      | ^~~~~~
      | count
a.cc:21:4: error: 'count2' was not declared in this scope; did you mean 'count'?
   21 | if(count2!=temp){
      |    ^~~~~~
      |    count
a.cc:26:2: error: expected '}' at end of input
   26 | }
      |  ^
a.cc:3:11: note: to match this '{'
    3 | int main(){
      |           ^
Language: C++

#include<iostream>
using namespace std;
int main(){
int n,;
queue<int>que;
cin>>n;
int a;
for(int i=0;i<n;i++){
cin>>a;
que.push(a);
}
sort(que.begin(),que.end);
int count=0;
while(!que.empty()){
int temp=que.begin(),count2=0;
while(!que.empty()){
if(que.begin()!=temp) break;
count2++;
que.pop();
}
if(count2!=temp){
count+=count2;
}
cout<<count<<endl;
return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:4:7: error: expected unqualified-id before ';' token
    4 | int n,;
      |       ^
a.cc:5:1: error: 'queue' was not declared in this scope
    5 | queue<int>que;
      | ^~~~~
a.cc:2:1: note: 'std::queue' is defined in header '<queue>'; this is probably fixable by adding '#include <queue>'
    1 | #include<iostream>
  +++ |+#include <queue>
    2 | using namespace std;
a.cc:5:7: error: expected primary-expression before 'int'
    5 | queue<int>que;
      |       ^~~
a.cc:10:1: error: 'que' was not declared in this scope
   10 | que.push(a);
      | ^~~
a.cc:12:6: error: 'que' was not declared in this scope
   12 | sort(que.begin(),que.end);
      |      ^~~
a.cc:12:1: error: 'sort' was not declared in this scope; did you mean 'short'?
   12 | sort(que.begin(),que.end);
      | ^~~~
      | short
a.cc:18:1: error: 'count2' was not declared in this scope; did you mean 'count'?
   18 | count2++;
      | ^~~~~~
      | count
a.cc:21:4: error: 'count2' was not declared in this scope; did you mean 'count'?
   21 | if(count2!=temp){
      |    ^~~~~~
      |    count
a.cc:26:2: error: expected '}' at end of input
   26 | }
      |  ^
a.cc:3:11: note: to match this '{'
    3 | int main(){
      |           ^
Language: Java

import java.util*;

public class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    int a = sc.nextInt();
    int b = sc.nextInt();
    int c =(a+b)/2;
    if(((float)a+(float)b)/2-c<0.5){
      System.out.println(c);
    }else{
      System.out.println(c+1);
    }
  }
}

Compiler output:
Main.java:1: error: ';' expected
import java.util*;
                ^
1 error
Language: Java

public class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    int a = sc.nextInt();
    int b = sc.nextInt();
    int c =(a+b)/2;
    if(((float)a+(float)b)/2-c<0.5){
      System.out.println(c);
    }else{
      System.out.println(c+1);
    }
  }
}

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
2 errors
Language: C++

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

int main(){
  int a,b;
  scanf("%d%d",&a&b);

  printf("%d",(a+b)/2);
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:18: error: invalid operands of types 'int*' and 'int' to binary 'operator&'
    6 |   scanf("%d%d",&a&b);
      |                ~~^~
      |                |  |
      |                |  int
      |                int*