Go: /*
	http://judge.u-aizu.ac.jp/onlinejudge/description.jsp?id=1600&lang=jp
	Entrance Examination
*/

package main

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

// 標準入力を取得するScannerのインスタンスを作成
var scanner = bufio.NewScanner(os.Stdin)

// 標準入力で各行を読み込みintとして返す

func readLine() int {
	if scanner.Scan() {
		number, _ := strconv.Atoi(scanner.Text())
		return number
	}
	return 0
}

func main() {
	// 改行から空白区切りに変更
	scanner.Split(bufio.ScanWords)

	// 0 0 0の行に到達するまでループする
	for {
		// 合格者、不合格者の境目=ギャップ
		m := readLine()   // 受験者の人数
		min := readLine() // 合格者の最小人数
		max := readLine() // 合格者の最大人数

		// 0 0 0の行に到達したのでループを抜け終了する
		if m == 0 && min == 0 && max == 0 {
			break
		}

		// 得点を格納するsliceを初期化
		ps := make([]int, 0, m)

		// sliceに得点を格納する
		for i := 0; i < m; i++ {
			ps = append(ps, readLine())
		}

		tmp := 0    // ギャップを一時的に保存
		gap := 0    // ギャップの最大値を保存
		answer := 0 // ギャップが最大になった時のindex(合格人数)を保存

		// 合格者の最小人数〜最大人数のギャップを計算する
		for i := min; i <= max; i++ {
			tmp = ps[i-1] - ps[i]

			// ギャップの最大値が更新された場合、最大値と合格人数を更新する
			// ギャップが同じ値だった場合も合格人数を更新する
			// (合格人数が多い方が優先されるので後から現れた値が優先される)
			if tmp >= gap {
				gap = tmp
				answer = i
			}
		}
		fmt.Println(answer)
	}
}

Python: while True:
    n,big,small = map(int,input().split(" "))
    if n == 0:
        break
    points = []
    for i in range(n):
        points.append(int(input()))

    results = []
    for i in range(big,small+1):
        results.append(points[i-1] - points[i])

    ameba = len(results)
    for i in range(ameba):
        if results[ameba-1-i] == max(results):
            print(ameba-i+big-1)
            break

Python: while True :
    m, n_min, n_max = map(int, input().split())
    if m == 0 and n_min == 0 and n_max == 0 :
        break
    
    P = list(int(input()) for _ in range(m))
    gap = 0
    for i in range(n_min-1, n_max) :
        x = P[i] - P[i+1]
        if x >= gap :
            gap = x
            n = i
    print(n+1)

Python: da = list(map(int,input().split()))
k = []
while sum(da) != 0:
	for i in range(da[0]):
		k.append(int(input()))
	for i in range(da[0]):
		k[da[0] - 1 -i] = k[da[0] - 1 -i] - k[da[0]-2 -i]


	pp = k[da[1]:da[2]+1]
	qq = min(pp)

	for i in range(len(pp)):
		if pp[i] == qq:
			jj = i

	print(da[1]+jj)

	da = list(map(int,input().split()))
	k = []

Python: import sys
anslist = []
while True:
    m, nmin, nmax = [int(i) for i in input().split()]
    if m == 0:
        for i in anslist:
            print(i)
        sys.exit()
    p = [int(input()) for i in range(m)]
    ansnum = 0
    ans = 0
    for i in range(nmin-1,nmax):
        if ansnum <= p[i]-p[i+1] and not p[i]-p[i+1]==0:
            ans = i
            ansnum = p[i]-p[i+1]
    anslist.append(ans+1)

Python: while True:
    m,min,max= list(map(int, input().split()))
    if m==0 and min==0 and max==0:
        break;
    P = []
    for i in range(m):
        P.append(int(input()))

    spaceMax=0
    spaceMaxIndex=0
    for i in range(min-1,max):

        if spaceMax <= P[i]-P[i+1]:
            spaceMax=P[i]-P[i+1]
            spaceMaxIndex=i+1
    print(spaceMaxIndex)

Python: while True:
    m,nmin,nmax = [int(x) for x in input().split()]
    if m == nmin == nmax == 0:
        break
    a = [0]
    for i in range(m):
        a.append(int(input()))

    ans = 0
    ans_index = nmin

    for n in range(nmin,nmax+1):
        if ans <= a[n]-a[n+1]:
            ans = a[n]-a[n+1]
            ans_index=n

    print(ans_index)

Python: while True:
    m, nMin, nMax = map(int, input().split())
    if m == 0 and nMax == 0 and nMin == 0:
        break
    P = []
    Max = 0
    ans = 0
    for i in range(m):
        P.append(int(input()))
    else:
        for i in range(nMax-nMin+1):
            if i == 0 or Max <= P[nMin+i-1] - P[nMin+i]:
                Max = P[nMin+i-1] - P[nMin+i]
                ans = nMin + i
        else:
            print(ans)

Python: # AOJ 1600 Entrance Examination
# Python3 2018.7.13 bal4u

