#include <iostream>
#include <algorithm>
#include <vector>
#include <map>
#include <set>
#include <string>

using namespace std;
typedef long long ll;
#define rep(i,n) for(int i=0;i<n;i++)
#define pb push_back


int main() {
    ios_base::sync_with_stdio(0);
    cin.tie(0);
    int t;
    cin >> t;
    for(;t;t--){
        int n;
        cin >> n;
        vector<int>c(n);
        rep(i,n)cin>>c[i];
        vector<int>a(n),b(n);
        rep(i,n){
            cin>>a[i];
        }
        rep(i,n){
            cin>>b[i];
        }
        ll ans = 0;
        vector<ll>cur;
        set<ll>dd;
        vector<ll>add(n);
        for(int i = 0; i < n - 1; i++) {
            add[i+1] = add[i];
            if(a[i+1]<b[i+1]){
                add[i+1]+=a[i+1]-1+c[i]-b[i+1];
            } else {
                add[i+1]+=b[i+1]-1+c[i]-a[i+1];
            }
        }
        rep(i,n){
            if(a[i] == b[i] && i != 0) {
                dd.clear();
                dd.insert(- 2 *(i - 1)-add[i]);
            }   
            if(a[i]!=b[i]){
                dd.insert(abs(a[i]-b[i])-2*(i-1)-add[i]);
            }
            if(dd.size()){
                ans=max(ans,c[i]-1+2 * i + (*(--dd.end()))+add[i]);
            }
            
        }
        cout << ans << "\n";
    }

    return 0;
}