Submission #86357

#TimeUsernameProblemLanguageResultExecution timeMemory
86357AsagTelefoni (COCI17_telefoni)C++14
80 / 80
60 ms1916 KiB
#include <bits/stdc++.h> using namespace std; int n , m ,ans,cnt,a[300000 + 5],sum,num[300000 + 5]; int main() { cin>>n>>m; for(int i = 1; i <= n ;i ++) { cin>>a[i]; if(!a[i]) { cnt++; }else { ans+=cnt / m; cnt = 0; } }cout<<ans; }
#Verdict Execution timeMemoryGrader output
Fetching results...