#include <bits/stdc++.h>
using namespace std;
long long n, L, P, st;
const long long INF = 1000000000000000000;
struct przedzial {
  long long dl, nr;
};
struct node {
  long long il, s;
};
vector<node> T;
long long l, size;
void Stworz(long long n) {
  T.clear();
  long long p = 1;
  while (p < n) p *= 2;
  l = p;
  size = 2 * p - 1;
  for (int i = 0; i <= size; ++i) T.push_back({0, 0});
}
void Dodaj(long long a, long long x) {
  a += l;
  T[a] = {1, x};
  a /= 2;
  while (a != 0) {
    T[a] = {T[2 * a].il + T[2 * a + 1].il, T[2 * a].s + T[2 * a + 1].s};
    a /= 2;
  }
}
long long MinSum(long long ile) {
  long long a = 1;
  while (2 * a <= size) {
    if (T[2 * a].il >= ile)
      a = 2 * a;
    else {
      ile -= T[2 * a].il;
      a = 2 * a + 1;
    }
  }
  long long b = a;
  a = l;
  long long s = T[a].s;
  if (a != b) s += T[b].s;
  while (a / 2 != b / 2) {
    if (a % 2 == 0) s += T[a + 1].s;
    if (b % 2 == 1) s += T[b - 1].s;
    a /= 2;
    b /= 2;
  }
  return s;
}
bool por(przedzial a, przedzial b) {
  if (a.dl < b.dl) return true;
  if (a.dl > b.dl) return false;
  return a.nr < b.nr;
}
long long Wyn(vector<long long> x, vector<long long> c) {
  long long wyn = 0;
  for (int i = 1; i < n; ++i) wyn += abs(x[c[i]] - x[c[i - 1]]);
  return wyn;
}
vector<long long> WPrawo(vector<long long> x) {
  vector<przedzial> prze;
  for (int i = st + 1; i < n - 1; ++i) prze.push_back({x[i + 1] - x[i], i});
  sort(prze.begin(), prze.end(), por);
  vector<long long> nr(prze.size());
  for (int i = 0; i < prze.size(); ++i) nr[prze[i].nr - (st + 1)] = i;
  Stworz(prze.size());
  long long minDl = INF, minMe;
  for (int me = st + 1; me < n; ++me) {
    if (me - st - 2 >= 1) Dodaj(nr[me - 2 - (st + 1)], x[me - 1] - x[me - 2]);
    long long minL = 0, maxL;
    if (st != 0) ++minL;
    if (me != n - 1) ++minL;
    maxL = st + (n - 1 - me) + max((long long)0, me - st - 2);
    if (L < minL || L > maxL) continue;
    long long dl = 2 * (x[n - 1] - x[0]) - (x[me] - x[st]);
    if (L > st + (n - 1 - me)) dl += 2 * MinSum(L - (st + n - 1 - me));
    if (dl < minDl) {
      minDl = dl;
      minMe = me;
    }
  }
  vector<long long> path;
  if (minDl == INF) return path;
  prze.clear();
  for (int i = st + 1; i <= minMe - 2; ++i)
    prze.push_back({x[i + 1] - x[i], i});
  sort(prze.begin(), prze.end(), por);
  long long lt = L;
  long long ileL, ileP, ileS;
  ileL = min(st, lt);
  lt -= ileL;
  ileP = min(n - 1 - minMe, lt);
  lt -= ileP;
  ileS = lt;
  vector<long long> kier(n, 1);
  for (int i = 0; i < ileS; ++i) kier[prze[i].nr] = -1;
  path.push_back(st);
  if (st != 0) {
    for (int i = st - 1; i > st - ileL; --i) path.push_back(i);
    for (int i = 0; i <= st - ileL; ++i) path.push_back(i);
  }
  for (int l = st + 1; l < minMe;) {
    long long p = l;
    while (kier[p] == -1) ++p;
    for (int i = p; i >= l; --i) path.push_back(i);
    l = p + 1;
  }
  for (int i = minMe + ileP; i < n; ++i) path.push_back(i);
  for (int i = minMe + ileP - 1; i >= minMe; --i) path.push_back(i);
  return path;
}
vector<long long> WLewo(vector<long long> x) {
  vector<przedzial> prze;
  for (int i = st - 1; i > 0; --i) prze.push_back({x[i] - x[i - 1], i});
  sort(prze.begin(), prze.end(), por);
  vector<long long> nr(prze.size());
  for (int i = 0; i < prze.size(); ++i) nr[st - 1 - prze[i].nr] = i;
  Stworz(prze.size());
  long long minDl = INF, minMe;
  for (int me = st - 1; me >= 0; --me) {
    if (st - me - 2 >= 1) Dodaj(nr[st - 1 - (me + 2)], x[me + 2] - x[me + 1]);
    long long minP = 0, maxP;
    if (st != n - 1) ++minP;
    if (me != 0) ++minP;
    maxP = me + (n - 1 - st) + max((long long)0, st - me - 2);
    if (P < minP || P > maxP) continue;
    long long dl = 2 * (x[n - 1] - x[0]) - (x[st] - x[me]);
    if (P > me + (n - 1 - st)) dl += 2 * MinSum(P - (me + n - 1 - st));
    if (dl < minDl) {
      minDl = dl;
      minMe = me;
    }
  }
  vector<long long> path;
  if (minDl == INF) return path;
  prze.clear();
  for (int i = st - 1; i >= minMe + 2; --i)
    prze.push_back({x[i] - x[i - 1], i});
  sort(prze.begin(), prze.end(), por);
  long long pt = P;
  long long ileL, ileP, ileS;
  ileP = min(n - 1 - st, pt);
  pt -= ileP;
  ileL = min(minMe, pt);
  pt -= ileL;
  ileS = pt;
  vector<long long> kier(n, 1);
  for (int i = 0; i < ileS; ++i) kier[prze[i].nr] = -1;
  path.push_back(st);
  if (st != n - 1) {
    for (int i = st + 1; i < st + ileP; ++i) path.push_back(i);
    for (int i = n - 1; i >= st + ileP; --i) path.push_back(i);
  }
  for (int p = st - 1; p > minMe;) {
    long long l = p;
    while (kier[l] == -1) --l;
    for (int i = l; i <= p; ++i) path.push_back(i);
    p = l - 1;
  }
  for (int i = minMe - ileL; i >= 0; --i) path.push_back(i);
  for (int i = minMe - ileL + 1; i <= minMe; ++i) path.push_back(i);
  return path;
}
int main() {
  ios_base::sync_with_stdio(0);
  cin >> n >> L >> st;
  --st;
  P = n - 1 - L;
  vector<long long> x(n);
  for (int i = 0; i < n; ++i) cin >> x[i];
  vector<long long> cL, cP;
  cP = WPrawo(x);
  cL = WLewo(x);
  if (cL.size() == 0 && cP.size() == 0) {
    cout << "-1";
    return 0;
  }
  if (cL.size() == 0) cL = cP;
  if (cP.size() == 0) cP = cL;
  if (Wyn(x, cL) <= Wyn(x, cP)) {
    cout << Wyn(x, cL) << endl;
    for (int i = 1; i < n; ++i) cout << cL[i] + 1 << " ";
  } else {
    cout << Wyn(x, cP) << endl;
    for (int i = 1; i < n; ++i) cout << cP[i] + 1 << " ";
  }
  return 0;
}
