#include <bits/stdc++.h>
using namespace std;
const int mn = 201000;
int a[mn], b[mn], ans1[mn], ans2[mn], rk[mn], p[mn], t[mn];
int n, st, L, i;
long long res1, res2;
int f[mn], o[mn], len;
bool del[mn];
priority_queue<pair<int, int> > Q;
pair<int, int> v[mn];
void print(long long res, int *ans) {
  int i;
  printf("%I64d\n", res);
  printf("%d", ans[1]);
  for (i = 2; i <= n - 1; ++i) printf(" %d", ans[i]);
  printf("\n");
  return;
}
int get(int v) {
  int res = 0, i = 1, l = len / 2;
  for (; l; l >>= 1)
    if (o[i + l - 1] <= v) {
      v -= o[i + l - 1], res += f[i + l - 1];
      i += l;
    }
  return res;
}
void add(int *f, int p, int v) {
  for (; p <= len; p += p & (-p)) f[p] += v;
}
long long solve(int *x, int n, int L, int s, int *ans) {
  int tt = 0, R = n - 1 - L, i, j, last;
  long long res, sum, minv;
  if (R <= n - s) {
    for (i = n - R + 1; i <= n; ++i) ans[++tt] = i;
    for (i = n - R; i >= s + 1; --i) ans[++tt] = i;
    for (i = s - 1; i >= 0; --i) ans[++tt] = i;
    res = (long long)2 * x[n] - x[1] - x[s];
    return res;
  }
  for (i = s + 1; i <= n; ++i) ans[++tt] = i;
  res = x[n] - x[s];
  minv = 1LL << 60, sum = 0;
  R -= n - s, x[s] = x[n], last = n = s;
  for (len = 1; len < n; len <<= 1)
    ;
  for (i = 1; i <= n - 2; ++i) v[i] = make_pair(x[i + 1] - x[i], i + 1);
  sort(v + 1, v + n - 1);
  for (i = 1; i <= n - 2; ++i) rk[v[i].second] = i;
  for (i = n - 1; i >= 1; --i) {
    t[i] = max(0, R - i + 1);
    sum = get(t[i]);
    if (x[i] - x[1] + sum * 2 < minv) {
      minv = x[i] - x[1] + sum * 2;
      last = i;
    }
    if (i > 1) add(o, rk[i], 1), add(f, rk[i], x[i] - x[i - 1]);
  }
  memset(del, 0, sizeof del);
  for (i = last - (R - t[last]) + 1; i <= last; ++i) del[i] = 1;
  int cnt = 0;
  for (i = last + 1; i <= n - 1; ++i) v[++cnt] = make_pair(x[i] - x[i - 1], i);
  sort(v + 1, v + 1 + cnt);
  for (i = 1; i <= t[last]; ++i) del[v[i].second] = 1;
  for (i = n - 1; i >= last + 1; --i) {
    if (del[i]) continue;
    ans[++tt] = i;
    for (j = i + 1; del[j]; ++j) ans[++tt] = j;
  }
  for (i = last - 1; i >= 1; --i)
    if (!del[i]) ans[++tt] = i;
  for (i = 2; i <= last - 1; ++i)
    if (del[i]) ans[++tt] = i;
  ans[++tt] = last;
  return res + minv + x[n] - x[1];
}
int main() {
  scanf("%d%d%d", &n, &L, &st);
  for (i = 1; i <= n; ++i) scanf("%d", a + i);
  if ((st != 1 && L == 0) || (st != n && L == n - 1)) {
    printf("-1\n");
    return 0;
  }
  for (i = 1; i <= n; ++i) b[i] = -a[n - i + 1];
  res1 = solve(a, n, L, st, ans1);
  res2 = solve(b, n, n - 1 - L, n - st + 1, ans2);
  if (res1 < res2)
    print(res1, ans1);
  else {
    for (i = 1; i <= n; ++i) ans2[i] = n - ans2[i] + 1;
    print(res2, ans2);
  }
  return 0;
}
