Source Code
#include <iostream>
#include <algorithm>
using namespace std;

int n = 1000001;

int main() {
  int ans=0;
  int a[n];
  int b[n];
  int first, numberOfParts;
  cin >> first;
  cin >> numberOfParts;
  for (int i = 0; i < numberOfParts;i++){
    cin>>a[i];
  }
  for (int i=0;i<numberOfParts;i++){
    cin>>b[i];
    ans = max (ans , b[i]-a[i]);
  }

  cout<< ans <<endl;

  
}
Copy
Garden Walls King_Of_Asgard
GNU G++17
14 ms
8.0 MB
Wrong Answer