# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
97082 | karlopuh | Telefoni (COCI17_telefoni) | C++14 | 51 ms | 460 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;
int n,d,cnt,rj;
int main(){
cin>>n>>d;
for(int i=0;i<n;i++){
int broj;
cin>>broj;
if(broj==0){
cnt++;
if(cnt==d){
rj++;
cnt=0;
}
}else{
cnt=0;
}
}
cout<<rj;
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |