답안 #38708

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
38708 2018-01-06T09:30:38 Z oTTo_22 Gap (APIO16_gap) C++14
컴파일 오류
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;
               ^