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
//------------------------------------------
#include <vector>
#include <list>
#include <map>
#include <set>
#include <deque>
#include <queue>
#include <stack>
#include <bitset>
#include <algorithm>
#include <functional>
#include <numeric>
#include <utility>
#include <sstream>
#include <iostream>
#include <fstream>
#include <iomanip>
#include <cstdio>
#include <cmath>
#include <cstdlib>
#include <string>
#include <cstring>
#include <ctime>


using namespace std;

//conversion
//------------------------------------------
inline int toInt(string s) { int v; istringstream sin(s); sin >> v; return v; }
template<class T> inline string toString(T x) { ostringstream sout; sout << x; return sout.str(); }

//math
//-------------------------------------------
template<class T> inline T sqr(T x) { return x * x; }

//typedef
//------------------------------------------
typedef vector<int> VI;
typedef vector<VI> VVI;
typedef vector<string> VS;
typedef pair<int, int> PII;
typedef long long LL;

//container util
//------------------------------------------
#define ALL(a)  (a).begin(),(a).end()
#define RALL(a) (a).rbegin(), (a).rend()
#define PB push_back
#define MP make_pair
#define SZ(a) int((a).size())
#define EACH(i,c) for(typeof((c).begin()) i=(c).begin(); i!=(c).end(); ++i)
#define EXIST(s,e) ((s).find(e)!=(s).end())
#define EXISTch(s,c) ((((s).find_first_of(c)) != std::string::npos)? 1 : 0)//cがあれば1 if(1)
#define SORT(c) sort((c).begin(),(c).end())

//repetition
//------------------------------------------
#define FOR(i,a,b) for(int i=(a);i<(b);++i)
#define rep(i,n)  FOR(i,0,n)
#define loop(n) FOR(i,0,n)
#define rrep(i,a,b) for(int i=(a);i>=(b);--i)
//constant
//--------------------------------------------
const double EPS = 1e-10;
const double PI = acos(-1.0);
const int INF = (int)1000000007;
const LL MOD = (LL)1000000007;//10^9+7
const LL INF2 = (LL)100000000000000000;//10^18

int main() {

	while (true) {
		int n, mi, ma; cin >> n >> mi >> ma;
		

		if (n == 0 && mi == 0 && ma == 0)return 0;

		mi--; ma--; 

		vector<int> a(n);

		for (int i = 0; i < n; i++) {
			cin >> a[i];
		}

		int diff = 0;
		int ans = -1;
		int index = 0;
		for (int i = mi; i <=ma; i++) {
			diff = abs(a[i] - a[i + 1]);

			if (ans <= diff) {
				ans = diff;
				index = i;
			}
		}

		cout << ++index << 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);
		}
	}
}

C++: #include <iostream>
#include <stdio.h>
#include <vector>
#include <algorithm>

#define REP(i,n) for(int i = 0;i<(int)n;i++)
#define FOR(i,a,b) for(int i = (a);i < (b);i++)
#define RFOR(i,a,b) for(int i = (a);i>(b);i--)

using namespace std;

int main(void){
    
    int student = 0;
    int maxN,minN = 0;
    int gap = 0,gapMax = 0,gapnumber  = 0;
    int score[1020] = {0};
    
    while(cin >> student >>minN >>maxN,student+maxN+minN)
    {
        REP(i,student)
        cin >> score[i];
  
    
    FOR(j,minN-1,maxN+1)
        {
            gap = score[0] - score[j];
            if(gapMax <= gap)
            {
                gapnumber = j;
                gapMax = gap;
                
            }
        }
        cout << gapnumber << endl;
    
    }
    return 0;
}

C++: #include <iostream>
#include <algorithm>
#include <vector>

using namespace std;

