criyle/codenet-compile-errors huggingface dataset:
Language: Java

import java.util.Scanner;

public class MainActivity extends AppCompatActivity {
 
   public void main(String args[]) {
     Scanner scan = new Scanner(System.in);
     String str = scan.next();
     int x = Integer.valueOf(str);
     str = scan.next();
     int y = Integer.valueOf(str);

    System.out.println(calc(x, y));
    }

    public int calc ( int num1, int num2){
        int z = 0;
        if (1 <= num1 && num1 <= 100 && 1 <= num2 && num2 <= 100 && num2 % 2 == 0) {
            z = num1 + num2 / 2;
        }
        return z;
    }
}

Compiler output:
Main.java:3: error: class MainActivity is public, should be declared in a file named MainActivity.java
public class MainActivity extends AppCompatActivity {
       ^
Main.java:3: error: cannot find symbol
public class MainActivity extends AppCompatActivity {
                                  ^
  symbol: class AppCompatActivity
2 errors
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:4:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    4 |   cin >> 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:5:3: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    5 |   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: Java

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

Compiler output:
Main.java:6: error: '.class' expected
    System.out.println(num1+int(num2/2));
                               ^
Main.java:6: error: not a statement
    System.out.println(num1+int(num2/2));
                                    ^
Main.java:6: error: ';' expected
    System.out.println(num1+int(num2/2));
                                      ^
3 errors
Language: Java

import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		// TODO Auto-generated method stub
		
		 Scanner sc = new Scanner(System.in);
	        int x = sc.nextInt();
	        int y = sc.nextInt();
	        int a = 0;
	        int b = 0;81
	        
	        a = y/2;
	        
	        b = x + a;
	        
	        System.out.println(b);
	        
	        
	        
	
	}

}


Compiler output:
Main.java:12: error: not a statement
	        int b = 0;81
	                  ^
Main.java:12: error: ';' expected
	        int b = 0;81
	                    ^
2 errors
Language: Java

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

Compiler output:
Main.java:6: error: '.class' expected
    System.out.println(num1+int(num2/2))
                               ^
Main.java:6: error: not a statement
    System.out.println(num1+int(num2/2))
                                    ^
Main.java:6: error: ';' expected
    System.out.println(num1+int(num2/2))
                                      ^
3 errors
Language: Java

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


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

import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		// TODO Auto-generated method stub
		
		 Scanner sc = new Scanner(System.in);
	        int x = sc.nextInt();
	        int y = sc.nextInt();
	        int a = 0;
	        int b = 0;81
	        
	        a = y/2;
	        
	        b = x + a;
	        
	        System.out.println(b);
	        
	        
	        
	
	}

}

Compiler output:
Main.java:12: error: not a statement
	        int b = 0;81
	                  ^
Main.java:12: error: ';' expected
	        int b = 0;81
	                    ^
2 errors
Language: Java

import java.io.PrintWriter; 
import java.util.Scanner; 

public class Main
{
	static Scanner in; 
	static PrintWriter out; 

	static void solve()
	{
		Scanner stdIn = new Scanner(System.in);
		int N = stdIn.nextInt();
		int T = stdIn.nextInt();
		int A = stdIn.nextInt();
		int[] H = new int[N];
		for(int i = 0; i < N; i++)
		{
			H[i] = stdIn.nextInt();
		}
		int answer = 1;
		int near_A = Math.abs(A - (T - (H[0] * 0.006)));
		for(int i = 1; i < N; i++)
		{
			if(near_A > Math.abs(A - (T - (H[i] * 0.006))))
			{
				answer = i;
				near_A = Math.abs(A - (T - (H[i] * 0.006)));
			}
		}
		System.out.println(answer);
	}

	public static void main(String[] args) 
	{ 
		in = new Scanner(System.in); 
		out = new PrintWriter(System.out); 
		solve(); 
		out.flush(); 
		out.close(); 
		in.close(); 
	} 
}

Compiler output:
Main.java:21: error: incompatible types: possible lossy conversion from double to int
		int near_A = Math.abs(A - (T - (H[0] * 0.006)));
		                     ^
Main.java:27: error: incompatible types: possible lossy conversion from double to int
				near_A = Math.abs(A - (T - (H[i] * 0.006)));
				                 ^
2 errors
Language: Java

import java.util.Scanner;

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


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

import java.io.PrintWriter; 
import java.util.Scanner; 

public class Main
{
	static Scanner in; 
	static PrintWriter out; 

	static void solve()
	{
		Scanner stdIn = new Scanner(System.in);
		int N = stdIn.nextInt();
		int T = stdIn.nextInt();
		int A = stdIn.nextInt();
		int[] H = new int[N];
		int answer = 1;
		int i = 0;
		for(i = 0; i < N; i++)
		{
			int near_A = 0;
			if(i == 0)
				near_A = Math.abs(A - (T - (H[0] * 0.006)));
			H[i] = stdIn.nextInt();
			if(Math.abs(A - (T - (H[i] * 0.006))) < near_A)
			{
				near_A = Math.abs(A - (T - (H[i] * 0.006)));
				answer = i + 1;
			}
		}			
		System.out.println(answer);
	}

