提交时间:2023-11-25 10:59:33

运行 ID: 112211

# include <bits/stdc++.h> using namespace std ; int a [114514] ; int dp [114514] = { 1 } ; int main ( ) { long long n ; cin >> n ; int mx = 0 ; for ( int i= 1 ; i <= n ; i ++ ) { cin >> a [i] ; } for ( int i = 2 ; i <= n ; i ++ ) { if ( a [i] > a [i - 1] ) { dp [i] = dp [i - 1] + 1 ; } else { mx = max ( dp [i - 1] , mx ) ; dp [i] = 1 ; } } cout << mx ; return 0 ; }