#include <bits/stdc++.h>
using namespace std;
int n, x[200000], S;
int orden[200000], guia[200000];
bool cmpor(int i1, int i2) { return x[i1 + 1] - x[i1] < x[i2 + 1] - x[i2]; }
long long tope = 1000000000000000000LL;
void solve(int le, int ri, int *sol, long long &coste) {
  if (!S) {
    coste = tope;
    return;
  }
  int isol = 0;
  if (ri <= n - 1 - S) {
    for (int i = n - 1 - ri + 1; i <= n - 1; ++i) sol[isol++] = i;
    for (int i = n - 1 - ri; i >= 0; --i)
      if (i != S) sol[isol++] = i;
    coste = x[n - 1] - x[S] + x[n - 1] - x[0];
  } else if (le == 1) {
    for (int i = S + 1; i <= n - 1; ++i) sol[isol++] = i;
    for (int i = 0; i <= S - 1; ++i) sol[isol++] = i;
    coste = x[n - 1] - x[S] + x[n - 1] - x[0] + x[S - 1] - x[0];
  } else {
    coste = x[n - 1] - x[S] + x[n - 1] - x[0] + x[ri - (n - 1 - S)] - x[0];
    int indexmin = ri - (n - 1 - S);
    priority_queue<int> q;
    for (int i = indexmin + 1; i < S - 1; ++i) q.push(-(x[i + 1] - x[i]));
    long long costeact = coste;
    for (int i = indexmin; i > 0; --i) {
      costeact -= x[i] - x[i - 1];
      q.push(-(x[i + 1] - x[i]));
      long long valtop = -q.top();
      q.pop();
      costeact += 2 * valtop;
      if (costeact < coste) {
        coste = costeact;
        indexmin = i - 1;
      }
    }
    for (int i = S + 1; i <= n - 1; ++i) sol[isol++] = i;
    for (int i = 0; i <= indexmin; ++i) guia[i] = 0;
    for (int i = indexmin + 1; i < S; ++i) guia[i] = -1;
    for (int i = indexmin + 1; i < S - 1; ++i) orden[i] = i;
    sort(orden + (indexmin + 1), orden + (S - 1), cmpor);
    for (int i = 0; i < ri - (n - 1 - S) - indexmin; ++i)
      guia[orden[i + indexmin + 1]] = 1;
    int index = S - 1;
    int direccion = -1;
    while (index != 0) {
      if (direccion == -1) {
        if (guia[index] == -1) {
          if (guia[index - 1] == 1) {
            index--;
          } else {
            guia[index] = 0;
            sol[isol++] = index;
            index--;
          }
        } else if (guia[index] == 1) {
          if (guia[index - 1] == 1) {
            index--;
          } else {
            guia[index] = 0;
            sol[isol++] = index;
            index++;
            direccion = 1;
          }
        } else {
          index--;
        }
      } else {
        if (guia[index] == -1) {
          sol[isol++] = index;
          guia[index] = 0;
          index--;
          direccion = -1;
        } else if (guia[index] == 1) {
          guia[index] = 0;
          sol[isol++] = index;
          index++;
        }
      }
    }
    for (int i = 0; i <= indexmin; ++i) sol[isol++] = i;
  }
}
void print(int coste, int sol[200000]) {
  cout << coste << endl;
  for (int i = 0; i < n - 1; i++) {
    if (i > 0) cout << " ";
    cout << sol[i] + 1;
  }
  cout << endl;
}
int L, R, T;
int solR[200000];
int solL[200000];
long long costeR;
long long costeL;
int main() {
  scanf("%d%d%d", &n, &L, &S);
  R = n - 1 - L;
  --S;
  for (int i = 0; i < n; ++i) scanf("%d", x + i);
  if ((S < n - 1 && !R) || (S > 0 && !L)) {
    cout << -1 << endl;
    return 0;
  }
  solve(L, R, solR, costeR);
  for (int i = 0; i < n; ++i) x[i] = -x[i];
  reverse(x, x + n);
  S = n - 1 - S;
  solve(R, L, solL, costeL);
  if (costeL < tope)
    for (int i = 0; i < n - 1; ++i) solL[i] = n - 1 - solL[i];
  if (costeR < costeL)
    print(costeR, solR);
  else
    print(costeL, solL);
  return 0;
}
