# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
521893 | safaricola | Telefoni (COCI17_telefoni) | C++17 | 58 ms | 816 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include<bits/stdc++.h>
using namespace std;
long long n, ans, a[3000010],d,cnt;
bool b;
int main(){
cin>>n>>d;
for(int i=0; i<n; i++){
cin>>b;
if(b){
cnt=0;
continue;
}
cnt++;
if(cnt>=d){
ans++;
cnt=0;
}
}
cout<<ans;
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |