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)
	}
}

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;
}

C++: #include <iostream>
#include <string>
#include <cstring>
#include <cstdio>
#include <algorithm>
#include <vector>

using namespace std;

bool calc(){
  int m, nMax, nMin;
  cin >> m >> nMax >> nMin;
  if(m == 0 && nMax == 0 && nMin == 0) return false;

  int p[m];
  for(int i = 0; i < m; i++) cin >> p[i];

  sort(p, p + m);

  int maxPoint = -1;
  int index = 0;
  for(int i = m - 1; i > 0; i--){
    int calc = p[i] - p[i - 1];
    if(maxPoint <= calc){
      maxPoint = calc;
      index = i;
    }
  }

  cout << m - index << endl;
  return true;
}

int main(){
  while(calc());
}

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

int main(){
    int m, nmin, nmax;
    while(cin >> m >> nmin >> nmax, m+nmin+nmax){
        vector<int> p(m);
        for(int i = 0; i < m; i++)  cin >> p[i];
        sort(p.rbegin(), p.rend());
        int ans = 0, diff = 0;
        for(int i = nmin; i <= nmax; i++){
            if(p[i-1]-p[i] >= diff){
                ans = i, diff = p[i-1]-p[i];
            }
        }
        cout << ans << endl;
    }
    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);
		}
	}
}