Advertisement
Guest User

Untitled

a guest
Jan 29th, 2020
100
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.31 KB | None | 0 0
  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. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement