Submission #38708

# Submission time Handle Problem Language Result Execution time Memory
38708 2018-01-06T09:30:38 Z oTTo_22 Gap (APIO16_gap) C++14
Compilation error
0 ms 0 KB
#include <bits/stdc++.h>
#include "gap.h"
#define se second
#define fi first
using namespace std;

long long findGap(int T, int N)
{
    long long &Mn,&Mx;
    long long S=0;
    long long T=1000000000000000000;
    while (Mn!=-1 && Mx!=-1) {
        MinMax(S,T,&Mn,&Mn);
        S=Mn;
        T=Mx;
    }

	return T-S;
}

Compilation message

gap.cpp: In function 'long long int findGap(int, int)':
gap.cpp:9:16: error: 'Mn' declared as reference but not initialized
     long long &Mn,&Mx;
                ^
gap.cpp:9:20: error: 'Mx' declared as reference but not initialized
     long long &Mn,&Mx;
                    ^
gap.cpp:11:15: error: declaration of 'long long int T' shadows a parameter
     long long T=1000000000000000000;
               ^