#include using namespace std; int main(){ int N, K; cin >> N >> K; vector v(N); for(int i=0;i> v[i]; } auto minmax_value = minmax_element(begin(v), end(v)); cout << *minmax_value.second - *minmax_value.first << endl; return 0; }