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

#include<bits/stdc++.h>
#include <math.h>
#include <map>
#include <unordered_map>
using namespace std;
#define rep(i,n) for(ll i=0;i<n;i++)
#define repl(i,l,r) for(ll i=(l);i<(r);i++)
#define per(i,n) for(ll i=n-1;i>=0;i--)
#define lper(i,r,l) for(ll i=r-1;i>=l;i--)
#define fi first
#define se second
#define mp make_pair
#define all(x) (x).begin(),(x).end()
#define CST(x) cout<<fixed<<setprecision(x)
#define pb(s) push_back(s)
#define ci(x) cin >>x
#define co(x) cout<<x<<endl
using ll=long long;
using vl=vector<ll>;
using vvl=vector<vector<ll>>;
using pl=pair<ll,ll>;
const ll MOD=1000000007;
const ll MOD9=998244353;
const long double PI = (acos(-1));
const long double EPS = 0.0000000001;
const int inf=1e9;
const ll INF=4e18;
const ll dy[4]={1,0,-1,0};
const ll dx[4]={0,-1,0,1};
template<class t,class u> void chmax(t&a,u b){if(a<b)a=b;}
template<class t,class u> void chmin(t&a,u b){if(b<a)a=b;}

long long fac(ll a) {
 long long ans=1;
 while(a>1){
 ans*=a;
 ans%=1000000007;
     a--;
    }
    return ans;
     }
ll modinv(ll a,ll m) {
   ll b = m, u = 1, v = 0;
    while (b) {
        ll t = a / b;
        a -= t * b; swap(a, b);
        u -= t * v; swap(u, v);
    }
    u %= m; 
    if (u < 0) u += m;
    return u;
}
struct UnionFind {
    vector<int> par;
    
    UnionFind(int n) : par(n, -1) {}
 
    int root(int x) {
        if (par[x] < 0) return x;
        else return par[x] = root(par[x]);
    }
    
    bool same(int x, int y) {
        return root(x) == root(y);
    }
    
    bool merge(int x, int y) {
        x = root(x); y = root(y);
        if (x == y) return false;
        if (par[x] > par[y]) swap(x, y);
        par[x] += par[y];
        par[y] = x;
        return true;
    }
    
    int size(int x) {
        return -par[root(x)];
    }	
};
int main() {
ll N;
  cin >>N;
  long double a=(long double)N/(long double)2;
  long double b=ceil(a);
  cout<<b<<endl;
}





Compiler output:
a.cc:57:1: error: extended character   is not valid in an identifier
   57 |  
      | ^
a.cc:57:1: error: '\U000000a0' does not name a type
   57 |  
      | ^
a.cc: In member function 'bool UnionFind::same(int, int)':
a.cc:64:16: error: 'root' was not declared in this scope
   64 |         return root(x) == root(y);
      |                ^~~~
a.cc: In member function 'bool UnionFind::merge(int, int)':
a.cc:68:13: error: 'root' was not declared in this scope
   68 |         x = root(x); y = root(y);
      |             ^~~~
a.cc: In member function 'int UnionFind::size(int)':
a.cc:77:21: error: 'root' was not declared in this scope
   77 |         return -par[root(x)];
      |                     ^~~~
Language: C++

clude <bits/stdc++.h>
using namespace std;
int main() { 
int a;
  cin >> a;
if (a % 2) {
	cout << (a / 2) + 1 << "\n";
}  else cout << a /2 << "\n";
return 0;
}

Compiler output:
a.cc:1:1: error: 'clude' does not name a type
    1 | clude <bits/stdc++.h>
      | ^~~~~
a.cc: In function 'int main()':
a.cc:5:3: error: 'cin' was not declared in this scope
    5 |   cin >> a;
      |   ^~~
a.cc:7:9: error: 'cout' was not declared in this scope
    7 |         cout << (a / 2) + 1 << "\n";
      |         ^~~~
a.cc:8:9: error: 'cout' was not declared in this scope
    8 | }  else cout << a /2 << "\n";
      |         ^~~~
Language: C

#include<stdio.h>
#include<conio.h>
int main()
{
  int n;
  scanf("%d",&n);
  if(n%2==0)
  {
    printf("%d",n/2);
  }
  else
  {
    printf("%d",(n+1)/2);
  }
  return 0;
}

Compiler output:
main.c:2:9: fatal error: conio.h: No such file or directory
    2 | #include<conio.h>
      |         ^~~~~~~~~
compilation terminated.
Language: Java

import java.util.Scanner;

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

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

import java.util.*;
public class hello{
	public static void main(String []args){
      Scanner sc=new Scanner(System.in);	
      int n=sc.nextInt();
      if(n%2!=0)
        n=n/2+1;
      else
        n=n/2;
      System.out.println(n);
	}
}


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

#include <stdio.h>

int print_doc(n){
  if(n % 2 == 0) return n / 2;
  else return n / 2 + 1;
}

int main(){
  int a;
  
  scanf("%d", &n);
  
  printf("%d", print_doc(n));
  
  return 0;
}


