# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
153839 | mirceaishere | Telefoni (COCI17_telefoni) | C++14 | 77 ms | 980 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 <iostream>
using namespace std;
int n, dist, i, x, NrZeroConsecutive, sol;
int main(){
cin>>n>>dist;
for(i=1; i<=n; i++){
cin>>x;
if(x==0){
NrZeroConsecutive++;
}else{
sol+=NrZeroConsecutive/dist;
NrZeroConsecutive=0;
}
}
cout<<sol;
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |