SHARE
TWEET

Untitled

a guest Jan 29th, 2020 69 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include <fstream>
  2. using namespace std;
  3.  
  4. ifstream f("platou2.in");
  5. ofstream g("platou2.out");
  6.  
  7. int main()
  8. {
  9.     int t,a,b,i,n,Max=0,k=1,x,y;
  10.     f>>n>>x;
  11.     for(i=2;i<=n;i++)
  12.     {
  13.         f>>y;
  14.         if(y>x) k++;
  15.         else {Max=k;k=1;}
  16.     }
  17.     if(k>Max) Max=k;
  18.     g<<Max;
  19.     return 0;
  20. }
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