| # | Time | Username | Problem | Language | Result | Execution time | Memory | 
|---|---|---|---|---|---|---|---|
| 522149 | gghx | Telefoni (COCI17_telefoni) | C++14 | 19 ms | 840 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;
#define ll long long
int main(){
  ios::sync_with_stdio(0);
  cin.tie(0);
  ll n,d;
  cin>>n>>d;
  ll cur=0,count=0,ans=0;
  for(int i=0;i<n;i++){
    bool x;
    cin>>x;
    if(x==1){
      cur=i;
    }
    else{
      count++;
      if(count==d){
        count=0;
        cur=i;
        ans++;
      }
    }
  }
  cout<<ans;
}
Compilation message (stderr)
| # | Verdict | Execution time | Memory | Grader output | 
|---|---|---|---|---|
| Fetching results... | ||||
