#include #include #include #include #define REP(a, b) for(int a=0; a<(int)b; a++) using namespace std; int main(){ int N, C, V; vector S, T, Y, M; map > > keiro; cin >> N >> C >> V; S.resize(V); T.resize(V); Y.resize(V); M.resize(V); REP(i,V) cin >> S[i]; REP(i,V) cin >> T[i]; REP(i,V) cin >> Y[i]; REP(i,V) cin >> M[i]; REP(i, V) keiro[S[i]][T[i]] = pair(Y[i], M[i]); int A[N+1][C+1]; REP(i, N+1){ REP(j, C+1){ A[i][j] = 0; } } for(int i=1; i