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

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

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

}

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

#include <iosteram>

using namespace std;

int main() {
    int X, Y;
    cin >> X >> Y;

    cout << X+Y/2 << endl;

    return 0;
}

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

#include <iotream>
using namespace std;

int main(){
	/*input*/
	int x, y;	cin >> x >> y;
	/*output*/
	cout << x + y/2 << endl;
}


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

#include <bits/stdc++.h>
 
using namespace std;
 
typedef long long ll;
typedef unsigned long long ull;
typedef pair<ll, ll> P;
typedef pair<ll, P> PP;
 
static const double EPS = 1e-8;
static const double PI = 4.0 * atan(1.0);
static const ll INF = 1023456789;
 
#define REP(i,n)	for(int i=0;i<n;++i)
#define REPR(i,n)	for(int i=n-1;i>=0;--i)
#define FOR(i,s,n)	for(int i=s;i<n;++i)
#define FORR(i,s,n)	for(int i=n-1;i>=s;--i)
#define ALL(c)		(c).begin(),(c).end()
#define CLEAR(v)	memset(v,0,sizeof(v))
#define MP(a,b)		make_pair((a),(b))
#define ABS(a)		((a)>0?(a):-(a))
#define F			first
#define S			second
 
int main(int argc, char **argv) {
	int x, y;
	cin >> x >> y;
	cout << (x : y / 2) << endl;
	return 0;
}
 

Compiler output:
a.cc: In function 'int main(int, char**)':
a.cc:28:20: error: found ':' in nested-name-specifier, expected '::'
   28 |         cout << (x : y / 2) << endl;
      |                    ^
      |                    ::
a.cc:28:18: error: 'x' is not a class, namespace, or enumeration
   28 |         cout << (x : y / 2) << endl;
      |                  ^
Language: C++

# include < cstdio >
int X , Y ;
int main ()
{
scanf ("% d % d " ,&X ,& Y );
printf ("% d \ n " , X + Y /2);
}

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