	public static void main(String[] args) 
	{ 
		in = new Scanner(System.in); 
		out = new PrintWriter(System.out); 
		solve(); 
		out.flush(); 
		out.close(); 
		in.close(); 
	} 
}

Compiler output:
Main.java:22: error: incompatible types: possible lossy conversion from double to int
				near_A = Math.abs(A - (T - (H[0] * 0.006)));
				                 ^
Main.java:26: error: incompatible types: possible lossy conversion from double to int
				near_A = Math.abs(A - (T - (H[i] * 0.006)));
				                 ^
2 errors
Language: Java

import java.util.*;


import java.io.*;

class Main {

  public static void main(String[] args) throws Exception{
    try (Scanner sc = new Scanner(System.in)){
      int X = sc.nextInt();
      int Y = sc.nextInt();

      System.out.println(X + Y /2);
    }
  }
}
import java.util.*;


import java.io.*;

class Main {

  public static void main(String[] args) throws Exception{
    try (Scanner sc = new Scanner(System.in)){
      int X = sc.nextInt();
      int Y = sc.nextInt();

      System.out.println(X + Y /2);
    }
  }
}


Compiler output:
Main.java:17: error: class, interface, enum, or record expected
import java.util.*;
^
Main.java:20: error: class, interface, enum, or record expected
import java.io.*;
^
2 errors
Language: Java

import java.io.PrintWriter; 
import java.util.Scanner; 

public class Main
{
	static Scanner in; 
	static PrintWriter out; 

	static void solve()
	{
		Scanner stdIn = new Scanner(System.in);
		int N = stdIn.nextInt();
		int T = stdIn.nextInt();
		int A = stdIn.nextInt();
		int[] H = new int[N];
		int answer = 1;
		int i = 0;
		for(i = 0; i < N; i++)
		{
			if(i = 0)
				near_A = Math.abs(A - (T - (H[0] * 0.006)));
			H[i] = stdIn.nextInt();
			if(Math.abs(A - (T - (H[i] * 0.006))) < near_A)
			{
				near_A = Math.abs(A - (T - (H[i] * 0.006)));
				answer = i + 1;
			}
		}			
		System.out.println(answer);
	}

	public static void main(String[] args) 
	{ 
		in = new Scanner(System.in); 
		out = new PrintWriter(System.out); 
		solve(); 
		out.flush(); 
		out.close(); 
		in.close(); 
	} 
}

Compiler output:
Main.java:20: error: incompatible types: int cannot be converted to boolean
			if(i = 0)
			     ^
Main.java:21: error: cannot find symbol
				near_A = Math.abs(A - (T - (H[0] * 0.006)));
				^
  symbol:   variable near_A
  location: class Main
Main.java:23: error: cannot find symbol
			if(Math.abs(A - (T - (H[i] * 0.006))) < near_A)
			                                        ^
  symbol:   variable near_A
  location: class Main
Main.java:25: error: cannot find symbol
				near_A = Math.abs(A - (T - (H[i] * 0.006)));
				^
  symbol:   variable near_A
  location: class Main
4 errors
Language: Java

import java.io.PrintWriter; 
import java.util.Scanner; 

public class Main
{
	static Scanner in; 
	static PrintWriter out; 

	static void solve()
	{
		Scanner stdIn = new Scanner(System.in);
		int N = stdIn.nextInt();
		int T = stdIn.nextInt();
		int A = stdIn.nextInt();
		int[] H = new int[N];
		int answer = 1;
		int i = 0;
		for(i = 0; i < N; i++)
		{
			if(i = 0)
				near_A = Math.abs(A - (T - (H[0] * 0.006)))
			H[i] = stdIn.nextInt();
			if(Math.abs(A - (T - (H[i] * 0.006))) < near_A)
			{
				near_A = Math.abs(A - (T - (H[i] * 0.006)));
				answer = i + 1;
			}
		}			
		System.out.println(answer);
	}

	public static void main(String[] args) 
	{ 
		in = new Scanner(System.in); 
		out = new PrintWriter(System.out); 
		solve(); 
		out.flush(); 
		out.close(); 
		in.close(); 
	} 
}

Compiler output:
Main.java:21: error: ';' expected
				near_A = Math.abs(A - (T - (H[0] * 0.006)))
				                                           ^
1 error
Language: C++

