# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
880575 | vjudge1 | Telefoni (COCI17_telefoni) | C++17 | 35 ms | 3016 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <bits/stdc++.h>
#define ll long long
#define PB push_back
#define S second
#define F first
#define PF push_front
using namespace std;
/*
7
3 5 1 6 2 14 10
*/
int main()
{
//freopen("div7.in", "r" , stdin);
//freopen("div7.out", "w" , stdout);
int n, m;
cin >> n >> m;
vector<int>V;
for(int i = 0; i < n; i++){
int x;
cin >> x;
V.PB(x);
}
ll cnt=0;
for(int i = 0; i < n; i++){
if(V[i] == 1){
continue;
}
else{
i+=m;
cnt++;
}
}
cout << cnt;
return 0;
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |