#include <bits/stdc++.h>
using namespace std;
const int N = 3000 + 10;
int n, pnum, snum, x;
vector<long long> p[N];
int s[N], p1[N];
int main() {
  cin >> n >> pnum >> snum;
  for (int i = 0; i < n; i++) {
    cin >> x;
    p1[i] = x;
    p[i].push_back(x);
    p[i].push_back(i);
  }
  for (int i = 0; i < n; i++) cin >> s[i];
  int a[N] = {0};
  sort(p, p + n);
  for (int i = n - 1; i > n - 1 - pnum; i--) a[p[i][1]] = 1;
  int c[N];
  for (int i = 0; i < snum; i++) {
    memset(c, 0, sizeof(c));
    int y, yp;
    for (int j = n - 1; j > -1; j--)
      if (a[p[j][1]] == 0) {
        y = p[j][1];
        yp = p[j][0];
        break;
      }
    for (int t = 0; t < n; t++) {
      if (a[t] == 0) c[t] = s[t];
      if (a[t] == 1) c[t] = s[t] - p1[t] + yp;
    }
    int mx = 0, mxi;
    for (int j = 0; j < n; j++)
      if (c[j] > mx) {
        mxi = j;
        mx = c[j];
      }
    if (a[mxi] == 1) a[y] = 1;
    a[mxi] = 2;
  }
  int ans = 0;
  for (int i = 0; i < n; i++)
    if (a[i] == 1)
      ans += p1[i];
    else if (a[i] == 2)
      ans += s[i];
  cout << ans << '\n';
  for (int i = 0; i < n; i++)
    if (a[i] == 1) cout << i + 1 << ' ';
  cout << '\n';
  for (int i = 0; i < n; i++)
    if (a[i] == 2) cout << i + 1 << ' ';
  return 0;
}