int main(){
	int m, min, max;
	while(cin >> m >> min >> max, m || min || max){
		vector<int> data(m);
		for(int i = 0; i < m; i++){//input
			cin >> data[i];
		}

		pair<int, int> a = make_pair(0, 0);
		for(int i = min; i <= max; i++){
			int tmp = data[i-1] - data[i];
			
			if(tmp >= a.second){
				a.first = i;
				a.second = tmp;
			}
		}

		cout << a.first<< endl;
	}

	return 0;
}

C++: #include <iostream>
using namespace std;
int main(void){
    int m;  //受験者の人数
    int min, max;  //合格者数の最小値と最大値
    int score[200];  //受験者の成績
    int s;  //合格者数

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

        for(int i = 0; i < m; i++){
            cin >> score[i];
        }
        
        int gapmax = 0;  //合格者の最低点と不合格者の最高点の差の最大値の初期値を０とする
        for(int j = min; j <= max; j++){
            int gap = score[j - 1] - score[j];
            if(gap >= gapmax){
                gapmax = gap;
                s = j;
            }
        }
        cout << s << endl;
    }
}

C++: #include <iostream>
using namespace std;
int main(){
  while(true){
    int m,nmin,nmax;
    cin>>m>>nmin>>nmax;

    if(m==0&&nmin==0&&nmax==0){
      break;
    }
    int P[200];
    for(int i=0;i<m;i++){
      cin>>P[i];
    }
    int gap=-1;
    int n=-1;
    for(int i=nmin;i<=nmax;i++){
      int g=P[i-1]-P[i];
      if(gap<=g){
        gap=g;
        n=i;
      }
    }
    cout<<n<<endl;
  }
  return 0;
}

C++: #include <bits/stdc++.h>
using namespace std;
using lint = long long;
template<class T = int> using V = vector<T>;
template<class T = int> using VV = V< V<T> >;

int main() {
  cin.tie(nullptr); ios::sync_with_stdio(false);
  while (true) {
    int n, mn, mx; cin >> n >> mn >> mx;
    if (!n) break;
    V<> p(n); for (auto&& e : p) cin >> e;
    int res = -1, g = -1;
    for (int i = mn; i <= mx; ++i) {
      if (p[i - 1] - p[i] >= g) {
        g = p[i - 1] - p[i];
        res = i;
      }
    }
    cout << res << '\n';
  }
}

C++: #include<bits/stdc++.h>
#define LL long long
#define REP(i,n) for(int i=0;i<(n);++i)
#define REPA(i,n) for(int i=1;i<(n);++i)
#define foreach(i, n) for(auto &i:(n))
#define PII pair<int,int>
#define PLI pair<long long, int>
#define PLL pair<long long, long long>
#define PDD pair<double, double>
#define MOD ((int)1e9 + 7)
#define INF ((int)1e9)
#define INFLL ((LL)1e18)
#define ALL(x) (x).begin(),(x).end()
#define ctoi(x) (x - 'a') 
#define CTOI(x) (x - 'A')
#define BIT(x) (1 << (x))
using namespace std;

LL modinv(LL a){
    LL b = MOD, u = 1, v = 0;
    while(b){
        LL t = a / b;
        a -= t * b;swap(a, b);
        u -= t * v;swap(u, v);
    }
    u%=MOD;
    if(u < 0) u += MOD;
    return u;

}

LL exp(LL a, LL b){
    LL sum = a;
    LL res = 1;
    while(b){
        if(b&1){
            res = (res * sum)%MOD;
        }
        sum = (sum * sum) % MOD;
        b>>=1;
    }
    return res;
}

int main(){
    int m, nmin, nmax;
    while(cin>>m>>nmin>>nmax&&m){
        vector<int> line(m);
        foreach(i, line)cin>>i;
        int ans = nmin;
        for(int i=nmin-1;i<nmax;++i){
            if(line[i]==line[i+1])continue;
            if(line[ans]-line[ans+1]<=line[i]-line[i+1])ans=i;
        }
        cout << ans+1 << endl;
    }
    return 0;
}