#include using namespace std; using ll=long long; int main(){ ios::sync_with_stdio(false); cin.tie(nullptr); int N,M,K; cin>>N>>M>>K; vector C(N,0),A(M,0); for(int &i:C)cin>>i,--i; for(int &i:A)cin>>i; vector cost(M,0ll); for(int i=0;i