# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
147820 | mariadinca | Telefoni (COCI17_telefoni) | C++14 | 76 ms | 888 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, d, i, x, sol, dist;
int main(){
cin>>n>>d;
for(i=1;i<=n;i++){
cin>>x;
if(x == 1)
dist = 0;
else
dist++;
if(dist == d){
sol++;
dist = 0;
}
}
cout<<sol;
return 0;
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |