zltzlt 发表于 2020-1-19 17:15:06

洛谷题目 P1567

// https://www.luogu.com.cn/problem/P1567

#include <iostream>
using namespace std;

int main()
{
    long n, a = {}, i, max = 1, t = 1;
    cin >> n;
    for (i = 0; i < n; i++)
      cin >> a;
    for (i = 1; i < n; i++)
    {
      if ((a > a))
      {
            t++;
      }
      else
      {
            if (max < t)
            {
                max = t;
            }
            t = 1;
      }
    }
    if (max < t)
      max = t;
    cout << max;
    return 0;
}
页: [1]
查看完整版本: 洛谷题目 P1567