Compiler output:
main.c: In function 'print_doc':
main.c:3:5: error: type of 'n' defaults to 'int' [-Wimplicit-int]
    3 | int print_doc(n){
      |     ^~~~~~~~~
main.c: In function 'main':
main.c:11:16: error: 'n' undeclared (first use in this function)
   11 |   scanf("%d", &n);
      |                ^
main.c:11:16: note: each undeclared identifier is reported only once for each function it appears in
Language: C++

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


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

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

Compiler output:
a.cc:2:20: error: expected ';' before 'int'
    2 | using namespace std
      |                    ^
      |                    ;
    3 | int main(void){
      | ~~~                 
a.cc: In function 'int main()':
a.cc:4:10: error: expected primary-expression before 'int'
    4 |   cin >> int N;
      |          ^~~
a.cc:5:12: error: 'N' was not declared in this scope
    5 |   cout << (N + 1) / 2 << endl;
      |            ^
Language: C++

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

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

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

#include "stdio.h"

int main(void) {
	int a, b, c;

	scanf_s("%d", &a);

	b = a / 2;
	c = a % 2;
	if (c == 1)b++;

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

	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:6:9: error: implicit declaration of function 'scanf_s'; did you mean 'scanf'? [-Wimplicit-function-declaration]
    6 |         scanf_s("%d", &a);
      |         ^~~~~~~
      |         scanf
Language: C++

#pragma GCC optimize("O3")
#pragma comment(linker, "/stack:200000000")
#pragma GCC optimize("Ofast")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
#include<bits/stdc++.h>
using namespace std;
#define int long long
//#define d  long double
//#define d long double
#define pii pair<int,int>
#define pb push_back
#define N 200003
#define inf (int)1e18
#define haha ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);
i
 
signed main()
{
    haha
    int n;
    cin>>n;
    cout<<(n+1)/2;
  
 
    
    
}

Compiler output:
a.cc:15:1: error: 'i' does not name a type
   15 | i
      | ^
Language: C++

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

int main() {
int N;
cin >> N;
int ans = (N + 1) / 2;
cout << floor(<< ans << ) << endl;
return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:15: error: expected primary-expression before '<<' token
    8 | cout << floor(<< ans << ) << endl;
      |               ^~
a.cc:8:25: error: expected primary-expression before ')' token
    8 | cout << floor(<< ans << ) << endl;
      |                         ^
Language: C++

1 #include <bits/stdc++.h>
2 using namespace std;
3 int main() {
4 int N;
5 cin >> N;
6 int ans = (N + 1) / 2;
7 cout << floor(<< ans << ) << endl;
8 return 0;
9 }

Compiler output:
a.cc:1:3: error: stray '#' in program
    1 | 1 #include <bits/stdc++.h>
      |   ^
a.cc:1:1: error: expected unqualified-id before numeric constant
    1 | 1 #include <bits/stdc++.h>
      | ^
a.cc:3:1: error: expected unqualified-id before numeric constant
    3 | 3 int main() {
      | ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
	int a[3][3];
  	for (int i=0 ; i < 3; i++){
      for(int j = 0; j < 3 ; j++){
        cin >> a[i][j];
      }
    }
  int N;
  cin >> N;
  
  bool b[3][3];
  for(i = 0; i < 3; i++)
    for(j = 0; j < 3; j++)
      b[i][j] = false;
  
  int x;
  int count;
  while(count< N){
    cin >> x;
  for (int i=0 ; i < 3; i++){
      for(int j = 0; j < 3 ; j++){
        if(a[i][j]==x)
          b[i][j] = true;
        else
          b[i][j] = false;
      }
    }
    count++;
  }
  
  string answer = "No";
  for (int i = 0; i < 3; i++){
    if((b[i][0] && b[i][1] && b[i][2]) == true)
    	answer = "Yes";
  }
  
  for (int i = 0; i < 3; i++){
    if((b[0][i] && b[1][i] && b[2][i]) == true )
    	answer = "Yes";
  }
   
  if((b[0][0] && b[1][1] && b[2][2]) == true)
    answer = "Yes";
  
  if((b[0][2] && b[1][1] && b[2][0]) == true)
    answer  = "Yes";
  cout << answer << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:15:7: error: 'i' was not declared in this scope
   15 |   for(i = 0; i < 3; i++)
      |       ^
a.cc:16:9: error: 'j' was not declared in this scope
   16 |     for(j = 0; j < 3; j++)
      |         ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
	int a[3][3];
  	for (int i=0 ; i < 3; i++){
      for(int j = 0; j < 3 ; j++){
        cin >> a[i][j];
      }
    }
  int N;
  cin >> N;
  
  bool b[3][3];
  int x;
  for (int i=0 ; i < 3; i++){
      for(int j = 0; j < 3 ; j++){
        cin >> x;
        if(a[i][j]==x)
          b[i][j] = true;
        else
          b[i][j] = false;
      }
    }
  
  string answer = "No";
  bool  judge = true;
  for (int j = 0; j < 3; j++){
 	for (int i = 0; i<3; i++){
    	judge = (judge == b[i][j])
  	}
    if(judge == true)
      answer = "Yes";
  }
  judge = true;
  
  for (int  j = 0; j < 3; j++){
 	for (int i = 0; i<3; i++){
    	judge = (judge == b[j][i])
  	}
    if(judge == true)
      answer = "Yes";
  }
   
  if(b[0][0] && b[1][1] && b[2][2])
    answer = "Yes";
  
  if(b[0][2] && b[1][1] && b[2][0])
    answer  = "Yes";
  cout << answer << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:30:35: error: expected ';' before '}' token
   30 |         judge = (judge == b[i][j])
      |                                   ^
      |                                   ;
   31 |         }
      |         ~                          
a.cc:39:35: error: expected ';' before '}' token
   39 |         judge = (judge == b[j][i])
      |                                   ^
      |                                   ;
   40 |         }
      |         ~
Language: C++

#include<bits/stdc++.h>
using namespace std;
using ll = long long;
#define VFOR(x,begin,num) for(int x=(begin);x<((begin)+(num));x++)
#define INF__ ((long long)1 << 60)
vector<int> Fr[100010], Bl[100010];int group[100010];int grsize[100010];
void grouping(int gr, int mem);
int main(){
    int N, M, K;
    cin >> N >> M >> K;
    VFOR(i,0,M){
        int a, b; cin >> a >> b;
        Fr[a].push_back(b);
        Fr[b].push_back(a);
    }
    VFOR(i,0,K){
        int a, b; cin >> a >> b;
        Bl[a].push_back(b);
        Bl[b].push_back(a);
    }
    int gr = 1;
    VFOR(i,1,N){
        if(group[i]==0) {group[i]=gr;grsize[gr]++;grouping(gr,i);gr++;}
    }
    VFOR(i,1,N){
        int ans = grsize[group[i]] - 1;
        for(auto j : Bl[i]){
            if(group[i]==group[j]) ans--;
        }
        ans -= Fr[i].size();
        printf("%d ",ans)//cout << ans << " ";
    }
    cout << endl;
    //VFOR(i,1,N) cout << grouping[i] << " ";
    return 0;
}
void grouping(int gr, int mem){
    for(auto x : Fr[mem]){
        if(group[x]==0) {group[x] = gr;grsize[gr]++;grouping(gr,x);}
    }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:31:26: error: expected ';' before '}' token
   31 |         printf("%d ",ans)//cout << ans << " ";
      |                          ^
      |                          ;
   32 |     }
      |     ~
Language: Java

import java.io.*;
import java.util.Scanner;

public class Main {
  
  public static void main(String[] args){
    
    try {
      
      //標準入力受け取り
      Scanner scan = new Scanner(System.in);
      int page = Integer.parseInt(scan.next());
      
      //用紙算出
      int paper = page/2;
      
      if (page % 2 <> 0) {
        paper = page/2 + 1;
      } 
      
      System.out.println(paper);
      
    } catch (Exception e) {
      
      System.out.println("error");

    }
  }
}


Compiler output:
Main.java:17: error: illegal start of expression
      if (page % 2 <> 0) {
                    ^
1 error
Language: Java

import java.io.*;
import java.util.Scanner;

public class Main {
  
  public static void main(String[] args){
    
    try {
      //ローカル変数定義
      int page;		//書類のページ
      int paper;	//用紙
      
      //標準入力受け取り
      Scanner scan = new Scanner(System.in);
      String  N    = scan.next();
      
      page = Integer.parseInt(N);
      
      //用紙算出
      if (page%2 = 0) {
        paper = page/2;
      } else {
        paper = page/2 + 1;
      }
      
      System.out.println(paper);
      
    } catch (Exception e) {
      
      System.out.println("error");

    }
  }
}


Compiler output:
Main.java:20: error: unexpected type
      if (page%2 = 0) {
              ^
  required: variable
  found:    value
1 error
Language: C++

#include<bits/stdc++.h>
using namespace std;
#define rep(i,n) repi(i,0,n)
#define rrepi(i,a,b) for(int i=int(a);i>int(b);--i)
#define ALL(x) (x).begin(),(x).end()

int n, m;
string s;

void main() {
	char s;
	cin >> n >> m;
	string ans = "0";
	rep(i, n - 1)ans += "0";
	vector<bool> f(n, false);
	rep(i, m) {
		cin >> k >> s;
		k--;
		if (f[k] == 0) {
			ans[k] = s;
			f[k] = 1;
		}
		else {
			if (ans[k] == s)continue;
			else {
				cout << -1;
				return;
			}
		}
	}

	if (n > 1 && f[0] == true && ans[0] == '0') {
		ans = "-1";
		cout << ans;
		return;
	}
	else if (n > 1 && f[0] == false && ans[0] == '0')ans[0] = '1';
	cout << stoi(ans);
}



Compiler output:
a.cc:10:1: error: '::main' must return 'int'
   10 | void main() {
      | ^~~~
a.cc: In function 'int main()':
a.cc:14:13: error: 'i' was not declared in this scope
   14 |         rep(i, n - 1)ans += "0";
      |             ^
a.cc:3:23: note: in definition of macro 'rep'
    3 | #define rep(i,n) repi(i,0,n)
      |                       ^
a.cc:3:18: error: 'repi' was not declared in this scope; did you mean 'rep'?
    3 | #define rep(i,n) repi(i,0,n)
      |                  ^~~~
a.cc:14:9: note: in expansion of macro 'rep'
   14 |         rep(i, n - 1)ans += "0";
      |         ^~~
a.cc:35:17: error: return-statement with no value, in function returning 'int' [-fpermissive]
   35 |                 return;
      |                 ^~~~~~
Language: C++

include<iostream>
using namespace std;
int main(){
  int N;
  cin >> N;
  if(N%2==1) N += 1;
  cout << N/2 << endl;
  return 0;
}

Compiler output:
a.cc:1:1: error: 'include' does not name a type
    1 | include<iostream>
      | ^~~~~~~
a.cc: In function 'int main()':
a.cc:5:3: error: 'cin' was not declared in this scope
    5 |   cin >> N;
      |   ^~~
a.cc:7:3: error: 'cout' was not declared in this scope
    7 |   cout << N/2 << endl;
      |   ^~~~
a.cc:7:18: error: 'endl' was not declared in this scope
    7 |   cout << N/2 << endl;
      |                  ^~~~
Language: Java

Scanner scan = new Scanner(System.in);
		int N = scan.nextInt();
		if (N == 1) {
			System.out.println(1);
		} else {
			double answer = Math.ceil(N / 2);
			System.out.println((int) answer);
		}

Compiler output:
Main.java:1: error: unnamed classes are a preview feature and are disabled by default.
Scanner scan = new Scanner(System.in);
^
  (use --enable-preview to enable unnamed classes)
Main.java:3: error: class, interface, enum, or record expected
		if (N == 1) {
		^
Main.java:5: error: class, interface, enum, or record expected
		} else {
		^
Main.java:7: error: class, interface, enum, or record expected
			System.out.println((int) answer);
			^
Main.java:8: error: class, interface, enum, or record expected
		}
		^
5 errors
Language: Java

import java.util.Scanner;
 
class Test {
  public static void main(String args[]) {
    Scanner scanner = new Scanner(System.in);
    int i =scan.nextInt();
    int j = (i/2)+(i%2);
    System.out.println(j);
    scanner.close();
  }
}

Compiler output:
Main.java:6: error: cannot find symbol
    int i =scan.nextInt();
           ^
  symbol:   variable scan
  location: class Test
1 error
Language: Java

import java.util.Scanner;
 
class Test {
  public static void main(String args[]) {
    Scanner scanner = new Scanner(System.in);
    int i = Integer.parseInt(scanner);
    int j = (i/2)+(i%2);
    System.out.println(j);
    scanner.close();
  }
}

Compiler output:
Main.java:6: error: incompatible types: Scanner cannot be converted to String
    int i = Integer.parseInt(scanner);
                             ^
Note: Some messages have been simplified; recompile with -Xdiags:verbose to get full output
1 error
Language: Java

import java.util.Scanner;
 
class Test {
  public static void main(String args[]) {
    Scanner scanner = new Scanner(System.in);
    int i = Integer.parseInt(scanner);
    int j = (i/2)+(i%2)
    System.out.println(j);
    scanner.close();
  }
}

Compiler output:
Main.java:7: error: ';' expected
    int j = (i/2)+(i%2)
                       ^
1 error
Language: C

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

int		main(void)
{
	int		n;

	cin >> n;
	if (n % 2)
		cout << n / 2 + 1;
	else
		cout << n / 2;
}


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

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

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

#include<iostream>

using namespace std;

int main(){
	int N;
  	cin >> N;
  	int m = n % 2 == 0?N /2:N/2 + 1;
  	cout << m;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:17: error: 'n' was not declared in this scope
    8 |         int m = n % 2 == 0?N /2:N/2 + 1;
      |                 ^
Language: C++

#include<iostream>
#include<cstdio>
int main(){
  int N;
  cin>>N;
  cout<<N/2+N%2<<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>>N;
      |   ^~~
      |   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<<N/2+N%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<<N/2+N%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: C++

#include <bits/stdc++.h>
ussing namespace std;
int main(){
  int n;scanf("%d",&n);
  printf("%d\n",(n&1)?n/2+1:n/2);
  return 0;
}

Compiler output:
a.cc:2:1: error: 'ussing' does not name a type
    2 | ussing namespace std;
      | ^~~~~~
Language: C++

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

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


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

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

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

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

if(N%2 == 0){
	System.out.Println(N/2);
}
else{
	System.out.println(math.floor(N/2));
}

Compiler output:
Main.java:1: error: class, interface, enum, or record expected
if(N%2 == 0){
^
Main.java:3: error: class, interface, enum, or record expected
}
^
Main.java:6: error: class, interface, enum, or record expected
}
^
3 errors
Language: C++

#include "iostream"
using namespace std;
int main()
{
  long long int n;
  cin>>n;
  cout<<ceil(n/2)<<endl;
}

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

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

int main(){
	int n;
  cin>>n;
  cout<<((n/2)+(n%2))<<endl;
  return 0;
}

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

#include <iostream>
using namespace std;

int main(){
    int n;
    cin >> n;5
    if (n % 2 == 0){
        cout << n/2;
    }else{
        cout << n/2 + 1;
    }

}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:15: error: expected ';' before 'if'
    6 |     cin >> n;5
      |               ^
      |               ;
    7 |     if (n % 2 == 0){
      |     ~~         
a.cc:9:6: error: 'else' without a previous 'if'
    9 |     }else{
      |      ^~~~
Language: C++

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

int main(){
	int n;
  	cin>>n;
  	cout<<n/2;
}

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


package javaapplication30;

import java.util.Scanner;

public class JavaApplication30 {

    public static void main(String[] args) {
        Scanner sc=new Scanner(System.in);   
        int n=sc.nextInt();
        if(n%2!=0)
            n=n/2+1;
        else 
            n=n/2;
        System.out.println(n);
    }
    
}


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


package javaapplication30;

import java.util.Scanner;

public class JavaApplication30 {

    public static void main(String[] args) {
        Scanner sc=new Scanner(System.in);   
        int n=sc.nextInt();
        n=n/2+1;
        System.out.println(n);
    }
    
}


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

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

Compiler output:
main.c: In function 'main':
main.c:5:9: error: expected declaration specifiers or '...' before string constant
    5 |   scanf("%d",&n);
      |         ^~~~
main.c:5:14: error: expected declaration specifiers or '...' before '&' token
    5 |   scanf("%d",&n);
      |              ^
main.c:11:5: error: implicit declaration of function 'printF'; did you mean 'printf'? [-Wimplicit-function-declaration]
   11 |     printF("%d",(n+1)/2);
      |     ^~~~~~
      |     printf
Language: C++

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


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

#include <iostream>
using namespace std;


int main()
{
    double num;
    cin >> num;

    double a;
    a = ceil(num / 2);


    cout << a << endl;
    return 0;

}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:9: error: 'ceil' was not declared in this scope
   11 |     a = ceil(num / 2);
      |         ^~~~
Language: C

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

int main(void){
    
    int i,j,k,N,M,temp;
    scanf("%d %d",&N,&M);
    if(M == 0){
        if(N==1){
        printf("%d",0);
        exit(0);
        }
        else if(N==2){
            print("%d",10);
            exit(0);
        }
        else {
            printf("%d",100);
            exit(0);
        }
    }
    int sarr[M],carr[M],ans[N];
    for(i=0 ;i<M ;i++){
        scanf("%d %d",&sarr[i],&carr[i]);
    }
    for(i=0 ;i<M ; i++){
        if((sarr[i]==1 && carr[i]==0) && N !=1) {
            printf("%d",-1);
            exit(0);
        }
    }
    for(i=0 ;i<M ; i++){
        for(j=i+1 ; j<M ;j++){
                if(sarr[i] == sarr[j]){
                    if(carr[i] != carr[j]) {
                        printf("%d",-1);
                        exit(0);
                    }
                }
        }
    }
    for(j=1;j<N+1;j++){
        for(i=0 ;i<M ; i++){
            if(sarr[i]==j){
                ans[j-1]= carr[i];
                break;
            }
            else{
                if(i == M-1){
                    if(j == 1){
                        if(N == 1){
                            ans[j-1] =0;
                        }
                        else{
                            ans[j-1] =1;
                        }
                    }
                    else{
                        ans[j-1] =0;
                    }
                }
            }
        }
    }
    temp =0;
    for(i=0;i<N;i++){
        k=1;
        for(j=0; j<N-i-1;j++){
            k *= 10;
        }
        temp += ans[i] * k;
    }
    printf("%d",temp); 
    return 0;   
}



Compiler output:
main.c: In function 'main':
main.c:14:13: error: implicit declaration of function 'print'; did you mean 'printf'? [-Wimplicit-function-declaration]
   14 |             print("%d",10);
      |             ^~~~~
      |             printf
Language: C++

#include <iostream>

using namespace std;

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

Compiler output:
a.cc: In function 'int main()':
a.cc:11:16: error: expected ';' before '{' token
   11 |    else(n%2==1){
      |                ^
      |                ;
Language: C++

#include <iostream>

using namespace std;

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

Compiler output:
a.cc: In function 'int main()':
a.cc:11:16: error: expected ';' before '{' token
   11 |    else(n%2==1){
      |                ^
      |                ;
Language: C++

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

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<stdio.h>

int main() {
	int N;
	scanf_s("%d", &N);
	if (N % 2)printf("%d", N / 2 + 1);
	else printf("%d", N / 2);
}

Compiler output:
main.c: In function 'main':
main.c:5:9: error: implicit declaration of function 'scanf_s'; did you mean 'scanf'? [-Wimplicit-function-declaration]
    5 |         scanf_s("%d", &N);
      |         ^~~~~~~
      |         scanf
Language: C++

#include<stdio.h>
using namespace std;
int main(){
  int n;
  cin>>n;
  int ans=n/2;
  if(n&1)
    ans+=1;
  cout<<ans<<endl;}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:3: error: 'cin' was not declared in this scope
    5 |   cin>>n;
      |   ^~~
a.cc:2:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
    1 | #include<stdio.h>
  +++ |+#include <iostream>
    2 | using namespace std;
a.cc:9:3: error: 'cout' was not declared in this scope
    9 |   cout<<ans<<endl;}
      |   ^~~~
a.cc:9:3: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:9:14: error: 'endl' was not declared in this scope
    9 |   cout<<ans<<endl;}
      |              ^~~~
a.cc:2:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
    1 | #include<stdio.h>
  +++ |+#include <ostream>
    2 | using namespace std;
Language: C++

{
    "workbench.startupEditor": "newUntitledFile",
    "code-runner.runInTerminal": true,
    "code-runner.saveFileBeforeRun": true,
    "window.zoomLevel": 0,
    "code-runner.executorMap": {
        "javascript": "node",
        "java": "cd $dir && javac $fileName && java $fileNameWithoutExt",
        "c": "cd $dir && gcc $fileName -o $fileNameWithoutExt && $dir$fileNameWithoutExt",
        "cpp": "cd $dir && /usr/local/Cellar/gcc/8.2.0/bin/g++-8 -D_GLIBCXX_DEBUG $fileName && ./a.out",
        "objective-c": "cd $    dir && gcc -framework Cocoa $fileName -o $fileNameWithoutExt && $dir$fileNameWithoutExt",
        "php": "php",
        "python": "python -u",
        "perl": "perl",
        "perl6": "perl6",
        "ruby": "ruby",
        "go": "go run",
        "lua": "lua",
        "groovy": "groovy",
        "powershell": "powershell -ExecutionPolicy ByPass -File",
        "bat": "cmd /c",
        "shellscript": "bash",
        "fsharp": "fsi",
        "csharp": "scriptcs",
        "vbscript": "cscript //Nologo",
        "typescript": "ts-node",
        "coffeescript": "coffee",
        "scala": "scala",
        "swift": "swift",
        "julia": "julia",
        "crystal": "crystal",
        "ocaml": "ocaml",
        "r": "Rscript",
        "applescript": "osascript",
        "clojure": "lein exec",
        "haxe": "haxe --cwd $dirWithoutTrailingSlash --run $fileNameWithoutExt",
        "rust": "cd $dir && rustc $fileName && $dir$fileNameWithoutExt",
        "racket": "racket",
        "ahk": "autohotkey",
        "autoit": "autoit3",
        "dart": "dart",
        "pascal": "cd $dir && fpc $fileName && $dir$fileNameWithoutExt",
        "d": "cd $dir && dmd $fileName && $dir$fileNameWithoutExt",
        "haskell": "runhaskell",
        "nim": "nim compile --verbosity:0 --hints:off --run"
    }
}

Compiler output:
a.cc:1:1: error: expected unqualified-id before '{' token
    1 | {
      | ^
Language: C

#include<stdio.h>

int main (void)
{
  int N;
  printf("全何ページですか？");
  scanf("%d"&N);
   if(N % 2 == 0)
   {
     printf("必要紙面数　%d",N/2);
     else{
       printf("必要紙面数　%d",(N/2)+1);
     }
   }
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:7:13: error: invalid operands to binary & (have 'char *' and 'int')
    7 |   scanf("%d"&N);
      |         ~~~~^
      |         |
      |         char *
main.c:11:6: error: expected '}' before 'else'
   11 |      else{
      |      ^~~~
main.c: At top level:
main.c:15:3: error: expected identifier or '(' before 'return'
   15 |   return 0;
      |   ^~~~~~
main.c:16:1: error: expected identifier or '(' before '}' token
   16 | }
      | ^
Language: C++

object Main extends App {
    var a = readInt
    if (a % 2 == 0){
        println((a/2).toInt)
    } else {
        println((a/2).toInt + 1)
    }
}

Compiler output:
a.cc:1:1: error: 'object' does not name a type
    1 | object Main extends App {
      | ^~~~~~
Language: C++

#include <iostream>
using namespace std;
int main() {
 int n;
  cin >> n;
  
 
  

Compiler output:
a.cc: In function 'int main()':
a.cc:5:12: error: expected '}' at end of input
    5 |   cin >> n;
      |            ^
a.cc:3:12: note: to match this '{'
    3 | int main() {
      |            ^
Language: Java

import java.util.Scanner;
public class main{
  public static void main(String[]args){
    Scanner scan = new Scanner(System.in);
    int n = scan.nextInt();
    if(n % 2 == 1){
      System.out.println( n / 2 + 1);
    }else{
      System.out.println( n / 2);
    }
  }
}

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

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

int main() {
  int N;
  cin >> N;
  cout << (N+1)2 << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:7:16: error: expected ';' before numeric constant
    7 |   cout << (N+1)2 << endl;
      |                ^
      |                ;
Language: C++

#include <iostream>
#include <algorithm>
#include <cstring>
#include <cstdio>
#include <vector>
#include <stack>
#include <cmath>
#include <map>
#include <set>
#define inf 0x3f3f3f3f
extern "C"{void *__dso_handle=0;}
using namespace std;
typedef long long ll;
const int maxn=1005;
vector<int> g[maxn];
int d[maxn];
set <int> s;
void del(int u)
{
	for(int i=0;i<g[u].size();i++)
	{
		d[g[u][i]]--;
		if(d[g[u][i]]==1) 
		{
			s.insert(g[u][i]);
//			cout << i << endl;
			cout.flush();
		}
	}
}

void print(int ans)
{
	cout << "! " << ans << endl;
	cout.flush();
}
int main() 
{
	int n;
	cin >> n;
	cout << ceil(n*1.0/2);
}

Compiler output:
/usr/bin/ld: /tmp/ccrkTAUG.o:(.bss+0x0): multiple definition of `__dso_handle'; /usr/lib/gcc/x86_64-linux-gnu/14/crtbeginS.o:(.data.rel.local+0x0): first defined here
collect2: error: ld returned 1 exit status
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main()
{
  	int n;
  cin >> n;
  cout << ceil(n/2.0) << endl
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:7:30: error: expected ';' before 'return'
    7 |   cout << ceil(n/2.0) << endl
      |                              ^
      |                              ;
    8 |         return 0;
      |         ~~~~~~
Language: C++

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

int main() {
  int N;
  cin >> N;

  // パターン1
  if (N % 2 == 0) {
    cout << N / 2 << endl;
  }

  // パターン2
  else (N % 2 == 1) {
    cout << (N + 1) / 2 << endl;
  }

}


Compiler output:
a.cc: In function 'int main()':
a.cc:14:20: error: expected ';' before '{' token
   14 |   else (N % 2 == 1) {
      |                    ^~
      |                    ;
Language: Java

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

Compiler output:
Main.java:1: error: illegal '.'
import java..util.Scanner;
            ^
1 error
Language: Java

import java.util.Scanner;

public class Printing {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int ans = (n+1)/2;
        System.out.println(ans);
    }
}


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

#include<iostream>
#include<vector>
#include<queue>
#include<cstring>
#include<algorithm>
#define rep(i,a,b) for(int i=a;i<b;i++)

using namespace std;

int main(){
	//freopen("readme.txt","r",stdin);
	ios_base::sync_with_stdio(false);
	cin.tie(0);
	int n;
	cin >> n;
	if(n%2 ==) cout << n/2 << '\n';
	else cout << n/2 +1 << '\n';
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:16:18: error: expected primary-expression before ')' token
   16 |         if(n%2 ==) cout << n/2 << '\n';
      |                  ^
Language: C++

#include<iostream>
using namespace std;
int main()
{
  int N;
  cin >> N;
  
  int P;
  P = (N / 2) + (N % 2)

  // 出力
  cout << N << endl;
 
  return 0;
}

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

package main

import (
    "fmt"
)

func main() {
    var a int
    fmt.Scan(&a)
    if a % 2 == 1 {
		fmt.Println(a / 2 + 1)     
    }else{
    	fmt.Println(a / 2)
    }
}

Compiler output:
a.cc:1:1: error: 'package' does not name a type
    1 | package main
      | ^~~~~~~
Language: C++

using System;

class Program
{
    static void Main()
    {
        String[] arr = Console.ReadLine().Split();
        double A = double.Parse(arr[0]);
        Console.WriteLine(Math.Ceiling(A));
    }
}

Compiler output:
a.cc:1:7: error: expected nested-name-specifier before 'System'
    1 | using System;
      |       ^~~~~~
a.cc:11:2: error: expected ';' after class definition
   11 | }
      |  ^
      |  ;
a.cc: In static member function 'static void Program::Main()':
a.cc:7:9: error: 'String' was not declared in this scope
    7 |         String[] arr = Console.ReadLine().Split();
      |         ^~~~~~
a.cc:7:16: error: expected primary-expression before ']' token
    7 |         String[] arr = Console.ReadLine().Split();
      |                ^
a.cc:8:20: error: expected primary-expression before 'double'
    8 |         double A = double.Parse(arr[0]);
      |                    ^~~~~~
a.cc:9:9: error: 'Console' was not declared in this scope
    9 |         Console.WriteLine(Math.Ceiling(A));
      |         ^~~~~~~
a.cc:9:27: error: 'Math' was not declared in this scope
    9 |         Console.WriteLine(Math.Ceiling(A));
      |                           ^~~~
Language: Java

import java.util.*;
import java.io.*;
class Main {
 public static void main(String[] args) {
  BufferReader buffer = new BufferReader(new InputStreamReader(System.in));
  String line = buffer.readLine();
   int n = Integer.valueOf(line);
   int result = n % 2 == 0 ? n/2 : (n/2 + 1);
   System.out.println(result);
 }
}

Compiler output:
Main.java:5: error: cannot find symbol
  BufferReader buffer = new BufferReader(new InputStreamReader(System.in));
  ^
  symbol:   class BufferReader
  location: class Main
Main.java:5: error: cannot find symbol
  BufferReader buffer = new BufferReader(new InputStreamReader(System.in));
                            ^
  symbol:   class BufferReader
  location: class Main
2 errors
Language: C++

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

int main()｛
int N;
cin >>N;
int n=N%2;
cout<<N/2+n<<endl;
｝


Compiler output:
a.cc:4:11: error: expected initializer before '\U0000ff5b'
    4 | int main()｛
      |           ^~
a.cc:6:1: error: 'cin' does not name a type
    6 | cin >>N;
      | ^~~
a.cc:7:7: error: 'N' was not declared in this scope
    7 | int n=N%2;
      |       ^
a.cc:8:1: error: 'cout' does not name a type
    8 | cout<<N/2+n<<endl;
      | ^~~~
a.cc:9:1: error: '\U0000ff5d' does not name a type
    9 | ｝
      | ^~
Language: C++

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

int main()｛
int N;
cin >>N;
int n=N%2;
cout<<N/2+n<<endl;
｝

Compiler output:
a.cc:1:2: error: extended character 〈 is not valid in an identifier
    1 | #include〈bits/stdc++.h〉
      |  ^
a.cc:1:2: error: invalid preprocessing directive #include\U00003008bits
    1 | #include〈bits/stdc++.h〉
      |  ^~~~~~~~~~~~~
a.cc:1:23: error: extended character 〉 is not valid in an identifier
    1 | #include〈bits/stdc++.h〉
      |                       ^
a.cc:4:11: error: expected initializer before '\U0000ff5b'
    4 | int main()｛
      |           ^~
a.cc:6:1: error: 'cin' does not name a type
    6 | cin >>N;
      | ^~~
a.cc:7:7: error: 'N' was not declared in this scope
    7 | int n=N%2;
      |       ^
a.cc:8:1: error: 'cout' does not name a type
    8 | cout<<N/2+n<<endl;
      | ^~~~
a.cc:9:1: error: '\U0000ff5d' does not name a type
    9 | ｝
      | ^~
Language: Java

import java.util.Scanner;
 
class Main {
 
	public static void main(String[] args) {
		
		Scanner stdIn = new Scanner(System.in);
 
		int A = stdIn.nextInt();

		int B;

		int C;

		B = A / 2 ;
		C = A % 2 ;
		
		if(C==1){
			System.out.println(B=B+1);
		}else{
			System.out.println(B);
		}

}

Compiler output:
Main.java:24: error: reached end of file while parsing
}
 ^
1 error
Language: C++

#include<iostream>
using namespace std;

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

Compiler output:
a.cc: In function 'int main()':
a.cc:7:14: error: expected ';' before numeric constant
    7 |   cout<<(n+1)2<<endl;
      |              ^
      |              ;
Language: C++

#include <iostream>
using namespace std;

int main()
{
	int N;
  	cin >> N;
  	count << (int)N/2 + N%2 << endl;
  	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:9: error: 'count' was not declared in this scope
    8 |         count << (int)N/2 + N%2 << endl;
      |         ^~~~~
Language: C

#include<studio.h>
 
int main(){
	int i=0;
  	
  	scanf("%d",&i);
  if(i%2==0){	
    i=i/2;
  }
  else{
  i=i/2+1;
  }
  printf("%d",i);
  return 0;
}

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

#include<studio.h>

int main(){
	int i=0;
  	
  	scanf("%d",&i);
  if(i%2==0){	
    i=i/2;
  }
  else{
  i=i/2+1;
  }
  printf("%d",i);
  return 0;
}

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

#include<bits/stdc++.h>

using namespace std;

int main(){
  int n;
  cin>>n;
  cout<<(int)ceil(n):
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:8:21: error: expected ';' before ':' token
    8 |   cout<<(int)ceil(n):
      |                     ^
      |                     ;
Language: C++

#include<bits/stdc++.h>

using namespace std;

int main(){
 	cin>>n;
  cout<<(int)ceil(n):
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:6:14: error: 'n' was not declared in this scope; did you mean 'yn'?
    6 |         cin>>n;
      |              ^
      |              yn
Language: C++

#include<bits/std++.h>

using namespace std;

int main(){
 	cin>>n;
  cout<<ceil(n):
  return 0;
}

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

#include<bits/stdc++.h>

using namespace std;

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

Compiler output:
a.cc: In function 'int main()':
a.cc:8:30: error: 'enl' was not declared in this scope; did you mean 'ynl'?
    8 |     if(n%2) cout << n/2+1 << enl;
      |                              ^~~
      |                              ynl
Language: C++

#include <iostream>
using namespace std;

int main()
{
  int N;
  cin >> N;
  int ans = (N + 1) / 2;
  cout << ans << endl;
  return 0
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:11: error: expected ';' before '}' token
   10 |   return 0
      |           ^
      |           ;
   11 | }
      | ~
Language: C++

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

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

    cin >> n;
    cout << (n + 1) / 2 << '\n';
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:12: error: 'n' was not declared in this scope; did you mean 'yn'?
    8 |     cin >> n;
      |            ^
      |            yn
Language: C++

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

int main(){
  int N, M, n[3] = {-1, -1, -1};
  String num = "";
  bool b = true;
  cin >> N >> M;
  
  int s[M], c[M];
  for(int i=0 ; i<M ; i++)
  {
    cin >> s[i] >> c[i];
    s[i]--;
    if(n[s[i]]!=-1){if(n[s[i]]!=c[i]){b=false; break;}}
    n[s[i]] = c[i];
  }
  do{
    if(n[0]==0){if(N!=1){b=false; break;}}
    if(n[1]==0){if(n[0]<0)n[0]=0;}
    if(n[2]==0){if(n[1]<0)n[1]=0;}
    for(int i=0 ; i<3 ; i++){if(n[i]<0)n[i]==0;}
  }while(false)
  for(int i = 0 ; i<N ; i++)num += toString(n[i]);
  cout << (b ? num : -1);
}


Compiler output:
a.cc: In function 'int main()':
a.cc:7:3: error: 'String' was not declared in this scope
    7 |   String num = "";
      |   ^~~~~~
a.cc:24:16: error: expected ';' before 'for'
   24 |   }while(false)
      |                ^
      |                ;
   25 |   for(int i = 0 ; i<N ; i++)num += toString(n[i]);
      |   ~~~           
a.cc:25:29: error: 'num' was not declared in this scope; did you mean 'enum'?
   25 |   for(int i = 0 ; i<N ; i++)num += toString(n[i]);
      |                             ^~~
      |                             enum
a.cc:25:36: error: 'toString' was not declared in this scope
   25 |   for(int i = 0 ; i<N ; i++)num += toString(n[i]);
      |                                    ^~~~~~~~
a.cc:26:16: error: 'num' was not declared in this scope; did you mean 'enum'?
   26 |   cout << (b ? num : -1);
      |                ^~~
      |                enum
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main()

{

int n;
cin>>a;


if(a%2==0)
{
cout<<a/2<<endl;
}
else if(a%2!=0)
{
cout<<(a/2)+1<<endl;
}






}



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

#include <stdio.h>
char *pVal = gets();

int val = 0;
int i = 0;
while(-1 == pVal[i])
{
  val = val * 10 + pVal[i] - '0';
  i++;
}

printf("%d", val);


Compiler output:
main.c:2:14: error: implicit declaration of function 'gets'; did you mean 'fgets'? [-Wimplicit-function-declaration]
    2 | char *pVal = gets();
      |              ^~~~
      |              fgets
main.c:2:14: error: initialization of 'char *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
main.c:2:14: error: initializer element is not constant
main.c:6:1: error: expected identifier or '(' before 'while'
    6 | while(-1 == pVal[i])
      | ^~~~~
main.c:12:8: error: expected declaration specifiers or '...' before string constant
   12 | printf("%d", val);
      |        ^~~~
main.c:12:14: error: expected declaration specifiers or '...' before 'val'
   12 | printf("%d", val);
      |              ^~~
Language: C++

#include <iostream>

int main(){
  	int n;
  	std::cin >> n;
  
  	std::cou << n / 2 + n % 2 << std::endl;
  
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:14: error: 'cou' is not a member of 'std'; did you mean 'cout'?
    7 |         std::cou << n / 2 + n % 2 << std::endl;
      |              ^~~
      |              cout