Source Code
#include<iostream>
#include<vector>

using namespace std;

int main(){
    
    int t;
    cin >> t;
    
    while(t--){
        int n;
        cin>>n;
        vector<int> a(n), b(n);
        for(auto&x: a){
            cin >> x;
            
        }
        for(auto&x:b){
            cin >> x;
        }
        int mx = 0;
        for(int i = 0; i < n;i++){
            int res = a[i] - b[i];
            
            if (mx < res){
                mx = res;
            }
        }
        cout << mx << '\n';
        
    }
    return 0;
    
}
Copy
Garden Walls iyaad
GNU G++17
2 ms
244 KB
Wrong Answer