# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
241333 | Shadow_Rider | Telefoni (COCI17_telefoni) | C++14 | 63 ms | 512 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;
typedef long long ll;
int main() {
int n, d;
cin >> n >> d;
int count = 0;
int ans = 0;
for (int i = 0; i < n; i++) {
int cur;
cin >> cur;
if (cur == 0) {
count++;
} else {
count = 0;
}
if (count >= d) {
ans++;
count = 0;
}
}
cout << ans << endl;
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |