# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
147582 | AlexPascu007 | Telefoni (COCI17_telefoni) | C++98 | 77 ms | 392 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,x,dist,i,sol;
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... |