func_code_string: #include <bits/stdc++.h>   using namespace std;   int main() {     int n, m, s, f, i;     cin >> n >> m >> s >> f;     long long t;     map<long long, pair<int, int>> h;     pair<int, int> R;     for (i = 0; i < m; i++) {       cin >> t >> R.first >> R.second;       h[t] = R;     }     i = 1;     if (s < f)       while (s != f) {         if (h.find(i) == h.end()) {           cout <<  R ;           s++;         } else {           if ((h[i].first <= s && s <= h[i].second) ||               (h[i].first <= s + 1 && s + 1 <= h[i].second)) {             cout <<  X ;           } else {             cout <<  R ;             s++;           }         }         i++;       }     else {       while (s != f) {         if (h.find(i) == h.end()) {           cout <<  L ;           s--;         } else {           if ((h[i].first <= s && s <= h[i].second) ||               (h[i].first <= s - 1 && s - 1 <= h[i].second)) {             cout <<  X ;           } else {             cout <<  L ;             s--;           }         }         i++;       }     }   }   