Source Code
#include <bits/stdc++.h>
#define ll long long
#define rt(x) return cout<<x,0;
#define all(x) x.begin(),x.end()
#define youssif ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);
#define ld long double
using namespace std;
ll arr[200005],arrr[100005];
int main()
{
    youssif
    ll x=100,y,z,a=0,b,i,j,t,cur=0;
    static int idx=1;
    char aa,bb;
    string s,ss;
    cin>>t;
    while(t--)
    {
        cin>>x;
        for(i=0;i<x;i++)
        {
            cin>>arr[i];
        }
        ll mx=0;
        for(i=0;i<x;i++)
        {
            cin>>z;
            mx=max(mx,z-arr[i]);
        }
        cout<<mx<<endl;
    }
    return 0;
}
/*


*/
Copy
Garden Walls youssif12323
GNU G++17
70 ms
1.9 MB
Accepted