#include #include #include #include #include #include #include #include using namespace std; #define REP(i,a,b) for(i=a;i> n >> k; rep(i,n) { cin >> a; if(max < a) max = a; if(min > a) min = a; } cout << max-min <