Language: C++

#include "bits/stdc++.h"
using namespace std;
using ll = long long;
using Graph = vector<vector<int>>;
#define int long double
#define double long double
#define YES {cout<<"YES"<<'\n';}
#define NO {cout<<"NO"<<'\n';}
#define Yes {cout<<"Yes"<<'\n';}
#define No {cout<<"No"<<'\n';}
#define yes {cout<<"yes"<<'\n';}
#define no {cout<<"no"<<'\n';}
void YN(bool flg){cout<<(flg?"YES":"NO")<<'\n';}
void Yn(bool flg){cout<<(flg?"Yes":"No")<<'\n';}
void yn(bool flg){cout<<(flg?"yes":"no")<<'\n';}
#define SORT(a) sort(a.begin(),a.end())
#define REVERSE(a) reverse(a.begin(),a.end())
#define REP(i, n) for(int i = 0; i < n; i++)
#define REPR(i, n) for(int i = n; i >= 0; i--)
#define FOR(i, m, n) for(int i = m; i < n; i++)
#define out(n) {cout << n << '\n';}
typedef vector<int> VI;
typedef vector<string> VS;
typedef vector<bool> VB;
typedef vector<VI> VVI;
const int MOD = 1000000007;
const long long INF = 10e10;
const double PI = acos(-1.0);
template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return 1; } return 0; }
template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return 1; } return 0; }
template<class T>auto MAX(const T& a) { return *max_element(a.begin(),a.end()); }
template<class T>auto MIN(const T& a) { return *min_element(a.begin(),a.end()); }
template<class T, class U>U SUM(const T& a, const U& v) { return accumulate(a.begin(),a.end(), v); }
template<class T, class U>U COUNT(const T& a, const U& v) { return count(a.begin(),a.end(), v); }
template<class T, class U>int LOWER(const T& a, const U& v) { return lower_bound(a.begin(),a.end(), v) - a.begin(); }
template<class T, class U>int UPPER(const T& a, const U& v) { return upper_bound(a.begin(),a.end(), v) - a.begin(); }
int GCD(int a, int b) { return b ? GCD(b, a%b) : a; }
int LCM(int a, int b) { int g = GCD(a, b); return a / g * b; }
int POW(int a, int n) { int r = 1; while (n > 0) { if (n & 1)r *= a; a *= a; n /= 2; }return r; }
int isPrime(int n){if(n<2){return 0;}for(int i=2; i*i<=n; i++){if(n%i==0){return 0;}}return 1;}
/*素因数分解*/map< int, int >prime_factor(int n){map< int, int > ret;for(int i = 2; i * i <= n; i++) {while(n % i == 0) {ret[i]++;n /= i;}}if(n != 1) ret[n] = 1;return ret;}
/*約数列挙*/vector<int> divisor(int n){vector<int> v; for(int i=1; i*i<=n; i++){if(n%i==0){v.push_back(i);if(i!=n/i){v.push_back(n/i);}}}sort(v.begin(),v.end()); return v;}
//----------------ライブラリとか----------------

signed main(){
    cin.tie(0);
    ios::sync_with_stdio(0);
    cout<<fixed<<setprecision(15);

    int n,t,a; cin >> n >> t >> a;
    VI h(n); REP(i,n) cin >> h[i];
    //hをxに近づける
    int x = 6*(t-a)/1000;
    int ans , tmp = INF;
    REP(i,n){if(tmp>abs(h[i]-x)){tmp=abs(h[i]-x); ans=i+1;}}
    out(ans);

    return 0;
}

Compiler output:
a.cc:6:16: error: 'long long' specified with 'double'
    6 | #define double long double
      |                ^~~~
a.cc:5:18: note: in expansion of macro 'double'
    5 | #define int long double
      |                  ^~~~~~
a.cc:22:16: note: in expansion of macro 'int'
   22 | typedef vector<int> VI;
      |                ^~~
a.cc:6:16: error: 'long long' specified with 'double'
    6 | #define double long double
      |                ^~~~
a.cc:5:18: note: in expansion of macro 'double'
    5 | #define int long double
      |                  ^~~~~~
a.cc:26:7: note: in expansion of macro 'int'
   26 | const int MOD = 1000000007;
      |       ^~~
a.cc:6:16: error: 'long long' specified with 'double'
    6 | #define double long double
      |                ^~~~
a.cc:5:18: note: in expansion of macro 'double'
    5 | #define int long double
      |                  ^~~~~~
a.cc:35:27: note: in expansion of macro 'int'
   35 | template<class T, class U>int LOWER(const T& a, const U& v) { return lower_bound(a.begin(),a.end(), v) - a.begin(); }
      |                           ^~~