#include <bits/stdc++.h>
using namespace std;
int main()
{
    int v[100]
	int n,a;
    int t,h;
    cin>>n>>t>>a;
    for(int i=0;i<n;i++){
        cin>>h;
        v[i]=t-h*0.006;	
	}
	for(int i=0;;i++){
		for(int j=0;j<n;j++){
		    if(v[j]+i==a||v[j]-i==a){
		    	cout<<j+1;
		    	return 0;
			}    
		} 
	}
	
	return 0; 
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:9: error: expected initializer before 'int'
    6 |         int n,a;
      |         ^~~
a.cc:8:10: error: 'n' was not declared in this scope
    8 |     cin>>n>>t>>a;
      |          ^
a.cc:8:16: error: 'a' was not declared in this scope
    8 |     cin>>n>>t>>a;
      |                ^
a.cc:11:9: error: 'v' was not declared in this scope
   11 |         v[i]=t-h*0.006;
      |         ^
a.cc:15:24: error: 'v' was not declared in this scope
   15 |                     if(v[j]+i==a||v[j]-i==a){
      |                        ^
Language: C++

#include <bits/stdc++.h>
#include <iostream>
#include <stdio.h>
#include <algorithm>
#include <vector> 

using namespace std;



int main() {
	int n;
	int t;
	int a;
	vector<int> h;
	
	scanf_s("%d%d%d", &n, &t, &a);
	int u;
	for (int i = 0; i < n; i++) {
		scanf_s("%d", &u);
		h.push_back(u);
	}
	double min= abs(a - t + h[0] * 0.006);
	double v;
	int ans = 0;
	for (int i = 0; i < n; i++) {
		v = abs(a-t + h[i] * 0.006);
		if (min > v) {
			ans = i;
			min = v;
		}
	}
	cout << ans+1  << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:17:9: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'?
   17 |         scanf_s("%d%d%d", &n, &t, &a);
      |         ^~~~~~~
      |         scanf
Language: C++

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

int main() {
  int X,Y;
  cin >> X,Y;
  cout << X白+Y/2 << endl;
}

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

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

int main() {
  int X,Y;
  cin >> X,Y;
  cout << X + Y / 2 << endl;

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

#include<iostream>
using namespace std;
int main (){
int X,Y;
  cin >> X >> Y ;
  cout << X+Y/2 << endl; 

Compiler output:
a.cc: In function 'int main()':
a.cc:6:25: error: expected '}' at end of input
    6 |   cout << X+Y/2 << endl;
      |                         ^
a.cc:3:12: note: to match this '{'
    3 | int main (){
      |            ^
Language: C++

#include <iostream>
 
int main(void) {
  int X, Y;
  cin >> X >> Y;
  int x = X + Y / 2;
  cout << x << 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 >> X >> Y;
      |   ^~~
      |   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 << x << 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:16: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
    7 |   cout << x << 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 <iostream>

int main(void) {
  int X, Y;
  cin >> X >> Y;
  int x = X + Y / 2
  cout << x << 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 >> X >> Y;
      |   ^~~
      |   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: expected ',' or ';' before 'cout'
    7 |   cout << x << endl;
      |   ^~~~
Language: Java

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

Compiler output:
Main.java:4: error: cannot find symbol
    	Scanner sc = new scanner(System.in);
    	                 ^
  symbol:   class scanner
  location: class Main
1 error
Language: C++

#include "stdafx.h"
#include<algorithm>
#include <iostream>
#include<cstdio>
#include<cmath>
#include<iomanip>
#include<string>
using namespace std;
int main() {

	int x, y;
	cin >> x >> y;

	cout << x + y / 2 << endl;


	return 0;
}

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

#i#include <iostream>
#include<string>
#include<vector>

using namespace std;




int main()
{
	
	int x, y;

	cin >> x >> y;

	cout << x + y / 2 << endl;



	return 0;
}



Compiler output:
a.cc:1:2: error: invalid preprocessing directive #i; did you mean #if?
    1 | #i#include <iostream>
      |  ^
      |  if
a.cc: In function 'int main()':
a.cc:15:9: error: 'cin' was not declared in this scope
   15 |         cin >> x >> y;
      |         ^~~
a.cc:4:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
    3 | #include<vector>
  +++ |+#include <iostream>
    4 | 
a.cc:17:9: error: 'cout' was not declared in this scope
   17 |         cout << x + y / 2 << endl;
      |         ^~~~
a.cc:17:9: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:17:30: error: 'endl' was not declared in this scope
   17 |         cout << x + y / 2 << endl;
      |                              ^~~~
a.cc:4:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
    3 | #include<vector>
  +++ |+#include <ostream>
    4 |
Language: Java

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();
    System.out.prinln(a+b/2);
    
    }}


Compiler output:
Main.java:9: error: cannot find symbol
    System.out.prinln(a+b/2);
              ^
  symbol:   method prinln(int)
  location: variable out of type PrintStream
1 error
Language: Java

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();
    system.out.prinln(a+b/2);
    
    }}

Compiler output:
Main.java:9: error: package system does not exist
    system.out.prinln(a+b/2);
          ^
1 error
Language: C

#include<iostream>
using namespace std;
int main()
{
    int X,Y,x;
    cin>>X>>Y;
    x=X+(Y/2);
    cout<<x<<endl;
}


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

#include <iostream>

int main(){
int X;
int Y;
scanf("%d %d",&X,%Y);
printf("%d",X+Y/2);
}


Compiler output:
a.cc: In function 'int main()':
a.cc:6:18: error: expected primary-expression before '%' token
    6 | scanf("%d %d",&X,%Y);
      |                  ^
Language: C++

#include <bits/stdc++.h>

using namespace std;

#define REP(i, n) for(int i = 0; i < (n); i++)
#define SORT(v, n) sort(v, v+n);
#define SSORT(v, n) sort(v, v+n, greater<int>())

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

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

import java.util.Scanner;
//なんかよくわからないやつ
class Gakunaikon20190520-abc113a{
    public static void main(String[] args){
      Scanner sc = new Scanner(System.in);
      //入力のやつ
        int X = sc.nextInt();
        //鉄道運賃
        int Y = sc.nextInt();
        //バス運賃
        System.out.println(X + Y / 2);
        //合計運賃を計算して出力
    }
}


Compiler output:
Main.java:3: error: '{' expected
class Gakunaikon20190520-abc113a{
                        ^
1 error
Language: Java

import java.util.Scanner;
//なんかよくわからないやつ
public class Abc113a {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
      //入力のやつ
		int X = sc.nextInt();
      //鉄道運賃
		int Y = sc.nextInt();
      //バス運賃
		System.out.println(X + Y / 2);
      //合計運賃を計算して入力
	}
}

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

import java.util.Scanner;
//なんかよくわからないやつ
public class Main{
    public static void main(String[] args){
      Scanner sc = new Scanner(System.in);
      //入力のやつ
        int X = sc.nextInt();
        //鉄道運賃
        int Y = sc.nextInt();
        //バス運賃
        System.out.println(X + (Y / 2);
        //合計運賃を計算して出力
    }
}

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

import java.util.Scanner;
//なんかよくわからないやつ
public class Abc113a{
    public static void main(String[] args){
      Scanner sc = new Scanner(System.in);
      //入力のやつ
        int X = sc.nextInt();
        //鉄道運賃
        int Y = sc.nextInt();
        //バス運賃
        System.out.println(X + (Y / 2);
        //合計運賃を計算して出力
    }
}

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

import java.util.Scanner;
//なんかよくわからないやつ
public class Abc113a{
    public static void main(String[] args){
      Scanner sc = new Scanner(System.in);
      //入力のやつ
        int x = sc.nextInt();
        //鉄道運賃
        int y = sc.nextInt();
        //バス運賃
        System.out.println(x + y / 2);
        //合計運賃を計算して出力
    }
}

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

import java.util.Scanner;
//なんかよくわからないやつ
Public class Abc113a{
    public static void main(String[] args){
      Scanner sc = new Scanner(System.in);
      //入力のやつ
        int x = sc.nextInt();
        //鉄道運賃
        int y = sc.nextInt();
        //バス運賃
        System.out.println(x + y / 2);
        //合計運賃を計算して出力
    }
}

Compiler output:
Main.java:3: error: class, interface, enum, or record expected
Public class Abc113a{
^
1 error
Language: Java

import java.util.Scanner;
//なんかよくわからないやつ
public class Abc113a{
    public static void main(String[] args){
      Scanner scan = new Scanner(System.in);
      //入力のやつ
        int x = scan.nextInt();
        //鉄道運賃
        int y = scan.nextInt();
        //バス運賃
        System.out.println(x + y / 2);
        //合計運賃を計算して出力
    }
}

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

import java.util.Scanner;
//なんかよくわからないやつ
public class abc113a{
    public static void main(String[] args){
      Scanner scan = new Scanner(System.in);
      //入力のやつ
        int x = scan.nextInt();
        //鉄道運賃
        int y = scan.nextInt();
        //バス運賃
        System.out.println(x + y / 2);
        //合計運賃を計算して出力
    }
}

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

import java.util.Scanner;
//なんかよくわからないやつ
public class abc113a{
    public static void main(String[] args){
      Scanner scan = new Scanner(System.in);
      //入力のやつ
        int x = scan.nextInt();
        //鉄道運賃
        int x = scan.nextInt();
        //バス運賃
        System.out.println(x + y / 2);
        //合計運賃を計算して出力
    }
}

Compiler output:
Main.java:3: error: class abc113a is public, should be declared in a file named abc113a.java
public class abc113a{
       ^
Main.java:9: error: variable x is already defined in method main(String[])
        int x = scan.nextInt();
            ^
Main.java:11: error: cannot find symbol
        System.out.println(x + y / 2);
                               ^
  symbol:   variable y
  location: class abc113a
3 errors
Language: Java

import java.util.Scanner;
//なんかよくわからないやつ
class abc113a{
    public static void main(String[] args){
      Scanner scan = new Scanner(System.in);
      //入力のやつ
        int x = scan.nextInt();
        //鉄道運賃
        int x = scan.nextInt();
        //バス運賃
        System.out.println(x + y / 2);
        //合計運賃を計算して出力
    }
}

Compiler output:
Main.java:9: error: variable x is already defined in method main(String[])
        int x = scan.nextInt();
            ^
Main.java:11: error: cannot find symbol
        System.out.println(x + y / 2);
                               ^
  symbol:   variable y
  location: class abc113a
2 errors
Language: Java

import java.util.Scanner;
//なんかよくわからないやつ
class abc113a{
    public static void main(String[] args){
      Scanner scan = new Scanner(System.in);
      //入力のやつ
        int x = sc.nextInt();
        //鉄道運賃
        int x = sc.nextInt();
        //バス運賃
        System.out.println(x + y / 2);
        //合計運賃を計算して出力
    }
}

Compiler output:
Main.java:7: error: cannot find symbol
        int x = sc.nextInt();
                ^
  symbol:   variable sc
  location: class abc113a
Main.java:9: error: variable x is already defined in method main(String[])
        int x = sc.nextInt();
            ^
Main.java:9: error: cannot find symbol
        int x = sc.nextInt();
                ^
  symbol:   variable sc
  location: class abc113a
Main.java:11: error: cannot find symbol
        System.out.println(x + y / 2);
                               ^
  symbol:   variable y
  location: class abc113a
4 errors
Language: Java

import java.util.scanner;
//なんかよくわからないやつ
class abc113a{
    public static void main(String[] args){
      Scanner scan = new Scanner(System.in);
      //入力のやつ
        int x = sc.nextInt();
        //鉄道運賃
        int x = sc.nextInt();
        //バス運賃
        System.out.println(x + y / 2);
        //合計運賃を計算して出力
    }
}

Compiler output:
Main.java:1: error: cannot find symbol
import java.util.scanner;
                ^
  symbol:   class scanner
  location: package java.util
Main.java:5: error: cannot find symbol
      Scanner scan = new Scanner(System.in);
      ^
  symbol:   class Scanner
  location: class abc113a
Main.java:5: error: cannot find symbol
      Scanner scan = new Scanner(System.in);
                         ^
  symbol:   class Scanner
  location: class abc113a
Main.java:7: error: cannot find symbol
        int x = sc.nextInt();
                ^
  symbol:   variable sc
  location: class abc113a
Main.java:9: error: variable x is already defined in method main(String[])
        int x = sc.nextInt();
            ^
Main.java:9: error: cannot find symbol
        int x = sc.nextInt();
                ^
  symbol:   variable sc
  location: class abc113a
Main.java:11: error: cannot find symbol
        System.out.println(x + y / 2);
                               ^
  symbol:   variable y
  location: class abc113a
7 errors
Language: Java

import java.util.*;
//なんかよくわからないやつ
class abc113a{
    public static void main(String[] args){
      Scanner scan = new Scanner(System.in);
      //入力のやつ
        int x = sc.nextInt();
        //鉄道運賃
        int x = sc.nextInt();
        //バス運賃
        System.out.println(x + y / 2);
        //合計運賃を計算して出力
    }
}

Compiler output:
Main.java:7: error: cannot find symbol
        int x = sc.nextInt();
                ^
  symbol:   variable sc
  location: class abc113a
Main.java:9: error: variable x is already defined in method main(String[])
        int x = sc.nextInt();
            ^
Main.java:9: error: cannot find symbol
        int x = sc.nextInt();
                ^
  symbol:   variable sc
  location: class abc113a
Main.java:11: error: cannot find symbol
        System.out.println(x + y / 2);
                               ^
  symbol:   variable y
  location: class abc113a
4 errors
Language: Java

import java.util.*;
//なんかよくわからないやつ
class abc113a {
    public static void main(String[] args){
      Scanner scan = new Scanner(System.in);
      //入力のやつ
        int X = sc.nextInt();
        //鉄道運賃
        int Y = sc.nextInt();
        //バス運賃
        System.out.println(X + Y / 2);
        //合計運賃を計算して出力
    }
}

Compiler output:
Main.java:7: error: cannot find symbol
        int X = sc.nextInt();
                ^
  symbol:   variable sc
  location: class abc113a
Main.java:9: error: cannot find symbol
        int Y = sc.nextInt();
                ^
  symbol:   variable sc
  location: class abc113a
2 errors
Language: Java

class abc113a {
    public static void main(String[] args){
      Scanner sc = new Scanner(System.in);
        int X = sc.nextInt();
        //鉄道運賃
        int Y = sc.nextInt();
        //バス運賃
        System.out.println(X + Y/2);
        //合計運賃を計算して出力
    }
}

Compiler output:
Main.java:3: error: cannot find symbol
      Scanner sc = new Scanner(System.in);
      ^
  symbol:   class Scanner
  location: class abc113a
Main.java:3: error: cannot find symbol
      Scanner sc = new Scanner(System.in);
                       ^
  symbol:   class Scanner
  location: class abc113a
2 errors
Language: Java

class abc113a {
    public static void main(String[] args){
      Scanner sc = new Scanner(System.in);
        int X = sc.nextInt();
        int Y = sc.nextInt();
        int x = X + Y/2;
        System.out.println(x);
    }
}

Compiler output:
Main.java:3: error: cannot find symbol
      Scanner sc = new Scanner(System.in);
      ^
  symbol:   class Scanner
  location: class abc113a
Main.java:3: error: cannot find symbol
      Scanner sc = new Scanner(System.in);
                       ^
  symbol:   class Scanner
  location: class abc113a
2 errors
Language: Java

class main {
    public static void main(String[] args){
        int X;
        int Y;
        int x = X + Y/2;
        System.out.println(x);
    }
}

Compiler output:
Main.java:5: error: variable X might not have been initialized
        int x = X + Y/2;
                ^
Main.java:5: error: variable Y might not have been initialized
        int x = X + Y/2;
                    ^
2 errors
Language: Java

class Sample1 {
    public static void main(String[] args){
        int X;
        int Y;
        int x = X + Y/2;
        System.out.println(x);
    }
}

Compiler output:
Main.java:5: error: variable X might not have been initialized
        int x = X + Y/2;
                ^
Main.java:5: error: variable Y might not have been initialized
        int x = X + Y/2;
                    ^
2 errors
Language: Java

class Sample1 {
    public static void main(String[] args){
        int X,Y;
        int x = X + Y/2;
        System.out.println(x);
    }
}

Compiler output:
Main.java:4: error: variable X might not have been initialized
        int x = X + Y/2;
                ^
Main.java:4: error: variable Y might not have been initialized
        int x = X + Y/2;
                    ^
2 errors
Language: Java

class Sample1 {
    public static void main(String[] args){
        int X,Y;
        System.out.println(X + Y / 2);
    }
}

Compiler output:
Main.java:4: error: variable X might not have been initialized
        System.out.println(X + Y / 2);
                           ^
Main.java:4: error: variable Y might not have been initialized
        System.out.println(X + Y / 2);
                               ^
2 errors
Language: C++

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

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

#include<iostream>
using namespace std;

int main(){
  int X,Y;
  cin>>X>>Y;
  
  cout<<x+Y/2<<endl;
}

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

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


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

#include <bits/stdc++.h>
using namespace std;
 
int main(){
  int N;
  double T,A
  cin>>N>>T>>A;
  vector<double>vecA(N);
  vector<double>vecB(N);
  for(int i=0;i<N;i++){
    double H;
    cin>>H;
    vecB[i]=A-T+(H*0.006);
    if((A-T+(H*0.006))>=0 )vecA[i]=A-T+(H*0.006);
    else vecA[i]=T-(H*0.006)-A;
  }
  sort(vecA.begin(),vecA.end());
  for(int i=0;i<N;i++){
    if(vecB[i]==vecA[0]){
      cout<<i+1<<endl;
      break;      
    }
    else if(vecB[i]==0-vecA[0]){
      cout<<i+1<<endl;
      break;
    }
    else continue;
  }
}
  


Compiler output:
a.cc: In function 'int main()':
a.cc:7:3: error: expected initializer before 'cin'
    7 |   cin>>N>>T>>A;
      |   ^~~
a.cc:13:13: error: 'A' was not declared in this scope
   13 |     vecB[i]=A-T+(H*0.006);
      |             ^
Language: C++

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

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

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

#include<stdio.h>
using namespace std;
int main()
  {
int x,y,k;
  cin>>x>>y;
  k=x+y/2;
  cout<<k<<endl;
    
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:3: error: 'cin' was not declared in this scope
    6 |   cin>>x>>y;
      |   ^~~
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:8:3: error: 'cout' was not declared in this scope
    8 |   cout<<k<<endl;
      |   ^~~~
a.cc:8:3: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:8:12: error: 'endl' was not declared in this scope
    8 |   cout<<k<<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

#include<stdio.h>

int main(){
  int a,b;
  scan("%d %d",&a,&b);
  printf("%d",a+b/2);
  return 0;
}

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

#define _CRT_SECURE_NO_WARNINGS
#include <stdio.h>
int main(void)
{
	int x, y;
	scanf("%d", &x);
	scanf("%d", &y);
	int ans;
	ans = x + y / 2;
	printf("%d",ans);
  
  re
	
}


Compiler output:
main.c: In function 'main':
main.c:12:3: error: 're' undeclared (first use in this function)
   12 |   re
      |   ^~
main.c:12:3: note: each undeclared identifier is reported only once for each function it appears in
main.c:12:5: error: expected ';' before '}' token
   12 |   re
      |     ^
      |     ;
   13 | 
   14 | }
      | ~
Language: C

#include <stdio.h>

int main(){
	int n, t, a, i, x;
	double h[1000];

	scanf_s("%d", &n);
	scanf_s("%d", &a);
	scanf_s("%d", &t);
	x = 0;
	for (i = 0; i < n; i++) {
		scanf_s("%f", &h[i]);
		h[i] = t - h[i] * 0.006;
		if (h[i] < 0) h[i] = -1 * h[i];
		if (h[x] >= h[i]) x =i;
	}
	x++;
	printf("%d", x);
}

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

#define _CRT_SECURE_NO_WARNINGS
#include <stdio.h>
void main(void)
{
	int x, y;
	scanf("%d", &x);
	scanf("%d", &y);
	int ans;
	ans = x + y / 2;
	printf("%d",ans);
	int hoge;
	scanf("%d", &hoge);
}


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

#include <stdio.h>

int main(){
	int n, t, a, i, x, h[1000];

	scanf_s("%d", &n);
	scanf_s("%d", &a);
	scanf_s("%d", &t);
	x = 0;
	for (i = 0; i < n; i++) {
		scanf_s("%d", &h[i]);
		h[i] = t - h[i] * 0.006;
		if (h[i] < 0) h[i] = -1 * h[i];
		if (h[x] >= h[i]) x =i;
	}
	x++;
	printf("%d", x);
}

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", &n);
      |         ^~~~~~~
      |         scanf
Language: C++

#include <bits/stdc++.h>
typedef long long ll;
using namespase std;

int main() {
    int X, Y;
    cin >> X >> Y;
    
    int ans = X + Y / 2;

    cout << ans << endl;
    return 0;
}

Compiler output:
a.cc:3:7: error: expected nested-name-specifier before 'namespase'
    3 | using namespase std;
      |       ^~~~~~~~~
a.cc: In function 'int main()':
a.cc:7:5: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    7 |     cin >> X >> Y;
      |     ^~~
      |     std::cin
In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:146,
                 from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:11:5: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   11 |     cout << ans << 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:11:20: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   11 |     cout << ans << endl;
      |                    ^~~~
      |                    std::endl
In file included from /usr/include/c++/14/istream:41,
                 from /usr/include/c++/14/sstream:40,
                 from /usr/include/c++/14/complex:45,
                 from /usr/include/c++/14/ccomplex:39,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:127:
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
Language: C++

#include <algorithm>
#include <bitset>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <iostream>
#include <map>
#include <queue>
#include <unordered_map>
#include <utility>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <vector>
#include <cstdio>
#include <math.h>
#include <stdio.h>
#include <deque>

using namespace std;

#define REP(i,n,m) for( long long int i = (n); i < (m); i++ )
#define REV(v) for (auto itr = v.rbegin(); itr != v.rend(); itr++)
#define ll long long
#define ALL(a) (a).begin(), (a).end()
#define SORT(v) sort( ALL(v) );
#define LAST(v) v[v.size()-1]
#define ZERO(a) memset(a,0,sizeof(a))
#define MINUS(a) memset(a,-1,sizeof(a))
#define EACH(i,c) for(typeof((c).begin()) i=(c).begin(); i!=(c).end(); ++i)
#define EXIST(s,e) ((s).find(e)!=(s).end())
#define pi pair<int, int>
#define MP make_pair
#define PB push_back
#define IIN(a) int a; cin >> a;
#define LIN(a) ll a; cin >> a;
#define SIN(a) string a; cin >> a;
#define VL(v,n) vector<ll> v(n);
#define Read_VL(v,n) vector<ll> v(n);REP(i,0,n)cin>>v[i];
#define sumV(v,n) Vl(acm,n) REP(i,0,n) acm[i] = v[i] + ( i == 0 ? 0 : acm[i - 1]);
#define EPS (1e-10)
#define INF 1000000000000LL

void YN(bool b){cout<<(b?"YES":"NO")<<"\n";}
void Yn(bool b){cout<<(b?"Yes":"No")<<"\n";}
void yn(bool b){cout<<(b?"yes":"no")<<"\n";}

template<class S>S max(vector<S>&a){return *max_element(all(a));}
template<class S>S min(vector<S>&a){return *min_element(all(a));}

template<class T>void puta(T&&t){cout<<t<<"\n";}
template<class H,class...T>void puta(H&&h,T&&...t){cout<<h<<' ';puta(t...);}


template<class T=ll>struct Graph{
	int n;
	vector<vector<tuple<ll,T>>>edge;
	Graph(int N=1):n(N){edge.resize(n);}
	void add(ll f,ll t,T c,bool d=false){
		edge[f].emplace_back(t,c);
		if(!d)edge[t].emplace_back(f,c);
	}
	void view(){
		REP(i,0,n)for(auto&e:edge[i])
			puta(i,"=>",get<0>(e),", cost :",get<1>(e));
	}
};


bool length_cmp( string &a, string &b ){
  return a.size() < b.size();
}

ll StoLL( string s )
{
	ll num=0;
  REP( i, 0, s.size() ){
    num = num * 10 + ( s[i] ^ 48 );
  }
  return num;
}

ll CtoLL( char c )
{
	if( 'a' <= c && c <= 'z'){
		return (ll)( c ^ 96 ) ;
	}
	else if( 'A' <= c && c <= 'Z'){
		return (ll)( c ^ 64 );
	}
  return 0;
}

ll MOD=1000000007;
ll dx = { 1, 0, -1, 0 };
ll dx = { 0, 1, 0, -1 };
//I ASCII code: '0' = 48; 'A' = 65; 'a' = 97

signed main() {
    ios_base::sync_with_stdio(0); cin.tie(0);
    LIN(x) LIN(y)
    puta( x + y / 2 );
    return 0;
}


Compiler output:
a.cc:96:4: error: scalar object 'dx' requires one element in initializer
   96 | ll dx = { 1, 0, -1, 0 };
      |    ^~
Language: C++

#include <bits/stdc++.h>
#include <vector>
#include <numeric>
#define PI 3.14159265358979323846
#define MAXINF 1e18L
#define MININF -1e18L
#define REP(i, n) for(int i=0;i<int(n);++i)
#define RREP(i, n) for(int i=int(n)-1;i>=0;--i)
#define ALL(v) v.begin(),v.end()
#define SORT(v) sort(ALL(v))
#define DEBUG(x) cerr<<#x<<": "<<x<<endl;
#define DEBUG_VEC(v) cerr<<#v<<":";for(int i=0;i<v.size();i++) cerr<<" "<<v[i]; cerr<<endl
#define pb push_back
using namespace std;
template<class A>void pr(A a){cout << (a) << endl;}
template<class A,class B>void pr(A a,B b){cout << a << " "  ;pr(b);}
template<class A,class B,class C>void pr(A a,B b,C c){cout << a << " " ;pr(b,c);}
template<class A,class B,class C,class D>void pr(A a,B b,C c,D d){cout << a << " " ;pr(b,c,d);}
typedef long long ll;
typedef pair<int, int> intint;

int main(void)
{
    int a,b;
    cin >> a >> b;
    pr(a + b/2);
}A

Compiler output:
a.cc:27:2: error: 'A' does not name a type
   27 | }A
      |  ^
Language: C++

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:11:39: error: expected ')' before ';' token
   11 |                 printf("%d\n", a+(b/2);
      |                       ~               ^
      |                                       )
Language: C++

#include<iostream>

using namesapce std;

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

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

import std.stdio, std.algorithm, std.conv, std.array, std.string, std.math, std.typecons, std.numeric;

void main()
{
    auto xy = readln.split.to!(int[]);
    auto X = xy[0];
    auto Y = xy[1];

    writeln(X + Y / 2);
}

Compiler output:
a.cc:1:1: error: 'import' does not name a type
    1 | import std.stdio, std.algorithm, std.conv, std.array, std.string, std.math, std.typecons, std.numeric;
      | ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:3:1: error: '::main' must return 'int'
    3 | void main()
      | ^~~~
a.cc: In function 'int main()':
a.cc:5:15: error: 'readln' was not declared in this scope
    5 |     auto xy = readln.split.to!(int[]);
      |               ^~~~~~
a.cc:9:5: error: 'writeln' was not declared in this scope
    9 |     writeln(X + Y / 2);
      |     ^~~~~~~
Language: C++

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


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

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

using System;

namespace AtCoderBC113A_DiscountFare
{
    class Program
    {
        static void Main(string[] args)
        {
            string[] s = Console.ReadLine().Split(' ');

            int Ans = int.Parse(s[0]) + int.Parse(s[1]) / 2;

            Console.WriteLine(Ans.ToString());
        }
    }
}


Compiler output:
a.cc:1:7: error: expected nested-name-specifier before 'System'
    1 | using System;
      |       ^~~~~~
a.cc:7:26: error: 'string' has not been declared
    7 |         static void Main(string[] args)
      |                          ^~~~~~
a.cc:7:35: error: expected ',' or '...' before 'args'
    7 |         static void Main(string[] args)
      |                                   ^~~~
a.cc:15:6: error: expected ';' after class definition
   15 |     }
      |      ^
      |      ;
a.cc: In static member function 'static void AtCoderBC113A_DiscountFare::Program::Main(int*)':
a.cc:9:13: error: 'string' was not declared in this scope
    9 |             string[] s = Console.ReadLine().Split(' ');
      |             ^~~~~~
a.cc:9:20: error: expected primary-expression before ']' token
    9 |             string[] s = Console.ReadLine().Split(' ');
      |                    ^
a.cc:11:23: error: expected primary-expression before 'int'
   11 |             int Ans = int.Parse(s[0]) + int.Parse(s[1]) / 2;
      |                       ^~~
a.cc:13:13: error: 'Console' was not declared in this scope
   13 |             Console.WriteLine(Ans.ToString());
      |             ^~~~~~~
a.cc:13:35: error: request for member 'ToString' in 'Ans', which is of non-class type 'int'
   13 |             Console.WriteLine(Ans.ToString());
      |                                   ^~~~~~~~
Language: C++

#include <iostream>

int main(){
	int X,Y;
	std::cin >> X,Y;
	std::cout << X+y/2 << std::endl;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:24: error: 'y' was not declared in this scope
    6 |         std::cout << X+y/2 << std::endl;
      |                        ^
Language: C++

#include <iostream>
using namepace std;
int main()
{
  int x,y;
  cin>>x>>y;
  cout<<x+y/2;
}

Compiler output:
a.cc:2:7: error: expected nested-name-specifier before 'namepace'
    2 | using namepace 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>>x>>y;
      |   ^~~
      |   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<<x+y/2;
      |   ^~~~
      |   std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
Language: C

#include<stdio.h>
int main(){
  int X,Y;
  scanf("%d %d",&X&Y);
  printf("%d",X + Y / 2);
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:4:19: error: invalid operands to binary & (have 'int *' and 'int')
    4 |   scanf("%d %d",&X&Y);
      |                 ~~^
      |                 |
      |                 int *
Language: C

#include<stdio.h>
int main(){
  int X,Y;
  scanf("%d %d",&X&Y);
  printf("%d",(X + Y) / 2);
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:4:19: error: invalid operands to binary & (have 'int *' and 'int')
    4 |   scanf("%d %d",&X&Y);
      |                 ~~^
      |                 |
      |                 int *
Language: C++

#include <bits/stdc++.h>
2.using namespace std;
3. 
4.int main () {
5.  int x,y;
6.  cin >> x >> y;
7.  
8.  cout << x + y / 2 << endl;
9.  
10.  return 0;
11.}


Compiler output:
a.cc:2:1: error: expected unqualified-id before numeric constant
    2 | 2.using namespace std;
      | ^~~~~~~
a.cc:3:1: error: expected unqualified-id before numeric constant
    3 | 3.
      | ^~
Language: C++

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

int main () {
  int x,y;
  cin >> x >> y;
  
  cout << x + y / 2 << endl;
  
  return 0;
}

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

#include <iostream>

int DiscountFare(void) {
	int X, Y;
	std::cin >> X >> Y;
	std::cout << X + Y / 2;
	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<cmath>
#include<algorithm>
using namespace std;
int main(){
    int N, A;
    double T;
    cin >> N;
    cin >> T >> A;
    double H[1000];
    double pans = 10000000;
    int ans = 0;
    for(int i=0;i<N;i++){
        cin >> H[i];
        if(pans >= abs(T - H[i]*0.006-A)){
            ans = i+1;
        }
        pans = min(pans, abs(T - H[i]*0.006-A));
    }
    cout << ans << endl;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:5: error: 'cin' was not declared in this scope
    7 |     cin >> N;
      |     ^~~
a.cc:3:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
    2 | #include<algorithm>
  +++ |+#include <iostream>
    3 | using namespace std;
a.cc:19:5: error: 'cout' was not declared in this scope
   19 |     cout << ans << endl;
      |     ^~~~
a.cc:19:5: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:19:20: error: 'endl' was not declared in this scope
   19 |     cout << ans << endl;
      |                    ^~~~
a.cc:3:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
    2 | #include<algorithm>
  +++ |+#include <ostream>
    3 | using namespace std;
Language: Java

import java.util.Scanner;

public class Test2 {

	public static void main(String[] args) {
		
		Scanner sc = new Scanner(System.in);
		// get a integer
		int fare1 = sc.nextInt();
		int fare2 = sc.nextInt();
		
		int total = getTotalPrice(fare1,fare2);
		
		System.out.println(total);
	}
	
	public static boolean isMaxFare(int fare) {
		return fare > 100 ? true : false;
	}
	
	public static boolean isOddNumber(int fare) {
		System.out.println(fare % 2 );
		return (fare % 2 ) == 0 ? true : false;
	}
	
	public static int getTotalPrice(int fare1,int fare2) {
		
		if(isMaxFare(fare1) || isMaxFare(fare2)) {
			return 0;
		}
		
		if(!isOddNumber(fare1) || !isOddNumber(fare2)) {
			return 0;
		}
		
		return fare1 + (fare2 / 2); 
	}
	
}


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

import java.util.*;
import java.lang.*;
import java.io.*;
import java.util.Scanner;
/* Name of the class has to be "Main" only if the class is public. */
class Main
{
	public static void main (String[] args) throws java.lang.Exception
	{   
	    Scanner sc = new Scanner(System.in);
	    System.out.println(sc.nextInt()+sc.nexInt()/2);
	    
	}
}


Compiler output:
Main.java:11: error: cannot find symbol
	    System.out.println(sc.nextInt()+sc.nexInt()/2);
	                                      ^
  symbol:   method nexInt()
  location: variable sc of type Scanner
1 error
Language: C++

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

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

#include <iostream>
using namespase std;

int main(){
  int X,Y;
  cin >>X>>Y;
  cout<<X+Y/2;
}

Compiler output:
a.cc:2:7: error: expected nested-name-specifier before 'namespase'
    2 | using namespase 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 >>X>>Y;
      |   ^~~
      |   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<<X+Y/2;
      |   ^~~~
      |   std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
Language: C++

#include<iostream>
using namespase std;

int main(){
  int X,Y;
  cin >>X>>Y;
  cout<<X+Y/2;
}

Compiler output:
a.cc:2:7: error: expected nested-name-specifier before 'namespase'
    2 | using namespase 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 >>X>>Y;
      |   ^~~
      |   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<<X+Y/2;
      |   ^~~~
      |   std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
Language: C

#include <stdio.h>

int main(void)
{
int x, y, total;
scanf("%d", &x);
scanf("%d", &y);

total  = x + y / 2;

printf("%d", total);
  
  return 0:
}

Compiler output:
main.c: In function 'main':
main.c:13:11: error: expected ';' before ':' token
   13 |   return 0:
      |           ^
      |           ;
Language: C

#include<stdio.h>
int main()
{
         int x,y;
         while(~scanf("%d %d",&x,&y)
       {
             float prince;
             prince=x+y*1.0/2;
            printf("%.2f",prince);
       }
}

Compiler output:
main.c: In function 'main':
main.c:5:37: error: expected ')' before '{' token
    5 |          while(~scanf("%d %d",&x,&y)
      |               ~                     ^
      |                                     )
    6 |        {
      |        ~                             
main.c:11:1: error: expected expression before '}' token
   11 | }
      | ^
Language: C++

using namespace std;

int n,t,b;
int a[1010];          

int main() {
    cin >> n;
    cin >> t;
    cin >> b;
    for (int i = 0; i<n; i++) cin >> a[i];
    
    int c = b;
    
    double min = 10000;
    int findID = -1;
    
    for(int i = 0; i<n; i++){
		double tmp = t-a[i]*0.006;
		if(min > abs(c-tmp)){ min = abs(c-tmp);
			
		findID = i;}
		
	}
		cout<<findID<<endl;

    
}


Compiler output:
a.cc: In function 'int main()':
a.cc:7:5: error: 'cin' was not declared in this scope
    7 |     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 | using namespace std;
a.cc:19:26: error: 'abs' was not declared in this scope
   19 |                 if(min > abs(c-tmp)){ min = abs(c-tmp);
      |                          ^~~
a.cc:24:17: error: 'cout' was not declared in this scope
   24 |                 cout<<findID<<endl;
      |                 ^~~~
a.cc:24:17: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:24:31: error: 'endl' was not declared in this scope
   24 |                 cout<<findID<<endl;
      |                               ^~~~
a.cc:1:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
  +++ |+#include <ostream>
    1 | using namespace std;
Language: C++

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

int main() {
  int x y;
  cin >> x >> y;
  cout << x+y/2 << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:5:9: error: expected initializer before 'y'
    5 |   int x y;
      |         ^
a.cc:6:10: error: 'x' was not declared in this scope
    6 |   cin >> x >> y;
      |          ^
a.cc:6:15: error: 'y' was not declared in this scope; did you mean 'yn'?
    6 |   cin >> x >> y;
      |               ^
      |               yn