func_code_string: #include <bits/stdc++.h>   using namespace std;   long long mod = 1e9 + 7;   long long INF = 1e7;   double EPS = 1e-12;   double tick() {     static clock_t oldt;     clock_t newt = clock();     double diff = 1.0 * (newt - oldt) / CLOCKS_PER_SEC;     oldt = newt;     return diff;   }   long long int powP(long long int a, long long int b) {     if (b == 0) return 1 % mod;     long long int k;     k = powP(a, b / 2);     k = k * k % mod;     if (b % 2 == 0)       return k;     else       return a * k % mod;   }   bool bitSet(long long int n, long long int i) {     if ((n & (1LL << i)) != 0)       return true;     else       return false;   }   long long int findGcd(long long int a, long long int b) {     if (a == 0)       return b;     else       return findGcd(b % a, a);   }   long long int A[700005], B[700005], C[700005];   int main() {     long long int T, i, n, m, p, j, l, e, r, b, c, k, q, a, d, w, x, y, v, z, t,         curr, prev, sum, ans, pos, val, countA, secondMin, indicator;     scanf( %lld , &n);     stack<int> S;     ans = 0;     S.push(0);     B[0] = INT_MAX;     for (long long int i = (1); i <= (n); ++i) {       scanf( %lld , &A[i]);       B[i] = 1;       while (!S.empty() && A[i] > A[S.top()]) {         B[i] = max(B[i], B[S.top()] + 1);         S.pop();       }       if (B[i] < INT_MAX) ans = max(ans, B[i]);       S.push(i);     }     printf( %lld n , ans);     return 0;   }   