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 <algorithm>
#include <bitset>
#include <complex>
#include <deque>
#include <exception>
#include <fstream>
#include <functional>
#include <iomanip>
#include <ios>
#include <iosfwd>
#include <iostream>
#include <istream>
#include <iterator>
#include <limits>
#include <list>
#include <locale>
#include <map>
#include <memory>
#include <new>
#include <numeric>
#include <ostream>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <stdexcept>
#include <streambuf>
#include <string>
#include <typeinfo>
#include <utility>
#include <valarray>
#include <vector>
#include <climits>
#include <cstring>

#define rep(i, m, n) for(int i=int(m);i<int(n);i++)
#define all(c) begin(c),end(c)

template<typename T1, typename T2>
inline void chmin(T1 &a, T2 b) { if (a > b) a = b; }

template<typename T1, typename T2>
inline void chmax(T1 &a, T2 b) { if (a < b) a = b; }

//改造
typedef long long int ll;
using namespace std;
#define INF (1 << 30) - 1
#define INFl (ll)5e15
#define DEBUG 0 //デバッグする時1にしてね
#define dump(x)  cerr << #x << " = " << (x) << endl
#define MOD 1000000007


//ここから編集する
class Solve {
public:
    void input() {

    }

    bool solve() {
        input();
        int m, nl, nu;
        cin >> m >> nl >> nu;
        if (m == 0) return false;
        vector<int> p(m);
        rep(i, 0, m) cin >> p[i];

        int bestn = 0;
        int diff = 0;

        for (int i = nl - 1; i < nu; ++i) {
            if (p[i] - p[i + 1] >= diff) {
                bestn = i + 1;
                diff = p[i] - p[i + 1];
            }
        }

        cout << bestn << endl;
        return true;

    }
};


int main() {
    cin.tie(0);
    ios::sync_with_stdio(false);
    cout << fixed << setprecision(10);

    while (Solve().solve()) {}


    return 0;
}

C++: #include <iostream>
using namespace std;
int main(){
	int m,nmin,nmax;
	while(cin>>m>>nmin>>nmax){
		if(m==0&&nmin==0&&nmax==0) break;
		int p[m];
		for(int i=0;i<m;i++){
			cin>>p[i];
		}
		int g[nmax-nmin+1],gmax=0,nn;
		for(int i=0;i<=nmax-nmin;i++){
			g[i]=p[nmin+i-1]-p[nmin+i];
			if(g[i]>=gmax){
				gmax=g[i];
				nn=nmin+i;
			}
		}
		cout<<nn<<endl;
	}
    return 0;
}

C++: #include <iostream>
using namespace std;
int main(void){
    int i,m,nmin,nmax,a[200],gap,n;
    
    while(1){
        
        cin >> m >> nmin >> nmax;
        if(m==0 && nmin == 0 && nmax == 0) break;
        
        for(i=1;i<m+1;i++){
            cin >> a[i];
        }
        
        gap = a[nmin] - a[nmin+1];
        n = nmin;
        
        for(i=nmin;i< nmax+1;i++){
            if(a[i] - a[i+1] >= gap ){
                gap = a[i]-a[i+1];
                n = i;
               
            }
             //cout << gap << " " << n << endl;
             
        }
        
        cout << n << endl;
        
    }
    
    return 0;
}

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

int main(){

  int m, n_min, n_max, gap = 1000000, z;
  int ary[1000001];

  cin >> m >> n_min >> n_max;
  while(1){
    if(m == 0 && n_min == 0 && n_max == 0) break;

    int j = 0;
    while(m--){
      cin >> ary[j];
      j++;
    }

    for(int i = n_min ; i < n_max ; i++){
      if(gap >= ary[i-1] - ary[i]){
	gap = ary[i-1] - ary[i];
	z = i;
      }
    }
    cout << z;
  }

  return 0;
}

C++: #include <bits/stdc++.h>
#define REP(i,n,N) for(int i=n;i<N;i++)
#define p(S) cout<<(S)<<endl
#define ck(a,b) (0<=(a)&&(a)<(b))
using namespace std;

int main(){
	int m,nmin,nmax;
	while(cin>>m>>nmin>>nmax,m){
		int P[201];
		int maxg=0;
		int ans;
		REP(i,0,m) cin>>P[i];
		REP(i,nmin,nmax+1){
			int gap=P[i-1]-P[i];
			if(gap>=maxg){
				maxg=gap;
				ans=i;
			}
		}
		p(ans);
	}
	return 0;
}

C++: #include <iostream>
#include <vector>
#include <queue>
#include <set>
#include <unordered_set>
#include <map>
#include <unordered_map>
#include <algorithm>

using namespace std;
using vi = vector<int>;
using vvi = vector<vi>;
using vc = vector<char>;
using vvc = vector<vc>;
template<class T> using hset = unordered_set<T>;
template<class Key, class T> using hmap = unordered_map<Key, T>;

int dx[] = {0, 1, 0, -1};
int dy[] = {1, 0, -1, 0};

int main() {
    int m, nmin, nmax, submax, ans;
    vi P;
    while (cin >> m >> nmin >> nmax) {
        if (m == 0) break;

        submax = 0;
        ans = nmin;
        P.resize(m);
        for (int i = 0; i < m; i++) cin >> P[i];

        for (int n = nmin; n <= nmax; n++) {
            if (P[n-1] - P[n] >= submax) {
                submax = P[n-1] - P[n];
                ans = n;
            }
        }

        cout << ans << endl;
    }

    return 0;
}

C++: #include <iostream>
#include <bits/stdc++.h>
#define FOR(i,a,b) for(int i=(a);i<(b);i++)
#define REP(i,n) FOR(i,0,n)

using namespace std;

int main()
{
        int m,ni,na;
        while(cin>>m>>ni>>na,m)
        {
                vector<int> p(m);
                REP(i,m)
                {
                        cin>>p[i];
                }
                sort(p.begin(), p.end());
                int md=0,mp=ni;
                FOR(i, m-na, m-ni+1)
                {
                        if(p[i]-p[i-1]>md)
                        {
                                //cout<<md<<i<<endl;
                                md=p[i]-p[i-1];
                                mp=m-i;
                        }
                }
                cout<<mp<<endl;
        }
}
~                                                                                                                   
~                                                                                                                   
~                                                                                                                   
~                                                                                                                   
~                                                                                                                   
~                                                                                                                   
~                                                                                                                   
~                                                                                                                   
~                                                                                                                   
~

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

using namespace std;


int main() {
  while (true) {
    int m, nmin, nmax;
    cin >> m >> nmin >> nmax;

    if (m + nmin + nmax == 0) {
      break;
    }
    vector<int> p(m);
    for (int i = 0; i < m; i++) {
      cin >> p[i];
    }

    int gapMax = -1;
    int gapMaxIdx = -1;
    for (int i = nmin - 1; i <= nmax - 1; i++) {
      int temp = p[i] - p[i + 1];
      if (temp >= gapMax) {
        gapMax = temp;
        gapMaxIdx = i;
      }
    }

    cout << gapMaxIdx + 1 << endl;
   
  }
  
  return 0;
}