#include <bits/stdc++.h>   using namespace std;   const long long INF = 1e18 + 1;   const int MAX = 200001;   const long long MOD = 1000000007;   struct trio {     int first;     int second;     int third;   };   struct long_trio {     long long first;     long long second;     long long third;   };   double dist_point_line(int x1, int y1, int x2, int y2, int x3, int y3) {     double distance = abs((y3 - y1) * x2 - (x3 - x1) * y2 + x3 * y1 - x1 * y3) /                       (2 * sqrt((x3 - x1) * (x3 - x1) + (y3 - y1) * (y3 - y1)));     return distance;   }   double dist_point_point(int x1, int y1, int x2, int y2) {     double distance = sqrt((x1 - y1) * (x1 - y1) + (x2 - y2) * (x2 - y2));     return distance;   }   long long inq(long long k, long long q) {     if (q == 0) return 1;     long long l = inq(k, q / 2);     if (q % 2 == 0)       return l * l % MOD;     else       return l * l * k % MOD;   }   long long gcd(long long a, long long b) {     if (a < b) swap(a, b);     if (b == 0) return a;     return gcd(b, a % b);   }   long long cubr(long long a) {     long long l = -1, r = 1e6 + 2;     while (l < r - 1) {       long long mid = (l + r) / 2;       if (mid * mid * mid > a)         r = mid;       else         l = mid;     }     return l;   }   long long max(long long a, long long b) {     if (a > b) return a;     return b;   }   long long min(long long a, long long b) { return -1 * max(-a, -b); }   long long possible(long long q) {     if (q == INF) return -1;     return q;   }   bool correct(int x, int xx) {     if (x < 0) return 0;     if (x >= xx) return 0;     return 1;   }   long long dsumm(long long x) {     long long y = 1;     long long z = 0;     for (int i = 0; i < 18; i++) {       z += x / y % 10;       y *= 10;     }     return z;   }   int check_(vector<int> arr) {     for (int i = 0; i < arr.size(); i++) {       cout << arr[i] <<    ;     }     cout << endl;     return 0;   }   void perms(vector<int> perm, vector<int> used, int n, int k) {     if (k == 0) {       check_(perm);       return;     }     for (int i = 0; i < n; i++) {       if (used[i] == 0) {         used[i] = 1;         perm.push_back(i);         perms(perm, used, n, k - 1);         perm.pop_back();         used[i] = 0;       }     }     return;   }   void bins(vector<int> bin, int k) {     if (k == 0) {       check_(bin);       return;     }     bin.push_back(0);     bins(bin, k - 1);     bin.pop_back();     bin.push_back(1);     bins(bin, k - 1);     bin.pop_back();     return;   }   string months[12] = { January ,    February ,  March ,     April ,                         May ,        June ,      July ,      August ,                         September ,  October ,   November ,  December };   int days[12] = {31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31};   long long fact[13] = {1,    1,     2,      6,       24,       120,      720,                         5040, 40320, 362280, 3622800, 39916800, 479001600};   int cx[6] = {1, -1, 0, 0, 0, 0};   int cy[6] = {0, 0, 1, -1, 0, 0};   int cz[6] = {0, 0, 0, 0, 1, -1};   long long n, m, ans, l, r, k;   long long x[300000], abs_summ;   string s;   int main() {     cin >> n >> l >> r;     k = l + r;     for (int(i) = 0; (i) != (n); i++) {       cin >> x[i];     }     for (int(i) = 0; (i) != (n); i++) {       cin >> m;       x[i] = abs(x[i] - m);     }     sort(x, x + n);     reverse(x, x + n);     while (k > 0) {       x[0] = abs(x[0] - 1);       sort(x, x + n);       reverse(x, x + n);       k--;     }     m = 0;     for (int(i) = 0; (i) != (n); i++) {       m += x[i] * x[i];     }     cout << m;   }