#include <bits/stdc++.h>
using namespace std;
bool debug = false;
int n, m, k;
int dx[4] = {0, 1, 0, -1}, dy[4] = {1, 0, -1, 0};
int a[100005], l, s, r, ri[100005];
long long ss, tmp, ans;
struct Ans {
  long long val = -1;
  vector<int> v;
  void pp(bool rv) {
    printf("%lld\n", val);
    for (int c : v) printf("%d ", rv ? n + 1 - c : c);
    exit(0);
  }
} A, B;
long long d[100005], b[100005], c[100005];
bool cmp(int x, int y) { return d[x] < d[y]; }
void cal(Ans &rev) {
  for (int i = 1; i < n; i++) d[i] = a[i + 1] - a[i];
  memset(b, 0, sizeof(b));
  memset(c, 0, sizeof(c));
  long long v = 0, u = 0, w = 0;
  if (l < s - 1) {
    for (int i = 1; i < l; i++) rev.v.push_back(s - i);
    for (int i = l + 1; i <= s; i++) rev.v.push_back(i - l);
    for (int i = s + 1; i <= n; i++) rev.v.push_back(i);
  } else {
    for (int i = s + 1; i < n; i++) b[i - s] = i;
    sort(b + 1, b + 1 + n - 1 - s, cmp);
    int k = l - (s - 1), j = k;
    for (int i = 1; i <= k; i++) {
      c[b[i]] = 1;
      u += 2 * d[b[i]];
    }
    v = u;
    w = 0;
    for (int i = 1; i <= k; i++) {
      if (c[n - i] > 0) {
        u -= d[n - i];
        c[n - i] = -i;
      } else {
        for (; c[b[j]] <= 0 && j; j--)
          ;
        u += d[n - i] - 2 * d[b[j]];
        c[b[j--]] = -i;
      }
      if (u < v) {
        v = u;
        w = i;
      }
    }
    for (int i = 2; i <= s; i++) {
      rev.v.push_back(s - i + 1);
    }
    for (int i = s + 1; i < n - w; ++i)
      if (c[i] < -w) {
        int ti = i;
        for (++i; c[i] < -w; ++i)
          ;
        rev.v.push_back(i);
        for (int tj = i - 1; tj >= ti; --tj) rev.v.push_back(tj);
      } else
        rev.v.push_back(i);
    for (int i = 0; i <= w; ++i) rev.v.push_back(n - i);
  }
  rev.val = v + a[n] + a[s];
}
int main() {
  scanf("%d%d%d", &n, &l, &s);
  r = n - 1 - l;
  for (int i = 1; i <= n; i++) {
    scanf("%d", &a[i]);
  }
  if ((s != 1 && l == 0) || (s != n && r == 0)) {
    puts("-1");
    return 0;
  }
  if (l == 0) {
    A.val = a[n];
    for (int i = 2; i <= n; i++) A.v.push_back(i);
    A.pp(0);
  } else if (r == 0) {
    A.val = a[n];
    for (int i = n - 1; i >= 1; i--) A.v.push_back(i);
    A.pp(0);
  }
  cal(A);
  s = n + 1 - s;
  swap(l, r);
  reverse(a + 1, a + n + 1);
  for (int i = n; i; --i) a[i] = a[1] - a[i];
  cal(B);
  if (A.val < B.val) {
    A.pp(0);
  } else
    B.pp(1);
  return 0;
}
