<commit_before>#include <iostream>

using namespace std;

int main(){
    ios_base::sync_with_stdio (false);

    int period, popes, i, j, year, first_year, last_year, max_popes;

    while(cin >> period){
        cin >> popes;
        int years[popes];
        max_popes = 0;

        for(i = 0; i < popes; i++) cin >> years[i];
        // Note that j-i+1 is the number of popes elected from years[i] to years[j]
        for(i = 0; i < popes; i++){
            j = i + 1;
            while(j < popes && years[j]-years[i] <= period-1) j += 1;
            j -= 1;

            if(j-i+1 > max_popes){
                max_popes = j-i+1;
                first_year = years[i];
                last_year = years[j];
            }
        }

        cout << max_popes << " " << first_year << " " << last_year << endl;
    }
    return 0;<commit_msg>UVa 957 updated<commit_after>#include <iostream>

using namespace std;

int main(){
    ios_base::sync_with_stdio (false);

    int period, popes, i, j, year, first_year, last_year, max_popes;
    int years[100000];

    while(cin >> period){
        cin >> popes;
        max_popes = 0;

        for(i = 0; i < popes; i++) cin >> years[i];
        // Note that j-i+1 is the number of popes elected from years[i] to years[j]
        for(i = 0; i < popes; i++){
            j = i + 1;
            while(j < popes && years[j]-years[i] <= period-1) j += 1;
            j -= 1;

            if(j-i+1 > max_popes){
                max_popes = j-i+1;
                first_year = years[i];
                last_year = years[j];
            }
        }

        cout << max_popes << " " << first_year << " " << last_year << endl;
    }
    return 0;
{'fraction_non_alphanumeric': 0.15074183976261127, 'fraction_numerical': 0.018397626112759646, 'mean_word_length': 1.6719492868462758, 'pattern_counts': {'":': 0, '<': 37, '<?xml version=': 0, '>': 19, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5171797', 'n_tokens_mistral': 625, 'n_tokens_neox': 578, 'n_words': 155}