# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
211794 | origami100 | Telefoni (COCI17_telefoni) | C++11 | 72 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 <bits/stdc++.h>
using namespace std;
int main(){
int n, m;
cin >> n >> m;
int pre = 0, cnt= 0;
for(int i = 0; i < n; i++){
int a;
cin >> a;
if(a == 1) pre = 0;
else pre++;
if(pre >= m){
cnt++;
pre = 0;
}
}
cout << cnt;
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |