func_code_string: #include <bits/stdc++.h>   using namespace std;   inline int read() {     int sum = 0;     char c = getchar();     while (!isdigit(c)) c = getchar();     while (isdigit(c)) {       sum = (sum << 1) + (sum << 3) + (c ^ 48);       c = getchar();     }     return sum;   }   int n, k, a, m;   set<int> s;   set<int>::iterator it;   int main() {     n = read(), k = read(), a = read();     s.insert(0), s.insert(n + 1);     m = read();     int rest = (n + 1) / (a + 1);     if (rest < k) {       printf( 0 n );       return 0;     }     for (int i = 1; i <= m; i++) {       int x = read();       it = s.lower_bound(x);       int a1 = *it;       it--;       int a2 = *it;       int dist = a1 - a2 - 1, dist1 = x - a2 - 1, dist2 = a1 - x - 1;       int b = (dist + 1) / (a + 1), b1 = (dist1 + 1) / (a + 1),           b2 = (dist2 + 1) / (a + 1);       rest -= (b - (b1 + b2));       if (rest < k) {         printf( %d n , i);         return 0;       }       s.insert(x);     }     printf( -1 n );     return 0;   }   