Go: package main

import (
	"bufio"
	"fmt"
	"os"
	"strconv"
)

func nextInt(sc *bufio.Scanner) int {
	sc.Scan()
	i, err := strconv.Atoi(sc.Text())
	if err != nil {
		panic(err)
	}
	return i
}

func main() {
	sc := bufio.NewScanner(os.Stdin)
	sc.Split(bufio.ScanWords)

	for {
		m, nMin, nMax := nextInt(sc), nextInt(sc), nextInt(sc)
		if m == 0 && nMin == 0 && nMax == 0 {
			break
		}

		score_list := []int{}
		for i := 0; i < m; i++ {
			score_list = append(score_list, nextInt(sc))
		}

		// 最低合格者数と最高合格者数の間の各得点間のギャップが最大になる合格者数を取得する
		scoreGap := 0
		scoreGapMax := 0
		qualifiedNum := 0
		for n := nMin; n <= nMax; n++ {
			scoreGap = score_list[n-1] - score_list[n]
			if scoreGap >= scoreGapMax {
				scoreGapMax = scoreGap
				qualifiedNum = n
			}
		}

		fmt.Println(qualifiedNum)
	}
}

C++: #include <iostream>
#include <string>
#include <queue>
#include <stack>
#include <algorithm>
#include <list>
#include <vector>
#include <complex>
#include <utility>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <cmath>
#include <climits>
#include <bitset>
#include <ctime>
#include <map>
#include <unordered_map>
#include <set>
#include <unordered_set>
#include <cassert>
#include <cstddef>
#include <iomanip>
#include <numeric>
#include <tuple>
#include <sstream>
#include <fstream>

using namespace std;
#define REP(i, n) for (int (i) = 0; (i) < (n); (i)++)
#define FOR(i, a, b) for (int (i) = (a); (i) < (b); (i)++)
#define RREP(i, a) for(int (i) = (a) - 1; (i) >= 0; (i)--)
#define FORR(i, a, b) for(int (i) = (a) - 1; (i) >= (b); (i)--)
#define DEBUG(C) cerr << #C << " = " << C << endl;
using LL = long long;
using VI = vector<int>;
using VVI = vector<VI>;
using VL = vector<LL>;
using VVL = vector<VL>;
using VD = vector<double>;
using VVD = vector<VD>;
using PII = pair<int, int>;
using PDD = pair<double, double>;
using PLL = pair<LL, LL>;
using VPII = vector<PII>;
#define ALL(a) begin((a)), end((a))
#define RALL(a) rbegin((a)), rend((a))
#define SORT(a) sort(ALL((a)))
#define RSORT(a) sort(RALL((a)))
#define REVERSE(a) reverse(ALL((a)))
#define MP make_pair
#define FORE(a, b) for (auto &&a : (b))
#define FIND(s, e) ((s).find(e) != (s).end())
#define EB emplace_back

const int INF = 1e9;
const int MOD = INF + 7;
const LL LLINF = 1e18;

void solve(int m, int nmi, int nma) {
    VI P(m);
    REP(i, m) cin >> P[i];
    RSORT(P);
    P.EB(0);
    PII ans = MP(abs(P[nmi] - P[nmi - 1]), nmi);
    FOR(i, nmi, nma) {
        int dif = abs(P[i] - P[i + 1]);
        if (dif >= ans.first) {
            ans = MP(dif, i + 1);
        }
    }
    cout << ans.second << endl;
}

signed main(void) {
    int n, m, p, a, b, c, x, y, z, q;
    string s;
    while (cin >> m >> a >> b, m) {
        solve(m, a, b);
        //return 0;
    }
}

C++: #include<bits/stdc++.h>
using namespace std;

int m,a,b;
int p[205];

int main(){
  while(1){
    cin>>m>>a>>b;
    if(m==0&&a==0&&b==0)break;
    for(int i=1;i<=m;i++){
      cin>>p[i];
    }
    int maxm=0,id;
    for(int i=a;i<=b;i++){
      if(maxm<=p[i]-p[i+1]){
        maxm=p[i]-p[i+1];
        id=i;
      }
    }
    cout<<id<<endl;
  }
  return 0;
}

C++: #include<iostream>
#include<sstream>
#include<algorithm>
#include<climits>
#include<cmath>
#include<cstdio>
#include<cstdlib>
#include<ctime>
#include<cfloat>
#include<functional>
#include<map>
#include<string>
#include<cstring>
#include<vector>
#include<queue>
#include<stack>
#include<deque>
#include<set>
#include<bitset>
#include<list>
#include<numeric>
#include<complex>

using namespace std;

typedef long long ll;
typedef unsigned long long ull;
typedef pair<int, int> i_i;
typedef pair<long long, int> ll_i;
typedef pair<double, int> d_i;
typedef pair<long long, long long> ll_ll;
typedef pair<double, double> d_d;
typedef vector<int> Vint;

