func_code_string: #include <bits/stdc++.h>   using namespace std;   int main() {     int n, *animals, i, j, temp;     bool turn = 0;     cin >> n;     animals = new int[n];     for (i = 0; i < n; i++) cin >> animals[i];     vector<pair<int, int> > segmant;     pair<int, int> seg;     for (i = 0; i < (n - 1); i++) {       if (animals[i] > animals[i + 1]) {         turn = 1;         seg.first = (i + 1);         temp = animals[i];         animals[i] = animals[i + 1];         animals[i + 1] = temp;         i += 2;         for (j = i; j < n - 1; j++) {           if (animals[j] > animals[j + 1]) {             temp = animals[j];             animals[j] = animals[j + 1];             animals[j + 1] = temp;             j++;             continue;           } else {             break;           }         }         seg.second = j;       }       if (turn == true) {         segmant.push_back(seg);         i = -1;         turn = 0;       }     }     for (i = 0; i < segmant.size(); i++) {       cout << segmant[i].first <<     << segmant[i].second << endl;     }     return 0;   }   