while True:
	m, nmin, nmax = map(int, input().split())
	if m == 0: break
	p = [int(input()) for i in range(m)]
	gap = 0
	for i in range(nmax-1, nmin-2, -1):
		d = p[i]-p[i+1]
		if d > gap: gap, ans = d, i
	print(ans+1)

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

#ifdef LOCAL
#include "../dump.hpp"
#else
#define dump(...)
#endif

#define rep(i,n) for(ll i=0,i##_cond=(n);i<i##_cond;++i)
#define FOR(i,a,b) for(ll i=(a),i##_cond=(b);i<i##_cond;++i)
#define ROF(i,a,b) for(ll i=(a)-1,i##_cond=(b);i>=i##_cond;--i)
#define all(a) (a).begin(),(a).end()
#define rall(a) (a).rbegin(),(a).rend() //sortで大きい順
#define UNIQUE(v) v.erase(unique(all(v)),v.end())
#define SUM(a) accumulate(all(a),0)
#define sz(x) ((ll)(x).size())
#define pb push_back
#define fst first
#define snd second
#define mp make_pair

typedef long long ll;
typedef vector<ll> vi;
typedef vector<vi> vvi;
typedef vector<string> vs;
typedef pair<ll,ll> pii;

const ll inf = 1ll<<62;
const ll mod = 1e9+7;

#define int ll

main()
{
  while(1){
    int m,nmin,nmax; cin >> m >> nmin >> nmax; nmin--; nmax--;
    if(m == 0) break;
    vi p(m); rep(i,m) cin >> p[i];
    int maxv = 0, pos;
    FOR(i,nmin,nmax+1){
      if(p[i] - p[i+1] >= maxv){
	maxv = p[i] - p[i+1];
	pos = i;
      }
    }
    cout << pos + 1 << endl;
  }
}

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

#define ll long long int
#define ld long double
#define reps(i,f,n) for(int i=f;i<n;i++)
#define rep(i,n) reps(i,0,n)
#define m1 cout<<"move1"<<endl
#define m2 cout<<"move2"<<endl
#define m3 cout<<"move3"<<endl
#define m4 cout<<"move4"<<endl


int main(){
  ll m,N_max,N_min;
  ll sa = 0;
  ll sa_max = 0;
  ll ans = 0;
  ll v[1000];

  while(cin>>m>>N_min>>N_max,m,N_min,N_max){
    sa = 0;
    sa_max = 0;
    ans = 0;
    rep(i,m)cin>>v[i];
  
    // m2;
    reps(i,N_min,N_max+1){
      sa = v[i-1] - v[i];
      //cout<<sa<<endl;
      //m1;
      if( sa_max <= sa){
	sa_max = sa;
	ans = i;
	//cout<<"#"<<ans<<endl;
      }
    }
    cout<<ans<<endl;
  }

  return 0;
}

C++: #include <algorithm>
#include <cstdio>
#include <iostream>
#include <map>
#include <cmath>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <vector>
#include <stdlib.h>
#include <stdio.h>
#include <bitset>
using namespace std;
#define FOR(I,A,B) for(int I = (A); I < (B); ++I)
typedef long long ll;

int main()
{
  int m, mn, mx;
  while(cin>>m>>mn>>mx) {
    if(m == 0) return 0;
    int p[m];
    FOR(i,0,m) cin >> p[i];
    int mxsa = 0;
    int ans = 0;
    FOR(i,mn,mx+1) {
      if(p[i-1] - p[i] >= mxsa) {
        mxsa = p[i-1] - p[i];
        ans = i;
      }
    }
    cout << ans << endl;
  }
  return 0;
}

C++: #include<bits/stdc++.h>
using namespace std;
int main(){
  int a,b,c;
  while(cin>>a>>b>>c,a){
    int p[a];
    for(int i=0;i<a;++i) cin>>p[i];
    int x=0, y;
    for(int i=b-1;i<c;++i)
      if(p[i]-p[i+1]>=x) x=p[i]-p[i+1], y=i;
    cout<<y+1<<endl;
  }
  return 0;
}

C++: #include<bits/stdc++.h>
#define REP(i,n) for(int i=0;i<n;i++)
#define LOOP(i,x,n) for(int i=x;i<n;i++)
#define ALL(v) (v).begin(),(v).end()
#define PB push_back
#define MP make_pair
#define FR first
#define SC second
#define int long long
using namespace std;
const int MOD=1000000007;
const int INF=1000000009;

signed main(){
  int m,nmin,nmax;
  while(cin>>m>>nmin>>nmax,m){
    vector<int> p(m);
    REP(i,m)cin>>p[i];
    vector<int> gap;
    for(int i=nmin-1;i<nmax;i++){
      gap.PB(p[i]-p[i+1]);
    }
    int M=*max_element(ALL(gap));
    int point=-1;
    REP(i,gap.size()){
      if(gap[i]==M)point=max(point,i+nmin);
    }
    cout<<point<<endl;
  }
  return 0;
}