#include <bits/stdc++.h>
using namespace std;
struct osmosis {
  multiset<long long> small;
  multiset<long long> big;
  long long smsmall;
  osmosis() {
    small.clear();
    big.clear();
    smsmall = 0;
  }
  void erase(long long x) {
    auto it = small.find(x);
    if (it != small.end()) {
      smsmall -= x;
      small.erase(it);
    } else {
      it = big.find(x);
      big.erase(it);
    }
  }
  long long smksmall(int k) {
    if (int(small.size()) + int(big.size()) < k) return 1e18;
    while (int(small.size()) < k) {
      long long x = *big.begin();
      big.erase(big.begin());
      small.insert(x);
      smsmall += x;
    }
    while (int(small.size()) > k) {
      long long x = *small.rbegin();
      small.erase(small.find(x));
      big.insert(x);
      smsmall -= x;
    }
    return smsmall;
  }
};
vector<int> path;
long long targ;
long long solve(vector<long long> x, int nl, int nr, int ip, bool genp) {
  assert(nl + nr == int(x.size()) - 1);
  if (ip != 0 && nl == 0) return 1e18;
  if (ip == int(x.size()) - 1) return 1e18;
  int wl = min(nl, ip);
  int wr = ip - wl;
  long long ans = (x[ip] - x[0]) * 2;
  nl -= wl;
  nr -= wr;
  x.erase(x.begin(), x.begin() + ip);
  assert(int(x.size()) >= 2);
  assert(nl + nr == int(x.size()) - 1);
  if (nr == 0) return 1e18;
  if (genp) {
    for (int i = wl - 1; i >= 0; i--) path.push_back(i);
    for (int i = wl; i < ip; i++) path.push_back(i);
  }
  vector<long long> dx;
  for (int i = (0); i < (int(x.size()) - 1); i++) dx.push_back(x[i + 1] - x[i]);
  for (int i = (0); i < (int(dx.size())); i++) ans += dx[i];
  long long res = 1e18;
  osmosis m;
  for (int i = (1); i < (int(dx.size())); i++) m.big.insert(dx[i]);
  long long sufsm = 0;
  for (int i = int(dx.size()) - 1; i >= 0; i--) {
    int hv = int(dx.size()) - i - 1;
    int nd = nl - hv;
    if (nd >= 0) {
      res = min(res, ans + sufsm + 2 * m.smksmall(nd));
      if (genp && res == targ) {
        vector<pair<long long, int> > v;
        for (int j = (1); j < (i + 1); j++) v.emplace_back(dx[j], j);
        sort(v.begin(), v.end());
        v.resize(nd);
        vector<int> u;
        for (auto p : v) u.push_back(p.second);
        for (int j = (i + 1); j < (int(dx.size())); j++) u.push_back(j);
        sort(u.begin(), u.end());
        int lst = 0;
        for (int i = 0; i < int(u.size());) {
          int j;
          for (j = i; j < int(u.size()) && u[j] - u[i] == j - i; j++)
            ;
          j--;
          while (lst + 1 < u[i]) path.push_back(ip + (++lst));
          for (int k = u[j] + 1; k >= u[i]; k--) {
            path.push_back(ip + k);
          }
          lst = u[j] + 1;
          i = j + 1;
        }
        while (lst < int(dx.size())) path.push_back(ip + (++lst));
        return res;
      }
    }
    sufsm += dx[i];
    if (i) m.erase(dx[i]);
  }
  return res;
}
int n, l, s;
long long x[100005];
int main() {
  scanf("%d %d %d", &n, &l, &s);
  s--;
  for (int i = (0); i < (n); i++) scanf("%lld", x + i);
  long long ans1 = solve(vector<long long>(x, x + n), l, n - 1 - l, s, false);
  for (int i = (0); i < (n); i++) x[i] *= -1;
  reverse(x, x + n);
  long long ans2 =
      solve(vector<long long>(x, x + n), n - 1 - l, l, n - 1 - s, false);
  for (int i = (0); i < (n); i++) x[i] *= -1;
  reverse(x, x + n);
  if (min(ans1, ans2) > 1e17)
    printf("-1\n");
  else {
    if (ans1 < ans2) {
      targ = ans1;
      solve(vector<long long>(x, x + n), l, n - 1 - l, s, true);
    } else {
      targ = ans2;
      for (int i = (0); i < (n); i++) x[i] *= -1;
      reverse(x, x + n);
      solve(vector<long long>(x, x + n), n - 1 - l, l, n - 1 - s, true);
      for (int i = (0); i < (n - 1); i++) path[i] = n - 1 - path[i];
    }
    printf("%lld\n", targ);
    for (int i = (0); i < (n - 1); i++)
      printf("%d%c", 1 + path[i], " \n"[i + 2 == n]);
  }
}
