# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
723503 | vjudge1 | Telefoni (COCI17_telefoni) | C++17 | 46 ms | 2472 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.
#pragma GCC optimize("Ofast")
#include <bits/stdc++.h>
#define S second
#define F first
#define ll long long
#define PB push_back
#define PF push_front
using namespace std;
signed main(){
ll n,d;
ll cont = 0;
cin >> n >> d;
vector<int>V;
for(ll i = 0;i < n;i++){
ll x;
cin >> x;
V.PB(x);
}
ll pos = 0;
for(pos = 0; pos < n ;pos){
if(V[pos] == 1){
pos++;
continue;
}
else{
pos += d;
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |