func_code_string: #include <bits/stdc++.h>   using namespace std;   const int maxn = 345;   int ai[maxn];   int bi[maxn];   bool used[maxn];   int m, r, t;   void init() {     for (int i = 1; i <= m; i++) {       scanf( %d , &ai[i]);       ai[i]++;     }   }   vector<int> V;   void play() {     memset(bi, 0, sizeof(bi));     memset(used, 0, sizeof(used));     V.clear();     if (t < r) {       printf( -1 n );       return;     }     long long sum = 0;     for (int i = 1; i <= m; i++) {       int st = 0;       while (bi[ai[i]] < r) {         for (int j = ai[i] - st; j <= ai[i] - st + t - 1; j++) {           if (j <= 0 || j > 320) continue;           bi[j]++;         }         sum++;         st++;       }     }     printf( %I64d n , sum);   }   int main() {     while (scanf( %d%d%d , &m, &t, &r) != EOF) {       init();       play();     }     return 0;   }   