func_code_string: #include <bits/stdc++.h>   using namespace std;   string s;   int n, x, y;   void upd(pair<int, int> &pos, char mv, int d) {     switch (mv) {       case  U :         pos.second += d;         break;       case  D :         pos.second -= d;         break;       case  L :         pos.first -= d;         break;       case  R :         pos.first += d;         break;     }   }   bool can(pair<int, int> u, pair<int, int> v, int len) {     int d = abs(u.first - v.first) + abs(u.second - v.second);     if ((d & 1) != (len & 1)) return false;     return len >= d;   }   bool ok(int len) {     pair<int, int> pos = make_pair(0, 0);     for (int i = len; i < n; ++i) upd(pos, s[i], 1);     int l = 0, r = len;     while (true) {       if (can(pos, make_pair(x, y), len)) return true;       if (r == n) break;       upd(pos, s[l++], 1);       upd(pos, s[r++], -1);     }     return false;   }   int main() {     cin >> n >> s >> x >> y;     if (!ok(n)) {       cout << -1 << endl;       return 0;     }     int l = 0, r = n;     while (l < r) {       int m = (l + r) >> 1;       if (ok(m))         r = m;       else         l = m + 1;     }     cout << r << endl;     return 0;   }   