a.cc:6:16: error: 'long long' specified with 'double'
    6 | #define double long double
      |                ^~~~
a.cc:5:18: note: in expansion of macro 'double'
    5 | #define int long double
      |                  ^~~~~~
a.cc:36:27: note: in expansion of macro 'int'
   36 | template<class T, class U>int UPPER(const T& a, const U& v) { return upper_bound(a.begin(),a.end(), v) - a.begin(); }
      |                           ^~~
a.cc:6:16: error: 'long long' specified with 'double'
    6 | #define double long double
      |                ^~~~
a.cc:5:18: note: in expansion of macro 'double'
    5 | #define int long double
      |                  ^~~~~~
a.cc:37:9: note: in expansion of macro 'int'
   37 | int GCD(int a, int b) { return b ? GCD(b, a%b) : a; }
      |         ^~~
a.cc:6:16: error: 'long long' specified with 'double'
    6 | #define double long double
      |                ^~~~
a.cc:5:18: note: in expansion of macro 'double'
    5 | #define int long double
      |                  ^~~~~~
a.cc:37:16: note: in expansion of macro 'int'
   37 | int GCD(int a, int b) { return b ? GCD(b, a%b) : a; }
      |                ^~~
a.cc:6:16: error: 'long long' specified with 'double'
    6 | #define double long double
      |                ^~~~
a.cc:5:18: note: in expansion of macro 'double'
    5 | #define int long double
      |                  ^~~~~~
a.cc:37:1: note: in expansion of macro 'int'
   37 | int GCD(int a, int b) { return b ? GCD(b, a%b) : a; }
      | ^~~
a.cc: In function 'double GCD(double, double)':
a.cc:37:44: error: invalid operands of types 'double' and 'double' to binary 'operator%'
   37 | int GCD(int a, int b) { return b ? GCD(b, a%b) : a; }
      |                                           ~^~
      |                                           | |
      |                                           | double
      |                                           double
a.cc: At global scope:
a.cc:6:16: error: 'long long' specified with 'double'
    6 | #define double long double
      |                ^~~~
a.cc:5:18: note: in expansion of macro 'double'
    5 | #define int long double
      |                  ^~~~~~
a.cc:38:9: note: in expansion of macro 'int'
   38 | int LCM(int a, int b) { int g = GCD(a, b); return a / g * b; }
      |         ^~~
a.cc:6:16: error: 'long long' specified with 'double'
    6 | #define double long double
      |                ^~~~
a.cc:5:18: note: in expansion of macro 'double'
    5 | #define int long double
      |                  ^~~~~~
a.cc:38:16: note: in expansion of macro 'int'
   38 | int LCM(int a, int b) { int g = GCD(a, b); return a / g * b; }
      |                ^~~
a.cc:6:16: error: 'long long' specified with 'double'
    6 | #define double long double
      |                ^~~~
a.cc:5:18: note: in expansion of macro 'double'
    5 | #define int long double
      |                  ^~~~~~
a.cc:38:1: note: in expansion of macro 'int'
   38 | int LCM(int a, int b) { int g = GCD(a, b); return a / g * b; }
      | ^~~
a.cc: In function 'double LCM(double, double)':
a.cc:6:16: error: 'long long' specified with 'double'
    6 | #define double long double
      |                ^~~~
a.cc:5:18: note: in expansion of macro 'double'
    5 | #define int long double
      |                  ^~~~~~
a.cc:38:25: note: in expansion of macro 'int'
   38 | int LCM(int a, int b) { int g = GCD(a, b); return a / g * b; }
      |                         ^~~
a.cc: At global scope:
a.cc:6:16: error: 'long long' specified with 'double'
    6 | #define double long double
      |                ^~~~
a.cc:5:18: note: in expansion of macro 'double'
    5 | #define int long double
      |                  ^~~~~~
a.cc:39:9: note: in expansion of macro 'int'
   39 | int POW(int a, int n) { int r = 1; while (n > 0) { if (n & 1)r *= a; a *= a; n /= 2; }return r; }
      |         ^~~
a.cc:6:16: error: 'long long' specified with 'double'
    6 | #define double long double
      |                ^~~~
a.cc:5:18: note: in expansion of macro 'double'
    5 | #define int long double
      |                  ^~~~~~
a.cc:39:16: note: in expansion of macro 'int'
   39 | int POW(int a, int n) { int r = 1; while (n > 0) { if (n & 1)r *= a; a *= a; n /= 2; }return r; }
      |                ^~~
a.cc:6:16: error: 'long long' specified with 'double'
    6 | #define double long double
      |                ^~~~
a.cc:5:18: note: in expansion of macro 'double'
    5 | #define int long double
      |                  ^~~~~~
