#40914: C++


glps1004@gmail.com (Ian)

學校 : 不指定學校
編號 : 272041
來源 : [101.9.186.158]
最後登入時間 :
2024-07-20 16:07:05
o076. 1. 特技表演 -- 2024年6月APCS | From: [101.9.186.127] | 發表日期 : 2024-06-17 17:27

#include<bits/stdc++.h>
using namespace std;
#define oo 1005
int main()
{
    int n;
    int last=oo,now;
    int ans=0,length=0;
    scanf("%d",&n);
    for(int i=0; i<n; i++)
    {
        scanf("%d", &now);
        if(now<last) length++,last=now,ans=max(ans,length);
        else length=1,last=now;
    }
    printf("%d\n",ans);
}

 
ZeroJudge Forum