#define PI 3.141592653589793238462643383279
#define mod 1000000007LL
#define rep(i, n) for(i = 0;i < n;++i)
#define rep1(i, n) for(i = 1;i < n;++i)
#define rep2d(i, j, n) for(i = 0;i < n;++i)for(j = i + 1;j < n;++j)
#define per(i, n) for(i = n - 1;i > -1;--i)
#define int(x) int x; scanf("%d",&x)
#define int2(x, y) int x, y; scanf("%d%d",&x, &y)
#define int3(x, y, z) int x, y, z; scanf("%d%d%d",&x, &y, &z)
#define int4(v, x, y, z) int v, x, y, z; scanf("%d%d%d%d", &v, &x, &y, &z)
#define int5(v, w, x, y, z) int v, w, x, y, z; scanf("%d%d%d%d%d", &v, &w, &x, &y, &z)
#define scn(n, a) rep(i, n)cin >> a[i]
#define sc2n(n, a, b) rep(i, n)cin >> a[i] >> b[i]
#define pri(x) cout << x << "\n"
#define pri2(x, y) cout << x << " " << y << "\n"
#define pri3(x, y, z) cout << x << " " << y << " " << z << "\n"
#define pb push_back
#define mp make_pair
#define all(a) (a).begin(),(a).end()
#define endl "\n"
#define kabe puts("---------------------------")
#define kara puts("")
#define debug(x) cout << " --- " << x << "\n"
#define debug2(x, y) cout << " --- " << x << " " << y << "\n"
#define debug3(x, y, z) cout << " --- " << x << " " << y << " " << z << "\n"
#define X first
#define Y second
#define eps 0.0001
#define prid(x) printf("%.15lf\n", x)


signed main(void){
  int i, j, k;
  for(int testcase = 0;testcase >= 0;testcase++){
    int3(m, nin, nax); if(!(m|nax|nin))break;
    int p[m]; scn(m, p);

    int res = 0, resi;
    nin--; nax--;
    for(i = nin;i <= nax;++i){
      if(res <= p[i] - p[i + 1]){ res = p[i] - p[i + 1]; resi = i + 1; }
    }
    pri(resi);


//*/

//*/ break;
  }
  return 0;
}

C++: #include<cstdio>

int main() {
	while (1) {
		int m, nmin, nmax, p[201], maxg = 0, n;
		scanf("%d %d %d", &m, &nmin, &nmax);
		for (int i = 1; i < m; i++) {
			scanf("%d", &p[i]);
		}
		for (int j = nmin; j <= nmax; j++) {
			if (p[j] - p[j+1] > maxg) {
				maxg = p[j] - p[j+1];
				n = j;
			}
		}
		if (m == 0 && nmin == 0 && nmax == 0) {
			return 0;
		}
		else {
			printf("%d\n", n);
		}
	}
}

C++: #include <iostream>
#include <vector>
#include <algorithm>
using namespace std;

int main() {
  int m, min, max, su, gap, temp;
  vector<int> p;

  while(1) {
    cin >> m >> min >> max;
    if(m == 0 && min == 0 && max == 0)
      break;

    for(int i = 0; i < m; i++) {
      int P;
      cin >> P;
      p.push_back(P);
    }

    // sort(p.begin(), p.end(), greater<int>());                               

    su = p[min-1]-p[min];
    gap = min;
    for(int i = min-1; i < max; i++) {
      temp  = p[i] - p[i+1];
      //cout << temp << ' ' << gap << endl;                                    
      if(temp > su) {
        su = temp;
        gap = i+1;
      }
    }
    cout << gap << endl;
    p.clear();
  }

  return 0;
}

C++: #include <iostream>
#include <cmath>
#include <algorithm>
#include <utility>
#include <vector>
#include <string>

using namespace std;


int main()
{
    while (true) {
        int m, nmin, nmax;
        cin >> m >> nmin >> nmax;
        if (m == 0 and nmin == 0 and nmax == 0) {
            break;
        }
        vector<int> score(m);
        for (int i = 0; i < m; i++) {
            cin >> score[i];
        }
        int maxi = nmin - 1;
        int gap = numeric_limits<int>::min();
        for (int i = nmin - 1; i < nmax; i++) {
            if (gap <= score[i] - score[i + 1]) {
                gap = score[i] - score[i + 1];
                maxi = i;
            }
        }
        cout << maxi + 1 << endl;
    }
    return 0;
}

C++: #include<iostream>
#include<vector>
#include<algorithm>
using namespace std;

int main(){
  int m, maxi, mini;
  while(std::cin >> m >> mini >> maxi, m){
    vector<int> p(m);
    for (int i = 0; i < m; i++) std::cin >> p[i];
    sort(p.begin(), p.end());
    int gap = 0, ans = -1;
    for (int i = m - maxi; i <= m - mini; i++) {
      if(gap < p[i] - p[i - 1]){
        gap =  p[i] - p[i - 1];
        ans = m - i;
      }
    }
    std::cout << ans << std::endl;
    // std::cout << std::endl;
  }
  return 0;
}