Source Code
#include <bits/stdc++.h>

using namespace std;

int main()
{
    cin.tie(nullptr);
    cout.tie(nullptr);
    ios_base::sync_with_stdio(0);
    int tt;
    cin >> tt;
    while(tt--)
    {
        int n,op=0;
        cin >> n;
        int wall[n],chil[n];
        for(int i = 0;i<n;cin >> wall[i++]);
        for(int i=0;i<n;cin >> chil[i++]);
        for(int i= 0;i<n;i++)
        {
            op=max(op,chil[i]-wall[i]);
        }
        cout << op << endl;
    }
    return 0;
}
Copy
Garden Walls Mohamedmaher
GNU G++17
46 ms
2.6 MB
Accepted