#include <bits/stdc++.h>
const long long inf = 0x3f3f3f3f3f3f3f3f;
const int maxn = 1e5 + 15;
const int maxm = 1e6 + 15;
long long w[6][5005], nxt[5005];
long long dist(int x, int y) {
  if (x > y) return abs(w[1][x] - w[1][y]) + w[4][x] + w[3][y];
  if (x < y) return abs(w[1][x] - w[1][y]) + w[5][x] + w[2][y];
}
int main() {
  int n, s, e;
  scanf("%d %d %d", &n, &s, &e);
  nxt[s] = e;
  for (int i = 1; i <= 5; i++)
    for (int j = 1; j <= n; j++) scanf("%I64d", w[i] + j);
  long long ans = dist(s, e), minn, pos, tmp;
  for (int i = 1; i <= n; i++) {
    minn = inf;
    if (i == s or i == e) continue;
    for (int xi = s; xi != e; xi = nxt[xi]) {
      tmp = dist(xi, i) - dist(xi, nxt[xi]) + dist(i, nxt[xi]);
      if (tmp < minn) {
        minn = tmp;
        pos = xi;
      }
    }
    nxt[i] = nxt[pos];
    nxt[pos] = i;
    ans += minn;
  }
  printf("%I64d\n", ans);
  return 0;
}
