func_code_string: #include <bits/stdc++.h>   using namespace std;   template <typename T>   T sqr(T x) {     return x * x;   }   template <typename T>   T gcd(T a, T b) {     return b ? gcd(b, a % b) : a;   }   const int MAXN = 600;   int n, m;   int x, y, cnt;   bool us[MAXN][MAXN];   string s;   int main() {     ios_base ::sync_with_stdio(false);     cin >> n >> m >> x >> y;     cin >> s;     for (int i = 0; i < s.size(); i++) {       if (us[x][y])         cout <<  0  ;       else         cout <<  1  ;       us[x][y] = true;       if (s[i] ==  U ) x--;       if (s[i] ==  D ) x++;       if (s[i] ==  L ) y--;       if (s[i] ==  R ) y++;       if (x > n) x = n;       if (x == 0) x = 1;       if (y > m) y = m;       if (y == 0) y = 1;     }     for (int i = 1; i <= n; i++)       for (int j = 1; j <= m; j++)         if (!us[i][j]) cnt++;     cout << cnt;   }   