Run ID Author Problem Lang Verdict Time Memory Code Length Submit Time
54970 张思存 最长平台 C++ Time Limit Exceeded 1000 MS 232 KB 363 2024-11-01 15:46:02

Tests(0/1):


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


Judgement Protocol: