# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
75047 | 2018-09-08T06:43:05 Z | charlies_moo | Telefoni (COCI17_telefoni) | C++17 | 58 ms | 2116 KB |
#include <iostream> using namespace std; int main() { int n, d; cin >> n >> d; int lt; int c = 0; for (int i = 0; i < n; i++) { int a; cin >> a; if (a == 1) { lt = a; } else if (i - lt == d) { lt = i; c++; } } cout << c << endl; return 0; }
Compilation message
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Incorrect | 2 ms | 376 KB | Output isn't correct |
2 | Incorrect | 2 ms | 508 KB | Output isn't correct |
3 | Incorrect | 2 ms | 508 KB | Output isn't correct |
4 | Incorrect | 2 ms | 508 KB | Output isn't correct |
5 | Incorrect | 2 ms | 508 KB | Output isn't correct |
6 | Incorrect | 2 ms | 508 KB | Output isn't correct |
7 | Incorrect | 2 ms | 540 KB | Output isn't correct |
8 | Incorrect | 58 ms | 1064 KB | Output isn't correct |
9 | Incorrect | 57 ms | 1468 KB | Output isn't correct |
10 | Incorrect | 56 ms | 2116 KB | Output isn't correct |