#include <bits/stdc++.h>
using namespace std;
struct node {
  int x, id;
  int s[10];
  bool operator<(const node &rhs) const { return x > rhs.x; }
} a[100005];
int n, p, k;
long long dp[100005][130];
int main() {
  scanf("%d%d%d", &n, &p, &k);
  for (int i = 1; i <= n; i++) {
    scanf("%d", &a[i].x);
    a[i].id = i;
  }
  for (int i = 1; i <= n; i++)
    for (int j = 1; j <= p; j++) scanf("%d", &a[i].s[j]);
  sort(a + 1, a + 1 + n);
  memset(dp, -0x3f, sizeof(dp));
  dp[0][0] = 0;
  for (int i = 1; i <= n; i++)
    for (int j = 0; j < (1 << p); j++) {
      int cnt = 0;
      for (int l = 0; l < p; l++)
        if (j & (1 << l)) cnt++;
      dp[i][j] = dp[i - 1][j];
      if (i <= cnt + k) dp[i][j] = max(dp[i][j], dp[i - 1][j] + a[i].x);
      for (int l = 1; l <= p; l++) {
        if (j & (1 << (l - 1)))
          dp[i][j] = max(dp[i][j], dp[i - 1][j ^ (1 << (l - 1))] + a[i].s[l]);
      }
    }
  printf("%lld\n", dp[n][(1 << p) - 1]);
}
