func_code_string: #include <bits/stdc++.h>   using namespace std;   const int N = 1e6 + 4;   int n, m, a, b, ay[N], by[N], l[N], linkY[N << 1];   void read() {     cin >> n >> m >> a >> b;     for (int i = 1; i <= n; ++i) {       cin >> ay[i];     }     for (int i = 1; i <= m; ++i) {       cin >> by[i];     }     for (int i = 1; i <= m; ++i) {       cin >> l[i];     }   }   long double dist = 1e18;   int ida, idb, idTmp;   long double sqr(long double x) { return x * x; }   long double euc(long double xa, long double ya, long double xb,                   long double yb) {     return sqrt(sqr(xa - xb) + sqr(ya - yb));   }   long double f(int ni, int mi) {     return euc(0, 0, a, ay[ni]) + euc(a, ay[ni], b, by[mi]);   }   long double ternarySearch(int num) {     int l = 1, r = n;     while (l + 2 < r) {       int dm = (r - l) / 3;       int m1 = l + dm;       int m2 = r - dm;       long double d1 = f(m1, num);       long double d2 = f(m2, num);       if (fabs(d1 - d2) < 1e-9) {         l = m1;         r = m2;       } else if (d1 < d2) {         r = m2;       } else {         l = m1;       }     }     idTmp = l;     for (int i = l + 1; i <= r; ++i) {       if (f(i, num) < f(idTmp, num)) {         idTmp = i;       }     }     return f(idTmp, num);   }   void calc() {     for (int i = 1; i <= m; ++i) {       long double distTmp = ternarySearch(i) + l[i];       if (distTmp < dist) {         dist = distTmp;         ida = idTmp;         idb = i;       }     }   }   void sovle() {     read();     calc();     cout << ida <<     << idb;   }   int main() {     ios_base::sync_with_stdio(false);     cout.tie(0);     cin.tie(0);     sovle();     return 0;   }   