#include <bits/stdc++.h>
using namespace std;
const long long MXN = 3e3 + 10;
const long long MX5 = 3e5 + 10;
const long long MX6 = 1e6 + 10;
const long long LOG = 20;
const long long INF = 1e15;
const double eps = 1e-9;
const long long MOD = 1e9 + 7;
long long power(long long a, long long b, long long md) {
  return (!b ? 1
             : (b & 1 ? a * power(a * a % md, b / 2, md) % md
                      : power(a * a % md, b / 2, md) % md));
}
long long bmm(long long a, long long b) {
  return (a % b == 0 ? b : bmm(b, a % b));
}
string base2(long long n) {
  string a = "";
  while (n >= 2) {
    a += (char)(n % 2 + '0');
    n /= 2;
  }
  a += (char)(n + '0');
  reverse((a).begin(), (a).end());
  return a;
}
long long n, p, s, sum;
long long A[MXN], B[MXN];
bool mark[MXN], vis[MXN];
set<pair<long long, long long> > st;
vector<long long> v1, v2;
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  cin >> n >> p >> s;
  for (int i = 0; i < n; i++) cin >> A[i];
  for (int i = 0; i < n; i++) cin >> B[i];
  for (int i = 0; i < n; i++) st.insert({-A[i], i});
  for (int i = 0; i < p; i++) {
    auto itr = st.begin();
    mark[itr->second] = 1;
    st.erase(itr);
  }
  for (int i = 0; i < s; i++) {
    auto itr = st.begin();
    while (vis[itr->second]) {
      st.erase(itr);
      itr = st.begin();
    }
    long long maxi = -INF, id;
    for (int i = 0; i < n; i++) {
      if (vis[i]) continue;
      if (mark[i]) {
        if (B[i] - A[i] - itr->first > maxi) {
          maxi = B[i] - A[i] - itr->first, id = i;
        }
      } else {
        if (B[i] >= maxi) {
          maxi = B[i], id = i;
        }
      }
    }
    if (mark[id]) {
      mark[id] = 0, mark[itr->second] = 1;
      st.erase(itr);
    }
    v2.push_back(id);
    vis[id] = 1, sum += B[id];
  }
  for (int i = 0; i < n; i++)
    if (mark[i]) v1.push_back(i), sum += A[i];
  cout << sum << '\n';
  for (auto X : v1) cout << X + 1 << ' ';
  cout << '\n';
  for (auto X : v2) cout << X + 1 << ' ';
  cout << '\n';
  return 0;
}
