#include <bits/stdc++.h>
#define REP(i,s,n) for(int i=s;i<n;++i)
#define rep(i,n) REP(i,0,n)
using namespace std;
const int MAX_V= 1005,MAX=1e9;
 
struct edge{
  int to,cap,cost,rev;
  edge(int to,int cap,int cost,int rev) :
    to(to),cap(cap),cost(cost),rev(rev) {}
};
  
vector<edge> G[MAX_V];
int dist[MAX_V];
int prevv[MAX_V],preve[MAX_V];
  
void add_edge(int from,int to,int cap,int cost){
  G[from].push_back(edge(to,cap,cost,G[to].size()));
  G[to].push_back(edge(from,0,-cost,G[from].size()-1));
}

int min_cost_flow(int s,int t,int f){
  int res = 0;
  while(f>0){
    fill(dist,dist+MAX_V,MAX); dist[s] = 0;
    bool update=true;
    while(update){
      update=false;
      for(int v=0; v<MAX_V; v++){
        if(dist[v]==MAX) continue;
        for(int i=0; i<(int)G[v].size(); i++){
          edge &e=G[v][i];
          if(e.cap>0 && dist[e.to]>dist[v]+e.cost){
            dist[e.to]=dist[v]+e.cost;
            prevv[e.to]=v; preve[e.to]=i; update=true;
          }
        }
      }
    }
    if(dist[t]==MAX) return -1;
    int d = f;
    for(int v=t; v!=s; v=prevv[v]){
      d=min(d,G[prevv[v]][preve[v]].cap);
    }
    f-=d;res+=d*dist[t];
    for(int v=t; v!=s; v=prevv[v]){
      edge &e=G[prevv[v]][preve[v]];
      e.cap-=d;G[v][e.rev].cap+=d;
    }
  }
  return res;
}
 
int main() {
  int n,m,k;
  cin >> n >> m >> k;
  int a[n],ans=0;
  for(int i=0; i<n; i++) {
    cin >> a[i];
    ans+=a[i];
    add_edge(1000,i,1,0);
    add_edge(i,1002,1,0);
  }
  add_edge(1002,1001,1<<29,0);
  for(int j=0; j<m; j++) {
    for(int i=0,x; i<n; i++) {
      cin >> x;
      add_edge(i,j+n,1,min(0,a[i]-x));
    }
  }
  for(int i=0,x; i<m; i++) {
    cin >> x;
    add_edge(i+n,1001,x,0);
  }
  cout << ans-min_cost_flow(1000,1001,n-k) << endl;
  return 0;
}
