func_code_string: #include <bits/stdc++.h>   using namespace std;   static const int maxn = 100012;   int K1, K2, K3;   int T1, T2, T3;   int N;   int C[maxn];   void Read() {     int i;     scanf( %d%d%d , &K1, &K2, &K3);     scanf( %d%d%d , &T1, &T2, &T3);     scanf( %d , &N);     for (i = 0; i < N; ++i) {       scanf( %d , &C[i]);     }   }   inline bool Greater(long long x, long long y) { return x > y; }   long long Result;   long long X[maxn];   long long Y[maxn];   long long Z[maxn];   void Work() {     int i;     Result = 0;     memset(X, 0, sizeof(X));     memset(Y, 0, sizeof(Y));     memset(Z, 0, sizeof(Z));     if (K1 > N) K1 = N;     if (K2 > N) K2 = N;     if (K3 > N) K3 = N;     make_heap(X, X + K1, Greater);     make_heap(Y, Y + K2, Greater);     make_heap(Z, Z + K3, Greater);     for (i = 0; i < N; ++i) {       long long t = C[i];       pop_heap(X, X + K1, Greater);       if (t < X[K1 - 1]) t = X[K1 - 1];       t += T1;       X[K1 - 1] = t;       push_heap(X, X + K1, Greater);       pop_heap(Y, Y + K2, Greater);       if (t < Y[K2 - 1]) t = Y[K2 - 1];       t += T2;       Y[K2 - 1] = t;       push_heap(Y, Y + K2, Greater);       pop_heap(Z, Z + K3, Greater);       if (t < Z[K3 - 1]) t = Z[K3 - 1];       t += T3;       Z[K3 - 1] = t;       push_heap(Z, Z + K3, Greater);       if (Result < t - C[i]) Result = t - C[i];     }   }   void Write() { printf( %I64d n , Result); }   int main() {     Read();     Work();     Write();     return 0;   }   