#include <iostream>
#define lll long long int
using namespace std;

lll max(lll a, lll b) {
    if(a > b) return a;
    return b;
}

lll dp[200000],
    c[200000],
    a[200000],
    b[200000], n;

void qry() {
    cin >> n;
    for(int i = 0; i < n; i++) cin >> c[i];
    for(int i = 0; i < n; i++) cin >> a[i];
    for(int i = 0; i < n; i++) cin >> b[i];
    lll ma = 0;
    for(int i = 0; i < n; i++) {
        if(a[i] == -1 || b[i] == -1) {
            dp[i] = 0;
            continue;
        }
        lll x = abs(a[i] - b[i]);
        if(x == 0) dp[i] = c[i] + 1 + x;
        else dp[i] = c[i] + 1 + max(dp[i - 1] - x, x);
        if(dp[i] > ma) ma = dp[i];
    }
    cout << ma << '\n';
}

int main() {
    int t;
    cin >> t;
    for(int i = 0; i < t; i++) qry();
    return 0;
}