#include using namespace std; int main() { int T; cin >> T; while (T--) { int N, M; cin >> N >> M; vector L(N); for (int i = 0; i < N; ++i) { cin >> L[i]; } vector F(M), B(M), W(M); for (int i = 0; i < M; ++i) { cin >> F[i]; } for (int i = 0; i < M; ++i) { cin >> B[i]; } for (int i = 0; i < M; ++i) { cin >> W[i]; } long long sun_strength = 0, total_moves = 0; for (int i = 0; i < M; ++i) { if (F[i] <= L[0]) { sun_strength += B[i]; } else { sun_strength += W[i]; } } long long max_magic = sun_strength; for (int i = 1; i < N; ++i) { long long new_sun_strength = sun_strength; for (int j = 0; j < M; ++j) { if (F[j] <= L[i]) { new_sun_strength += B[j]; } else { new_sun_strength += W[j]; } } long long moves = abs(L[i] - L[i - 1]); max_magic = max(max_magic, new_sun_strength - moves); sun_strength = new_sun_strength; total_moves += moves; } cout << max_magic - total_moves << endl; } return 0; }