#include <bits/stdc++.h>
using namespace std;
const int N = 3050;
int n, p, s;
int sump[N], sum[N];
struct Student {
  int a, b, id;
  void input() { scanf("%d%d", &a, &b); }
  bool operator<(const Student &student) const {
    return b - a < student.b - student.a;
  }
} data[N];
void del() {
  sort(data + 1, data + n + 1);
  sum[0] = 0;
  sump[0] = 0;
  for (int i = 1; i <= n; i++) {
    sump[i] = sump[i - 1] + data[i].a;
    sum[i] = sum[i - 1] + data[i].b - data[i].a;
  }
  int id = -1, ans = 0;
  for (int i = 1; i <= n; i++) {
    int cur;
    if (i <= p)
      cur = sump[n] + sum[n] - sum[p + 1] - data[i].a;
    else
      cur = sump[n] + sum[n] - sum[p] - data[i].b;
    if (cur > ans) {
      ans = cur;
      id = i;
    }
  }
  swap(data[id], data[n]);
  n--;
}
void solve() {
  for (int i = 1; i <= n; i++) scanf("%d", &data[i].a);
  for (int i = 1; i <= n; i++) scanf("%d", &data[i].b);
  for (int i = 1; i <= n; i++) data[i].id = i;
  int k = n - p - s;
  for (int i = 0; i < k; i++) del();
  sort(data + 1, data + n + 1);
  int ans = 0;
  for (int i = 1; i <= p; i++) ans += data[i].a;
  for (int i = p + 1; i <= n; i++) ans += data[i].b;
  printf("%d\n", ans);
  for (int i = 1; i <= p; i++) printf("%d ", data[i].id);
  puts("");
  for (int i = p + 1; i <= n; i++) printf("%d ", data[i].id);
  puts("");
}
int main() {
  while (scanf("%d%d%d", &n, &p, &s) != EOF) solve();
  return 0;
}
