#include #include #include #include using namespace std; int main() { int N, K, num; vector data; vector ave; cin >> N >> K; for(int i=0; i> num; data.push_back(num); } sort(data.begin(), data.end()); cout << *(data.end() - 1) - *data.begin() << endl; return 0; }