SHARE
TWEET

Индивидуальное задание для ОП №4

DmitryDAN Sep 21st, 2019 (edited) 72 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include <iostream>
  2.  
  3. int main()
  4. {
  5.     int N, i, min, minL = 0, minLC = 1;
  6.     std::cin >> N;
  7.     min = N;
  8.    
  9.     while (N != 0)
  10.     {
  11.         std::cin >> N;
  12.  
  13.         if (N != 0)
  14.         {
  15.             if (N < min)
  16.             {
  17.                 minLC++;
  18.  
  19.                 if (minLC > minL)
  20.                     minL = minLC;
  21.             }
  22.             else
  23.             {
  24.                 minLC = 1;
  25.             }
  26.  
  27.             min = N;
  28.         }
  29.     }
  30.  
  31.     std::cout << minL;
  32. }
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