Source Code
#include <iostream>
using namespace std;
int main() {
  int t;
  cin>>t;
  for(int i=0;i<t;i++){
    int c=0;
    int n;
    cin>>n;
    int a[n];
    int b[n];
     for(int k=0;k<n;k++){
       cin>>a[k];}
     for(int z=0;z<n;z++){
       cin>>b[z];}
       for(int v=0;v<n;v++){
       int s=b[v]-a[v];
         if(s>c){
           c=s;}
        
       }
     cout<<c<<endl;}
     
  return 0;
       }
Copy
Garden Walls dalia tamimi
GNU G++17
180 ms
1.7 MB
Accepted