#include <stdio.h>
int main()
{
      int n, t, d, index;
      double tmp, s;
      int m=1000000;
      scanf("%d %d %d", &n,&t, &d);
      for(int i=1;i<=n;i++)
      {
            scanf("%d", &h);
            tmp=t-h*0.006 - d;
            s=(tmp<0) -tmp : tmp;
            if( s < m ) m=s, index=i;
       }
       printf("%d", index);
       return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:26: error: 'h' was not declared in this scope
   10 |             scanf("%d", &h);
      |                          ^
a.cc:12:28: error: found ':' in nested-name-specifier, expected '::'
   12 |             s=(tmp<0) -tmp : tmp;
      |                            ^
      |                            ::
a.cc:12:24: error: 'tmp' is not a class, namespace, or enumeration
   12 |             s=(tmp<0) -tmp : tmp;
      |                        ^~~
Language: C++

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

int main() {
  int n, t, a;
  cin >> n >> t >> a;
  vector<int> H(n);
  for (int i = 0; i<n; i++){
    cin >> H.at(i);
  }
  int num;
  vector<int> temp(n);
  for (int i = 0; i<n; i++){
    temp.at(i) = t - H.at(i) * 0.006;
  }
  vector<int> L(n);
  for (int i = 0; i<n; i++){
      L.at(i) = abs(a - temp.at(i));
  }
  int min_L = 100;
  int num = 0;
  for (int i = 0; i<n; i++){
    min_L = min(min_L, L.at(i));
    if(min_L == L.at(i)){
       num = i + 1;
    }
  }
  cout << num << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:21:7: error: redeclaration of 'int num'
   21 |   int num = 0;
      |       ^~~
a.cc:11:7: note: 'int num' previously declared here
   11 |   int num;
      |       ^~~
Language: C++

include <algorithm>
#include <array>
#include <vector>
#include <iostream>
#include <fstream>
#include <string>
#include <cmath>
#include <functional>
#include <queue>

//AtCoderC++.cpp

using namespace std;

void Show(vector<vector<int>> Ns) {
	for (int i = 0; i < Ns.size(); i++) {
		for (int j = 0; j < Ns[i].size(); j++) {
			if (j == Ns[i].size() - 1) {
				cout << Ns[i][j] << endl;
			} else {
				cout << Ns[i][j] << ",";
			}
		}
	}
}

void Show(vector<int> N) {
	for (int i = 0; i < N.size(); i++) {
		cout << N[i];
		if (i != N.size() - 1) {
			cout << " ";
		} else {
			cout << endl;
		}
	}
}


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

Compiler output:
a.cc:1:1: error: 'include' does not name a type
    1 | include <algorithm>
      | ^~~~~~~
In file included from /usr/include/c++/14/array:39,
                 from a.cc:2:
/usr/include/c++/14/initializer_list:51:15: error: 'size_t' does not name a type
   51 |       typedef size_t            size_type;
      |               ^~~~~~
/usr/include/c++/14/initializer_list:1:1: note: 'size_t' is defined in header '<cstddef>'; this is probably fixable by adding '#include <cstddef>'
  +++ |+#include <cstddef>
    1 | // std::initializer_list support -*- C++ -*-
/usr/include/c++/14/initializer_list:57:7: error: 'size_type' does not name a type
   57 |       size_type                 _M_len;
      |       ^~~~~~~~~
/usr/include/c++/14/initializer_list:60:54: error: 'size_type' has not been declared
   60 |       constexpr initializer_list(const_iterator __a, size_type __l)
      |                                                      ^~~~~~~~~
/usr/include/c++/14/initializer_list:68:17: error: 'size_type' does not name a type
   68 |       constexpr size_type
      |                 ^~~~~~~~~
/usr/include/c++/14/initializer_list:45:11: fatal error: definition of 'class std::initializer_list<_E>' does not match '#include <initializer_list>'
   45 |     class initializer_list
      |           ^~~~~~~~~~~~~~~~
compilation terminated.
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:5:16: error: 'x' was not declared in this scope
    5 |         cin >> x >> y ;
      |                ^
a.cc:5:21: error: 'y' was not declared in this scope; did you mean 'yn'?
    5 |         cin >> x >> y ;
      |                     ^
      |                     yn
Language: C

#include<stdio.h>
int main() {
	int x, y;
	scanf_s("%d %d", &x, &y);
	printf("%d\n", x + y / 2);
	return 0;
}

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

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

struct Node {
    int p, y, i;
    bool operator< (const Node& b) const {
        return p < b.p || (p == b.p && y < b.y);
    }
}in[100005];

int index[100005][2];

int main() {
    int n, m;
    while (scanf("%d%d", &n, &m) == 2) {
        for (int i = 1; i <= m; i++) {
            scanf("%d%d", &in[i].p, &in[i].y);
            in[i].i = i;
        }
        sort(in + 1, in + 1 + m);
        for (int i = 1; i <= m; i++) {
            if (in[i].p == in[i - 1].p) {
                index[in[i].i][1] = index[in[i - 1].i][1] + 1;
                index[in[i].i][0] = in[i].p;
            }
            else {
                index[in[i].i][1] = 1;
                index[in[i].i][0] = in[i].p;
            }
        }
        for (int i = 1; i <= m; i++) {
            printf("%06d%06d\n", index[i][0], index[i][1]);
        }
    }
}

Compiler output:
a.cc:11:20: error: 'int index [100005][2]' redeclared as different kind of entity
   11 | int index[100005][2];
      |                    ^
In file included from /usr/include/string.h:462,
                 from /usr/include/c++/14/cstring:43,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:121,
                 from a.cc:1:
/usr/include/strings.h:50:20: note: previous declaration 'const char* index(const char*, int)'
   50 | extern const char *index (const char *__s, int __c)
      |                    ^~~~~
a.cc: In function 'int main()':
a.cc:23:22: error: invalid types '<unresolved overloaded function type>[int]' for array subscript
   23 |                 index[in[i].i][1] = index[in[i - 1].i][1] + 1;
      |                      ^
a.cc:23:42: error: invalid types '<unresolved overloaded function type>[int]' for array subscript
   23 |                 index[in[i].i][1] = index[in[i - 1].i][1] + 1;
      |                                          ^
a.cc:24:22: error: invalid types '<unresolved overloaded function type>[int]' for array subscript
   24 |                 index[in[i].i][0] = in[i].p;
      |                      ^
a.cc:27:22: error: invalid types '<unresolved overloaded function type>[int]' for array subscript
   27 |                 index[in[i].i][1] = 1;
      |                      ^
a.cc:28:22: error: invalid types '<unresolved overloaded function type>[int]' for array subscript
   28 |                 index[in[i].i][0] = in[i].p;
      |                      ^
a.cc:32:39: error: invalid types '<unresolved overloaded function type>[int]' for array subscript
   32 |             printf("%06d%06d\n", index[i][0], index[i][1]);
      |                                       ^
a.cc:32:52: error: invalid types '<unresolved overloaded function type>[int]' for array subscript
   32 |             printf("%06d%06d\n", index[i][0], index[i][1]);
      |                                                    ^
Language: C++

#include "pch.h"
#include <iostream>
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: pch.h: No such file or directory
    1 | #include "pch.h"
      |          ^~~~~~~
compilation terminated.
Language: C++

#include "pch.h"
#include <iostream>
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: pch.h: No such file or directory
    1 | #include "pch.h"
      |          ^~~~~~~
compilation terminated.
Language: C++

#include <iostream>

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


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 + (Y / 2) << endl;
      |   ^~~~
      |   std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:7:26: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
    7 |   cout << X + (Y / 2) << endl;
      |                          ^~~~
      |                          std::endl
In file included from /usr/include/c++/14/iostream:41:
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
Language: Java

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

Compiler output:
Main.java:3: error: cannot find symbol
		int x = X + ( Y/2 );
		        ^
  symbol:   variable X
  location: class Main
Main.java:3: error: cannot find symbol
		int x = X + ( Y/2 );
		              ^
  symbol:   variable Y
  location: class Main
2 errors
Language: C

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

Compiler output:
main.c:2:9: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token
    2 | int main<>{
      |         ^
Language: C

#include<stdio.h>
int main(){
    int a,b,c;
    // 整数の入力
    scanf("%d %d", &a,&b);
    // 出力
    c = a + (b/2)
    printf("%d\n",c);
    return 0;
}
#include<stdio.h>
int main(){
    int a,b,c;
    // 整数の入力
    scanf("%d %d", &a,&b);
    // 出力
    c = a + (b/2);
    printf("%d\n",c);
    return 0;
}


Compiler output:
main.c: In function 'main':
main.c:7:18: error: expected ';' before 'printf'
    7 |     c = a + (b/2)
      |                  ^
      |                  ;
    8 |     printf("%d\n",c);
      |     ~~~~~~        
main.c: At top level:
main.c:12:5: error: redefinition of 'main'
   12 | int main(){
      |     ^~~~
main.c:2:5: note: previous definition of 'main' with type 'int()'
    2 | int main(){
      |     ^~~~
Language: C

#include<stdio.h>
int main() {
	int x, y;
	scanf_s("%d %d", &x, &y);
	printf("鉄道の運賃は%d円です。\n", x);
	printf("バスの運賃は半額となるため、%d/2=%d円です。\n", y, y / 2);
	printf("よって、A駅からC駅まで移動するのに%d円かかります。\n", x + y / 2);
	return 0;
}

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

#include<stdio.h>
int main(){
    int a,b,c;
    // 整数の入力
    scanf("%d %d", &a,&b);
    // 出力
    c = a + (b/2)
    printf("%d\n",c);
    return 0;
}

Compiler output:
main.c: In function 'main':
main.c:7:18: error: expected ';' before 'printf'
    7 |     c = a + (b/2)
      |                  ^
      |                  ;
    8 |     printf("%d\n",c);
      |     ~~~~~~
Language: C++

#include<iostream>
using namespace std;

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

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

#include <bits/stdc++.h>

using namespace std;

int mian()
{

    int x, y;
    cin >> x >> y;
    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 <iostream>
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:12: error: 'x' was not declared in this scope
    4 |     cin >> x >> y;
      |            ^
a.cc:4:17: error: 'y' was not declared in this scope
    4 |     cin >> x >> y;
      |                 ^
Language: C

include<stdio.h>

int main(){
 int X,Y,x;
 scanf(“%d”&X);
 scanf(“%d”&Y);
 x=X+(Y/2);
 printf(“%d”,x);
 return 0;
}

Compiler output:
main.c:1:8: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token
    1 | include<stdio.h>
      |        ^
main.c:5:8: error: stray '\342' in program
    5 |  scanf(<U+201C>%d<U+201D>&X);
      |        ^~~~~~~~
main.c:5:11: error: stray '\342' in program
    5 |  scanf(<U+201C>%d<U+201D>&X);
      |                  ^~~~~~~~
main.c:6:8: error: stray '\342' in program
    6 |  scanf(<U+201C>%d<U+201D>&Y);
      |        ^~~~~~~~
main.c:6:11: error: stray '\342' in program
    6 |  scanf(<U+201C>%d<U+201D>&Y);
      |                  ^~~~~~~~
main.c:8:9: error: stray '\342' in program
    8 |  printf(<U+201C>%d<U+201D>,x);
      |         ^~~~~~~~
main.c:8:12: error: stray '\342' in program
    8 |  printf(<U+201C>%d<U+201D>,x);
      |                   ^~~~~~~~
Language: C

int X,Y;

scanf("%d %d",&X,&Y);
printf("%d",X+(Y/2));

Compiler output:
main.c:3:7: error: expected declaration specifiers or '...' before string constant
    3 | scanf("%d %d",&X,&Y);
      |       ^~~~~~~
main.c:3:15: error: expected declaration specifiers or '...' before '&' token
    3 | scanf("%d %d",&X,&Y);
      |               ^
main.c:3:18: error: expected declaration specifiers or '...' before '&' token
    3 | scanf("%d %d",&X,&Y);
      |                  ^
main.c:4:8: error: expected declaration specifiers or '...' before string constant
    4 | printf("%d",X+(Y/2));
      |        ^~~~
main.c:4:13: error: expected declaration specifiers or '...' before 'X'
    4 | printf("%d",X+(Y/2));
      |             ^
Language: C++

#include <sostream>
using namespace std;

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

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

/*
 * @Author: CucumicsMelon
 * @Date: 2018-11-02 21:31:37
 * @Last Modified by: CucumicsMelon
 * @Last Modified time: 2018-11-02 21:46:28
 */
#include <cstdio>
#include <iostream>
#include <string.h>
#include<bits/stdc++.h>
#include <string>
#include <map>
#include <queue>
#include <deque>
#include <vector>
#include <set>
#include <algorithm>
#include <math.h>
#include <cmath>
#include <stack>
#include <iomanip>
#define rep(i,n,m) for(int i=n;i<=m;++i)
#define per(i,n,m) for(int i=n;i>=m;--i)
#define mem0(a) memset(a,0,sizeof(a))
#define meminf(a) memset(a,0x3f,sizeof(a))
#define maxn 100000+50
#define inf 0x7fffffff
#define ll long long
void swap(int a,int b)
{
    int t=a;a=b;b=t;
}
using namespace std;
int nex[maxn];
void  getn(int n,char c[])
{
    int i=0,j=-1;
    nex[0]=-1;
    while(i<n)
    {
        if(c[i]==c[j]||j==-1)
        {
            i++;j++;nex[i]=j;
        }
        else j=nex[j];
    }
}
int kmp(char c1[],char c2[])
{
    int i,j=0,l1,l2;
    l1=strlen(c1);l2=strlen(c2);
    getn(l2,c2);
    rep(i,0,l1-1)
    {
        while(j&&c1[i]!=c2[j]) j=nex[j];
        if(c1[i]==c2[j]) j++;
    }
    return j;
}
int main()
{
    int n,t,a,x;
    double q,minn=inf;
    cin>>n>>t>>a;
    int index=0;
    for(int i=1;i<=n;++i)
    {
        cin>>x;
        q=t-x*0.006;
        if(fabs(a-q)<minn) {
            minn=fabs(a-q);index=i;
        }
    }
    cout<<i;
}

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

#include<iostream>
namespace std;

int main(void){
int x,y;
cin<< x <<y;
x+=y/2;
cout <<x;
return0;
}

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

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

Compiler output:
a.cc:3:5: error: cannot declare '::main' to be a global variable
    3 | int main
      |     ^~~~
a.cc:5:1: error: expected primary-expression before 'int'
    5 | int x,y;
      | ^~~
a.cc:5:1: error: expected '}' before 'int'
a.cc:4:1: note: to match this '{'
    4 | {
      | ^
a.cc:6:1: error: 'cin' does not name a type
    6 | cin>>x>>y
      | ^~~
a.cc:8:1: error: expected declaration before '}' token
    8 | }
      | ^
Language: C

#include<stdio.h>

int main()
{
	int X, Y;

	scanf_s("%d", &X);
	scanf_s("%d", &Y);

	printf("%d", X + (Y / 2));
}

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", &X);
      |         ^~~~~~~
      |         scanf
Language: Java

public static void Main(String[] args) {
		int x = 0;
		int y = 0;
		Scanner scan = new Scanner(System.in);
		x = scan.nextInt();
		y = scan.nextInt();
		
		int result = x+ y/2;
		System.out.println(result);
	}

Compiler output:
Main.java:1: error: unnamed classes are a preview feature and are disabled by default.
public static void Main(String[] args) {
              ^
  (use --enable-preview to enable unnamed classes)
1 error
Language: C

#include "stdio.h"


int main() {
	
	int x, y;

	scanf_s("%d %d", &x, &y);

	printf("%d", x + (y / 2));

	return 0;
}

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

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

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.int main()
      | ^~~~~
Language: C

#include <stdio.h>

int du(int argc,char argv[])
{
  return(argc+argv/2);
}

int main()
{
  return(du);
}


Compiler output:
main.c: In function 'du':
main.c:5:19: error: invalid operands to binary / (have 'char *' and 'int')
    5 |   return(argc+argv/2);
      |                   ^
main.c: In function 'main':
main.c:10:9: error: returning 'int (*)(int,  char *)' from a function with return type 'int' makes integer from pointer without a cast [-Wint-conversion]
   10 |   return(du);
      |         ^
Language: C++

#include <bits/stdc++.h>
#define rep(i, a, b) for(int i = int(a); i < int(b); i++)
#define rer(i, a, b) for(int i = int(a) - 1; i >= int(b); i--)

using namespace std;
typedef long long int ll;
typedef pair <int, int> P;

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


Compiler output:
a.cc: In function 'int main()':
a.cc:10:18: error: expected unqualified-id before ';' token
   10 |         int X, Y,;
      |                  ^
Language: C++

#include <stdio.h>

int main(void)
{

	int X,Y;

	scanf("%d", X)
	scanf("%d", Y)

	
	printf("%d", X+Y/2);
return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:8:23: error: expected ';' before 'scanf'
    8 |         scanf("%d", X)
      |                       ^
      |                       ;
    9 |         scanf("%d", Y)
      |         ~~~~~
Language: C++

(X, Y) = map(int, input().split())

print(X+Y//2)




Compiler output:
a.cc:1:3: error: expected ')' before ',' token
    1 | (X, Y) = map(int, input().split())
      | ~ ^
      |   )
a.cc:1:6: error: expected constructor, destructor, or type conversion before ')' token
    1 | (X, Y) = map(int, input().split())
      |      ^
Language: C++

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

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

#include<bits/stdc++.h>

using namespace std;

int main(){
int x,y;
scanf("%d%d",&x,&y);
printf("%.1f",(double)x+(double)y/2.00)
return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:40: error: expected ';' before 'return'
    8 | printf("%.1f",(double)x+(double)y/2.00)
      |                                        ^
      |                                        ;
    9 | return 0;
      | ~~~~~~
Language: C++

#include<iostream>

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


return 0;
}

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

#include<iostream>
using namespace std;

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

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

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

int x, y;

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

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


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

int main()
{
int X;
int y;

	ios::sync_with_stdio( false );
	cin.tie( 0 );

	cin >> X;
	cin >> Y;

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

	return 0;
}






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

#include<iostream>

int main()
{
    int a, b;
    std::cin>>a>>b;
    std::cout<<a+b/2<<"\n";
  
  retrun 0;
}

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

#include<bits/stdc++.h>
using namespace std;
int main(void){
	int x,y;
	cin>>x>>y;
	int sum+=x;
	sum+=y/2;
	cout<<sum<<endl;
	return 0;

}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:16: error: expected initializer before '+=' token
    6 |         int sum+=x;
      |                ^~
a.cc:7:9: error: 'sum' was not declared in this scope
    7 |         sum+=y/2;
      |         ^~~
Language: C++

#pragma optimize("", off)
#pragma GCC optimize("Ofast,no-stack-protector,unroll-loops")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
#pragma comment(linker, "/STACK:36777216")
#include <bits/stdc++.h>

#define _ ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL);
#define ll long long 
#define int ll
#define all(v) v.begin(),v.end()
#define pb push_back
#define sz(i) (int)(i.size())
#define setto(n) cout << fixed << setprecision(n)
#define fi first
#define se second
#define ld long double
#define inf LONG_MAX
#define pii pair<int, int>
#ifdef ONLINE_JUDGE
#define endl '\n'
#endif
const int mod = 1e9 + 7;
using namespace std;

#ifndef ONLINE_JUDGE
#define tr(...) __f(#__VA_ARGS__, __VA_ARGS__)
template <typename Arg1>
void __f(const char* name, Arg1&& arg1){
	cerr << name << " : " << arg1 << std::endl;
}
template <typename Arg1, typename... Args>
void __f(const char* names, Arg1&& arg1, Args&&... args){
	const char* comma = strchr(names + 1, ',');cerr.write(names, comma - names) << " : " << arg1<<" | ";__f(comma+1, args...);
}
#else
#define tr(...)
#endif
template<class T> void smin(T& a, T val) {if (a > val) a = val;}
template<class T> void smax(T& a, T val) {if (a < val) a = val;}
template<typename T>inline std::ostream &operator << (std::ostream & os,const std::vector<T>& v){bool first = true;os << "[";for(auto i: v){if(!first)os << ", ";os << i;first = false;}return os << "]";}

//Check N size twiceeeeeeeeeeeeeeeeee, and verify it
const int N = 2*1e5 + 10;


int32_t main(){_
	
	int x,y;
	cin>>x>>y;

	cout<<x + y/2	

	return 0;
}

Compiler output:
a.cc: In function 'int32_t main()':
a.cc:51:24: error: expected ';' before 'return'
   51 |         cout<<x + y/2
      |                      ^  
      |                        ;
   52 | 
   53 |         return 0;
      |         ~~~~~~
Language: C

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

Compiler output:
main.c: In function 'main':
main.c:5:21: error: expected ';' before 'return'
    5 |   printf("%d",x+y/2)
      |                     ^
      |                     ;
    6 |   return 0;
      |   ~~~~~~
Language: C++


//include
//------------------------------------------
#include <vector>
#include <list>
#include <map>
#include <set>
#include <deque>
#include <queue>
#include <stack>
#include <bitset>
#include <algorithm>
#include <functional>
#include <numeric>
#include <utility>
#include <sstream>
#include <iostream>
#include <iomanip>
#include <cstdio>
#include <cmath>
#include <cstdlib>
#include <string>
#include <cstring>
#include <ctime>


using namespace std;

//conversion
//------------------------------------------
inline int toInt(string s) { int v; istringstream sin(s); sin >> v; return v; }
template<class T> inline string toString(T x) { ostringstream sout; sout << x; return sout.str(); }

//math
//-------------------------------------------
template<class T> inline T sqr(T x) { return x * x; }

//typedef
//------------------------------------------
typedef vector<int> VI;
typedef vector<VI> VVI;
typedef vector<string> VS;
typedef pair<int, int> PII;
typedef long long LL;

//container util
//------------------------------------------
#define ALL(a)  (a).begin(),(a).end()
#define RALL(a) (a).rbegin(), (a).rend()
#define PB push_back
#define MP make_pair
#define SZ(a) int((a).size())
#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 EXISTch(s,c) ((((s).find_first_of(c)) != std::string::npos)? 1 : 0)//cがあれば1 if(1)
#define SORT(c) sort((c).begin(),(c).end())

//repetition
//------------------------------------------
#define FOR(i,a,b) for(int i=(a);i<(b);++i)
#define rep(i,n)  FOR(i,0,n)
#define loop(n) FOR(i,0,n)
#define rrep(i,a,b) for(int i=(a);i>=(b);--i)
//constant
//--------------------------------------------
const double EPS = 1e-10;
const double PI = acos(-1.0);
const int INF = (int)1000000007;
const LL MOD = (LL)1000000007;//10^9+7
const LL INF2 = (LL)100000000000000000;//10^18

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

	cout << x + y / 2 << en
}

Compiler output:
a.cc: In function 'int main()':
a.cc:75:30: error: 'en' was not declared in this scope; did you mean 'yn'?
   75 |         cout << x + y / 2 << en
      |                              ^~
      |                              yn
Language: C

#include<iostream>
#include<algorithm>

using namespace std;



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

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



#if 1
#include <iostream>
#include <fstream>
#include <string>
#include <vector>
#include <map>
#include <set>
#include <unordered_map>
#include <unordered_set>
#include <queue>
#include <stack>
#include <array>
#include <deque>
#include <algorithm>
#include <utility>
#include <cstdint>
#include <functional>
#include <iomanip>
#include <numeric>
#include <assert.h>
#include <bitset>
#include <list>

auto& in = std::cin;
auto& out = std::cout;
#define all_range(C) std::begin(C), std::end(C)
const double PI = 3.141592653589793238462643383279502884197169399375105820974944;

int32_t x,y;

int main()
{
	using std::endl;
	in.sync_with_stdio(false);
	out.sync_with_stdio(false);
	in.tie(nullptr);
	out.tie(nullptr);

	in >> z>>y;
	out << x + y / 2 << endl;

	return 0;
}
#endif


Compiler output:
a.cc: In function 'int main()':
a.cc:41:15: error: 'z' was not declared in this scope
   41 |         in >> z>>y;
      |               ^
Language: C

#include<iostream>
#include<algorithm>
#include<math.h>
#include<queue>
#include<string>
#include<vector>
#include<tuple>
#include<stack>
#include<iomanip>
#include<map>
using namespace std;



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

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

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
Main.java:4: error: cannot find symbol
        Scanner sc = new Scanner(System.in);
                         ^
  symbol:   class Scanner
  location: class Main
2 errors
Language: C++

#include <iostream>
#include <string>
using namespace std;
int SortB(A[],variety){
  for(int i = 0;i<variety;i++){
    for(int j = 0;i<variety;i++){

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


Compiler output:
a.cc:4:11: error: 'A' was not declared in this scope
    4 | int SortB(A[],variety){
      |           ^
a.cc:4:13: error: expected primary-expression before ']' token
    4 | int SortB(A[],variety){
      |             ^
a.cc:4:15: error: 'variety' was not declared in this scope
    4 | int SortB(A[],variety){
      |               ^~~~~~~
a.cc:4:22: error: expression list treated as compound expression in initializer [-fpermissive]
    4 | int SortB(A[],variety){
      |                      ^
Language: C++

#include<bits/stdc++.h>
const int maxn = 100005;
int a[maxn];
int n;
long long sum;
int main(){
	int m;
	cin>>n>>m;
	cout<<n+m/2<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:9: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    8 |         cin>>n>>m;
      |         ^~~
      |         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:9:9: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    9 |         cout<<n+m/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:9:22: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
    9 |         cout<<n+m/2<<endl;
      |                      ^~~~
      |                      std::endl
In file included from /usr/include/c++/14/istream:41,
                 from /usr/include/c++/14/sstream:40,
                 from /usr/include/c++/14/complex:45,
                 from /usr/include/c++/14/ccomplex:39,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:127:
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
Language: C++

#include <iostream>
#include <cmath>
 
int main(void){
    int N, ans=0;
    double dT=1000, T, A;
    std::cin >> N >> T >> A;
 
    for (int i=0; i<N; ++i){
        double h, tmp;
        std::cin >> h;
        tmp = T - 0.006 * h;
        if (dT > dabs(A - tmp)){
            dT = dabs(A - tmp);
            ans = i + 1;
        }
    }
 
    std::cout << ans << std::endl;
 
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:18: error: 'dabs' was not declared in this scope; did you mean 'labs'?
   13 |         if (dT > dabs(A - tmp)){
      |                  ^~~~
      |                  labs
Language: C++

#include <bits/stdc++.h>
using namespace std;
using ll=long long;
int main() {
  ll a;
  cin>>a;
  vector<vector<double>>vec(a,vector<double>(2));
  ll b;
  cin>>b;
  ll e;
  cin>>e;
  for(ll i=0;i<a;i++){
    double c;
    cin>>c;
    vec.at(i).at(0)=b-c*0.006;
    vec.at(1)=i;
  }
  sort(vec.begin(),vec.end());
  ll f=a-1;
  for(ll i=0;i<a;i++){
    if(e<=vec.at(i).at(0)){
      f=i;
      break;
    }
  }
  if(f==0){
    cout<<vec.at(f).at(1)<<endl;
    return 0;
  }
  if(abs(vec.at(f).at(0)-e)>abs(vec.at(f-1).at(0)-e)){
    cout<<vec.at(f-1).at(1)<<endl;
  }
  else{
    cout<<vec.at(f).at(1)<<endl;
  }
  
    
  return 0;
}
    
    
  


Compiler output:
a.cc: In function 'int main()':
a.cc:16:15: error: no match for 'operator=' (operand types are '__gnu_cxx::__alloc_traits<std::allocator<std::vector<double> >, std::vector<double> >::value_type' {aka 'std::vector<double>'} and 'll' {aka 'long long int'})
   16 |     vec.at(1)=i;
      |               ^
In file included from /usr/include/c++/14/vector:72,
                 from /usr/include/c++/14/functional:64,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:53,
                 from a.cc:1:
/usr/include/c++/14/bits/vector.tcc:210:5: note: candidate: 'std::vector<_Tp, _Alloc>& std::vector<_Tp, _Alloc>::operator=(const std::vector<_Tp, _Alloc>&) [with _Tp = double; _Alloc = std::allocator<double>]'
  210 |     vector<_Tp, _Alloc>::
      |     ^~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/vector.tcc:211:42: note:   no known conversion for argument 1 from 'll' {aka 'long long int'} to 'const std::vector<double>&'
  211 |     operator=(const vector<_Tp, _Alloc>& __x)
      |               ~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~
In file included from /usr/include/c++/14/vector:66:
/usr/include/c++/14/bits/stl_vector.h:766:7: note: candidate: 'std::vector<_Tp, _Alloc>& std::vector<_Tp, _Alloc>::operator=(std::vector<_Tp, _Alloc>&&) [with _Tp = double; _Alloc = std::allocator<double>]'
  766 |       operator=(vector&& __x) noexcept(_Alloc_traits::_S_nothrow_move())
      |       ^~~~~~~~
/usr/include/c++/14/bits/stl_vector.h:766:26: note:   no known conversion for argument 1 from 'll' {aka 'long long int'} to 'std::vector<double>&&'
  766 |       operator=(vector&& __x) noexcept(_Alloc_traits::_S_nothrow_move())
      |                 ~~~~~~~~~^~~
/usr/include/c++/14/bits/stl_vector.h:788:7: note: candidate: 'std::vector<_Tp, _Alloc>& std::vector<_Tp, _Alloc>::operator=(std::initializer_list<_Tp>) [with _Tp = double; _Alloc = std::allocator<double>]'
  788 |       operator=(initializer_list<value_type> __l)
      |       ^~~~~~~~
/usr/include/c++/14/bits/stl_vector.h:788:46: note:   no known conversion for argument 1 from 'll' {aka 'long long int'} to 'std::initializer_list<double>'
  788 |       operator=(initializer_list<value_type> __l)
      |                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~