a.cc:39:1: note: in expansion of macro 'int'
   39 | int POW(int a, int n) { int r = 1; while (n > 0) { if (n & 1)r *= a; a *= a; n /= 2; }return r; }
      | ^~~
a.cc: In function 'double POW(double, double)':
a.cc:6:16: error: 'long long' specified with 'double'
    6 | #define double long double
      |                ^~~~
a.cc:5:18: note: in expansion of macro 'double'
    5 | #define int long double
      |                  ^~~~~~
a.cc:39:25: note: in expansion of macro 'int'
   39 | int POW(int a, int n) { int r = 1; while (n > 0) { if (n & 1)r *= a; a *= a; n /= 2; }return r; }
      |                         ^~~
a.cc:39:58: error: invalid operands of types 'double' and 'int' to binary 'operator&'
   39 | int POW(int a, int n) { int r = 1; while (n > 0) { if (n & 1)r *= a; a *= a; n /= 2; }return r; }
      |                                                        ~ ^ ~
      |                                                        |   |
      |                                                        |   int
      |                                                        double
a.cc: At global scope:
a.cc:6:16: error: 'long long' specified with 'double'
    6 | #define double long double
      |                ^~~~
a.cc:5:18: note: in expansion of macro 'double'
    5 | #define int long double
      |                  ^~~~~~
a.cc:40:13: note: in expansion of macro 'int'
   40 | int isPrime(int n){if(n<2){return 0;}for(int i=2; i*i<=n; i++){if(n%i==0){return 0;}}return 1;}
      |             ^~~
a.cc:6:16: error: 'long long' specified with 'double'
    6 | #define double long double
      |                ^~~~
a.cc:5:18: note: in expansion of macro 'double'
    5 | #define int long double
      |                  ^~~~~~
a.cc:40:1: note: in expansion of macro 'int'
   40 | int isPrime(int n){if(n<2){return 0;}for(int i=2; i*i<=n; i++){if(n%i==0){return 0;}}return 1;}
      | ^~~
a.cc: In function 'double isPrime(double)':
a.cc:6:16: error: 'long long' specified with 'double'
    6 | #define double long double
      |                ^~~~
a.cc:5:18: note: in expansion of macro 'double'
    5 | #define int long double
      |                  ^~~~~~
a.cc:40:42: note: in expansion of macro 'int'
   40 | int isPrime(int n){if(n<2){return 0;}for(int i=2; i*i<=n; i++){if(n%i==0){return 0;}}return 1;}
      |                                          ^~~
a.cc:40:68: error: invalid operands of types 'double' and 'double' to binary 'operator%'
   40 | int isPrime(int n){if(n<2){return 0;}for(int i=2; i*i<=n; i++){if(n%i==0){return 0;}}return 1;}
      |                                                                   ~^~
      |                                                                   | |
      |                                                                   | double
      |                                                                   double
a.cc: At global scope:
a.cc:6:16: error: 'long long' specified with 'double'
    6 | #define double long double
      |                ^~~~
a.cc:5:18: note: in expansion of macro 'double'
    5 | #define int long double
      |                  ^~~~~~
a.cc:41:20: note: in expansion of macro 'int'
   41 | /*素因数分解*/map< int, int >prime_factor(int n){map< int, int > ret;for(int i = 2; i * i <= n; i++) {while(n % i == 0) {ret[i]++;n /= i;}}if(n != 1) ret[n] = 1;return ret;}
      |                    ^~~
a.cc:6:16: error: 'long long' specified with 'double'
    6 | #define double long double
      |                ^~~~
a.cc:5:18: note: in expansion of macro 'double'
    5 | #define int long double
      |                  ^~~~~~
a.cc:41:25: note: in expansion of macro 'int'
   41 | /*素因数分解*/map< int, int >prime_factor(int n){map< int, int > ret;for(int i = 2; i * i <= n; i++) {while(n % i == 0) {ret[i]++;n /= i;}}if(n != 1) ret[n] = 1;return ret;}
      |                         ^~~
a.cc:6:16: error: 'long long' specified with 'double'
    6 | #define double long double
      |                ^~~~
a.cc:5:18: note: in expansion of macro 'double'
    5 | #define int long double
      |                  ^~~~~~
a.cc:41:43: note: in expansion of macro 'int'
   41 | /*素因数分解*/map< int, int >prime_factor(int n){map< int, int > ret;for(int i = 2; i * i <= n; i++) {while(n % i == 0) {ret[i]++;n /= i;}}if(n != 1) ret[n] = 1;return ret;}
      |                                           ^~~
a.cc: In function 'std::map<double, double> prime_factor(double)':
a.cc:6:16: error: 'long long' specified with 'double'
    6 | #define double long double
      |