func_code_string: #include <bits/stdc++.h>   using namespace std;   int n, m;   char cmd[(100000 + 10)];   int vis[510][510], path[(100000 + 10)];   const int dx[] = {0, 0, 1, -1}, dy[] = {1, -1, 0, 0};   int convert(char ch) {     if (ch ==  R )       return 0;     else if (ch ==  L )       return 1;     else if (ch ==  D )       return 2;     else       return 3;   }   bool Inborder(int x, int y) {     if (x < 0 || x >= n || y < 0 || y >= m) return false;     return true;   }   int main() {     int x0, y0;     scanf( %d%d%d%d , &n, &m, &x0, &y0);     scanf( %s , cmd);     memset(vis, 0, sizeof(vis));     int cnt = 0, pos = 0, len = strlen(cmd), ans = n * m;     path[cnt++] = 1;     ans--;     int x = x0 - 1, y = y0 - 1;     vis[x][y] = 1;     while (pos < len - 1) {       int dir = convert(cmd[pos++]);       if (!Inborder(dx[dir] + x, dy[dir] + y)) {         path[cnt++] = 0;         continue;       }       x += dx[dir];       y += dy[dir];       if (vis[x][y]) {         path[cnt++] = 0;       } else {         ans--;         path[cnt++] = 1;         vis[x][y] = 1;       }     }     for (int i = 0; i < cnt; i++) {       printf( %d  , path[i]);     }     printf( %d n , ans);     return 0;   }   