func_code_string: #include <bits/stdc++.h>   using namespace std;   string ar;   string br;   int n = 0, lst = 0, lstmin = 0, lp = 0, lpc = 0;   int gzg = 0, rzg = 0, gzy2 = 0, rzy2 = 0;   int gzf = 0, gzc = 0, rzf = 0, rzc = 0;   int gzcc = 0, rzff = 0;   int main() {     int f = 0;     cin >> n;     ar.reserve(n + 1);     br.reserve(n + 1);     cin >> ar;     for (f = 0; f < n; f++) {       if (lst == lstmin) lpc++;       if (ar[f] ==  ( )         lst++;       else         lst--;       if (lst < lstmin) {         lstmin = lst;         lp = f + 1;         lpc = 0;       }     }     if (lst != 0) {       cout <<  0 n1 1 n ;       return 0;     }     rzg = lpc;     gzcc = lp;     rzff = lp;     for (f = lp; f < lp + n * 2 + 2; f++) {       if (ar[f % n] ==  ( )         lst++;       else         lst--;       switch (lst) {         case 0:           if (gzy2 <= gzg) {             gzy2 = gzg;             gzc = (gzcc + 1) % n + 1;             gzf = f % n + 1;           }           gzg = 0;           gzcc = f % n;           break;         case 1:           gzg++;           if (rzy2 <= rzg) {             rzy2 = rzg;             rzf = rzff % n + 1;             rzc = f % n + 1;           }           rzff = f % n + 1;           rzg = lpc;           break;         case 2:           rzg++;           break;       }     }     if (rzy2 >= gzy2 && rzy2 > lpc) {       cout << rzy2 <<   n  << rzf <<     << rzc <<   n ;     } else if (gzy2 > rzy2 && gzy2 > lpc) {       cout << gzy2 <<   n  << gzf <<     << gzc <<   n ;     } else {       cout << lpc <<   n1 1 n ;     }     return 0;   }   