#include int main(void) { int n, k; while(scanf("%d%d", &n, &k)==2) { int max=0, min=0; for(int i=0;iv) min=v; } printf("%d\n", max-min); } return 0; }