#include <bits/stdc++.h>
#pragma GCC optimize("Ofast")
using namespace std;
enum { NONE, PROG, SPORT };
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  int n, p, s;
  cin >> n >> p >> s;
  vector<pair<pair<int, int>, int>> S(n);
  vector<int> C(n, NONE);
  for (int i = 0; i < n; ++i) {
    cin >> S[i].first.first;
    S[i].first.first *= -1;
  }
  for (int i = 0; i < n; ++i) cin >> S[i].first.second;
  for (int i = 0; i < n; ++i) S[i].second = i;
  int ans = 0;
  sort((S).begin(), (S).end());
  for (int j = 0; j < p; ++j) {
    C[j] = PROG;
    ans -= S[j].first.first;
  }
  for (int i = 0; i < n; ++i) S[i].first.first *= -1;
  int pt = 0;
  for (int k = 0; k < s; ++k) {
    while (pt < n && C[pt] != NONE) pt++;
    int best_delta = -6000;
    int best_index = -1;
    for (int i = 0; i < n; ++i) {
      int ind = i;
      int delta = -6000;
      if (C[ind] == NONE)
        delta = S[ind].first.second;
      else if (C[ind] == PROG)
        delta = S[ind].first.second - S[ind].first.first + S[pt].first.first;
      else
        continue;
      if (delta > best_delta) {
        best_delta = delta;
        best_index = ind;
      }
    }
    ans += best_delta;
    if (C[best_index] == PROG) {
      C[pt++] = PROG;
    }
    C[best_index] = SPORT;
  }
  vector<int> M(n), CC(n);
  for (int m = 0; m < n; ++m) {
    M[S[m].second] = C[m];
  }
  cout << ans << "\n";
  for (int l = 0; l < n; ++l)
    if (M[l] == PROG) cout << l + 1 << " ";
  cout << "\n";
  for (int l = 0; l < n; ++l)
    if (M[l] == SPORT) cout << l + 1 << " ";
}
