func_code_string: #include <bits/stdc++.h>   using namespace std;   const int MAX_N = 100010;   const int INF = 1000000;   int n;   stack<int> killers;   int main() {     cin >> n;     int values[n + 1], life[n + 1];     for (int i = 1; i <= n; ++i) {       cin >> values[i];     }     life[0] = INF;     values[0] = 0;     killers.push(0);     for (int i = 1; i <= n; ++i) {       life[i] = 1;       while (killers.size() && values[i] > values[killers.top()]) {         life[i] = max(life[i], life[killers.top()] + 1);         killers.pop();       }       killers.push(i);     }     int sol = 0;     for (int i = 1; i <= n; ++i) {       if (life[i] < INF) {         sol = max(sol, life[i]);       }     }     cout << sol << endl;     return 0;   }   