#include <bits/stdc++.h>
#pragma GCC optimize("Ofast")
#pragma GCC target( \
    "sse,sse2,sse3,ssse3,sse4,sse4.1,sse4.2,popcnt,abm,mmx,avx,tune=native")
using namespace std;
const int MOD = 1000000007;
const int UNDEF = -1;
const int INF = 1 << 30;
const long long LINF = 1LL << 60;
template <typename T>
inline bool chkmax(T &aa, T bb) {
  return aa < bb ? aa = bb, true : false;
}
template <typename T>
inline bool chkmin(T &aa, T bb) {
  return aa > bb ? aa = bb, true : false;
}
int rint();
char rch();
long long rlong();
const int mn = 1e5 + 2;
class FirstK {
 public:
  priority_queue<int> pq;
  priority_queue<int, vector<int>, greater<int> > other;
  int k;
  long long sum = 0;
  void rm() {
    int x = pq.top();
    pq.pop();
    other.push(x);
    sum -= x;
  }
  void add() {
    int x = other.top();
    other.pop();
    pq.push(x);
    sum += x;
  }
  void ins(int x) {
    pq.push(x);
    sum += x;
    if (pq.size() > k) {
      rm();
    }
  }
  void resizek(int nk) {
    k = nk;
    while (pq.size() > k) rm();
    while (pq.size() < k) add();
  }
};
int a[mn];
void fail(int t) {
  printf("-1\n");
  exit(0);
}
vector<int> FAIL = {-1};
long long getdist(vector<int> &vans) {
  if (vans == FAIL) return LINF;
  long long dist = 0;
  for (int i = 1; i < vans.size(); i++) {
    dist += abs(a[vans[i]] - a[vans[i - 1]]);
  }
  return dist;
}
void out(vector<int> &vans) {
  long long dist = getdist(vans);
  if (dist >= LINF) {
    printf("-1\n");
    exit(0);
  }
  printf("%lld\n", dist);
  for (int i = 1; i < vans.size(); i++) {
    printf("%d ", vans[i]);
  }
  printf("\n");
}
int solvesimple(vector<int> &vdist, int l) {
  int n = vdist.size();
  FirstK fk;
  fk.resizek(0);
  for (int x = 0; x < n - l; x++) {
    fk.ins(vdist[x]);
  }
  long long tail = 0;
  for (int x = n - l; x < n; x++) tail += vdist[x];
  int tlsz = l;
  pair<long long, int> best = make_pair(LINF, -1);
  {
    long long cost = fk.sum * 2 + tail;
    chkmin(best, make_pair(cost, tlsz));
  }
  for (int x = n - l; x < n; x++) {
    tail -= vdist[x];
    fk.ins(vdist[x]);
    fk.resizek(fk.k + 1);
    long long cost = fk.sum * 2 + tail;
    tlsz--;
    chkmin(best, make_pair(cost, tlsz));
  }
  tlsz == 0;
  return best.second;
}
bitset<mn> vb;
vector<int> solvestart(vector<int> &coord, int l) {
  if (!(l <= coord.size() - 2)) return FAIL;
  vector<int> vans;
  vector<int> odist;
  for (int x = 1; x < coord.size() - 1; x++) {
    odist.push_back(abs(a[coord[x + 1]] - a[coord[x]]));
  }
  int tlsz = solvesimple(odist, l);
  vector<pair<int, int> > vdist;
  for (int x = 1; x < coord.size() - 1 - tlsz; x++) {
    vdist.push_back(make_pair(abs(a[coord[x + 1]] - a[coord[x]]), x));
  }
  sort(vdist.begin(), vdist.end());
  vb.reset();
  for (int i = 0; i < l - tlsz; i++) {
    int x = vdist[i].second;
    vb[x] = true;
    ;
  }
  for (int x = coord.size() - 1 - tlsz; x < coord.size() - 1; x++) vb[x] = true;
  vector<pair<int, int> > chain;
  int lft = 0;
  for (int x = 0; x < coord.size(); x++) {
    if (!vb[x]) {
      chain.push_back(make_pair(lft, x));
      ;
      lft = x + 1;
    }
  }
  for (auto &w : chain) {
    int lft = w.first, rt = w.second;
    for (int x = rt; x >= lft; x--) {
      vans.push_back(coord[x]);
      ;
    }
  }
  return vans;
}
int n, l, s;
int rev(int x) {
  if (x == -1) return -1;
  return n + 1 - x;
}
void dorev() {
  s = rev(s);
  reverse(a + 1, a + n + 1);
  l = n - 1 - l;
}
vector<int> solvemid() {
  int r = n - 1 - l;
  if (l == 0) return FAIL;
  vector<int> vans1;
  {
    vans1.push_back(s);
    if (l < s) {
      for (int x = l; x >= 1; x--) vans1.push_back(x);
      for (int x = l + 1; x <= n; x++)
        if (x != s) vans1.push_back(x);
    } else {
      l >= s - 1;
      for (int x = s - 1; x >= 2; x--) vans1.push_back(x);
      vector<int> coord;
      coord.push_back(1);
      for (int x = s + 1; x <= n; x++) coord.push_back(x);
      vector<int> res = solvestart(coord, l - (s - 1));
      for (auto &w : res) vans1.push_back(w);
    }
  }
  return vans1;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  n = rint(), l = rint(), s = rint();
  for (int i = 1; i <= n; i++) a[i] = rint();
  if (s == 1 || s == n) {
    vector<int> coord;
    for (int x = 1; x <= n; x++) coord.push_back(x);
    if (s == 1) {
      vector<int> ans = solvestart(coord, l);
      out(ans);
    } else {
      dorev();
      vector<int> ans = solvestart(coord, l);
      dorev();
      for (auto &w : ans) w = rev(w);
      out(ans);
    }
  } else {
    if (l == 0 || n - 1 - l == 0) fail(2);
    vector<int> ans1 = solvemid();
    long long d1 = getdist(ans1);
    dorev();
    vector<int> ans2 = solvemid();
    dorev();
    for (auto &w : ans2) w = rev(w);
    long long d2 = getdist(ans2);
    if (d2 <= d1) {
      out(ans2);
    } else {
      out(ans1);
    }
  }
}
static char stdinBuffer[1024];
static char *stdinDataEnd = stdinBuffer + sizeof(stdinBuffer);
static const char *stdinPos = stdinDataEnd;
void readAhead(size_t amount) {
  size_t remaining = stdinDataEnd - stdinPos;
  if (remaining < amount) {
    memmove(stdinBuffer, stdinPos, remaining);
    size_t sz = fread(stdinBuffer + remaining, 1,
                      sizeof(stdinBuffer) - remaining, stdin);
    stdinPos = stdinBuffer;
    stdinDataEnd = stdinBuffer + remaining + sz;
    if (stdinDataEnd != stdinBuffer + sizeof(stdinBuffer)) *stdinDataEnd = 0;
  }
}
int rint() {
  readAhead(16);
  int x = 0;
  bool neg = false;
  while (*stdinPos == ' ' || *stdinPos == '\n') ++stdinPos;
  if (*stdinPos == '-') {
    ++stdinPos;
    neg = true;
  }
  while (*stdinPos >= '0' && *stdinPos <= '9') {
    x *= 10;
    x += *stdinPos - '0';
    ++stdinPos;
  }
  return neg ? -x : x;
}
char rch() {
  readAhead(16);
  while (*stdinPos == ' ' || *stdinPos == '\n') ++stdinPos;
  char ans = *stdinPos;
  ++stdinPos;
  return ans;
}
long long rlong() {
  readAhead(32);
  long long x = 0;
  bool neg = false;
  while (*stdinPos == ' ' || *stdinPos == '\n') ++stdinPos;
  if (*stdinPos == '-') {
    ++stdinPos;
    neg = true;
  }
  while (*stdinPos >= '0' && *stdinPos <= '9') {
    x *= 10;
    x += *stdinPos - '0';
    ++stdinPos;
  }
  return neg ? -x : x;
}
