Ledger Nano X - The secure hardware wallet
SHARE
TWEET

owoslkkx

a guest Apr 7th, 2020 120 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. int m, n, a, b, c[100],i,j=1 ,st,dr,max=0,amax,bmax;
  2.     f >> m;
  3.     f >> n;
  4.     for (i = 1; i <= m; i++) {
  5.         f >> c[i];
  6.     }
  7.     f >> a;
  8.     while (c[j] < a)
  9.         j++;
  10.     st = j;
  11.     for (i = 2; i <= n; i++) {
  12.         f >> b;
  13.         j = st;
  14.         while (c[j] <= b)
  15.             j++;
  16.         dr = j - 1;
  17.         if ((dr - st + 1) > max)
  18.         {
  19.             max = dr - st + 1;
  20.             amax = a;
  21.             bmax = b;
  22.         }
  23.         a = b;
  24.         st = dr;
  25.     }
  26.     cout << amax << " " << bmax;
  27.  }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top