제출 #1125539

#제출 시각아이디문제언어결과실행 시간메모리
1125539ElayV13Infinite Race (EGOI24_infiniterace2)C++20
0 / 100
11 ms328 KiB
#include <bits/stdc++.h> using namespace std; #define int long long #define ld double #define FOR(L , R) for(int i = L;i <= R;i++) const int INF = 1e18; const int sz = 2e5 + 5; const int usz = 1e6 + 5; const int mod = 998244353; signed main() { ios_base::sync_with_stdio(0); cin.tie(0); int n ,q ; cin >> n >> q; int maks = -1; int cnt = 0; for(int i = 0;i < q;i++) { int x; cin >> x; if(x == 1){ cnt++; maks = max(maks , cnt); } else cnt = 0; } cout << max(0LL , maks - 1) << endl; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...